summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2000-11-03 08:18:37 +0000
committerThomas Wouters <thomas@python.org>2000-11-03 08:18:37 +0000
commit2cffc7d4202fc1197280a05d998075551b459283 (patch)
tree7c5d86617226e1517840a60c44bd21183160b3e0 /configure.in
parent9dce7b3737c456f3c6f56f1f57c29b3c3b6b20aa (diff)
downloadcpython-git-2cffc7d4202fc1197280a05d998075551b459283.tar.gz
Move our own getopt() implementation to _PyOS_GetOpt(), and use it
regardless of whether the system getopt() does what we want. This avoids the hassle with prototypes and externs, and the check to see if the system getopt() does what we want. Prefix optind, optarg and opterr with _PyOS_ to avoid name clashes. Add new include file to define the right symbols. Fix Demo/pyserv/pyserv.c to include getopt.h itself, instead of relying on Python to provide it.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in16
1 files changed, 0 insertions, 16 deletions
diff --git a/configure.in b/configure.in
index 15e9a3a115..f2017480bb 100644
--- a/configure.in
+++ b/configure.in
@@ -1204,22 +1204,6 @@ LIBS="$LIBS $LIBM"
AC_REPLACE_FUNCS(hypot)
LIBS=$LIBS_SAVE
-# check for getopt
-AC_MSG_CHECKING(for genuine getopt)
-AC_CACHE_VAL(ac_cv_func_getopt,
-[AC_TRY_RUN([#include <stdio.h>
-extern int optind, opterr, getopt();
-extern char* optarg;
-int main() {
- char* av[] = { "testprog", "parameter", "-fFlag", NULL };
- opterr = 0;
- if (getopt(3, av, "f:") == 'f') { exit(1); }
- exit(0);
-}], ac_cv_func_getopt=yes, ac_cv_func_getopt=no, ac_cv_func_getopt=no)])dnl
-AC_MSG_RESULT($ac_cv_func_getopt)
-test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
-AC_SUBST(LIBOBJS)dnl
-
# check whether malloc(0) returns NULL or not
AC_MSG_CHECKING(what malloc(0) returns)
AC_CACHE_VAL(ac_cv_malloc_zero,