Changed handling of GNU getopt

This commit is contained in:
rouat 2001-11-25 18:11:44 +00:00
parent 7a57ec7b4a
commit c6d2a20b8f
5 changed files with 74 additions and 7 deletions

View File

@ -1,3 +1,7 @@
2001-11-25 Emmanuel Rouat <emmanuel.rouat@wanadoo.fr>
* configure.in: New way (cleaner) to handle GNU getopt.
2001-01-21 Paolo Nenzi <p.nenzi@ieee.org>
* bsim3soi_dd/*: BSIM3SOI (DD) support added as level 11. Added tests in

View File

@ -34,3 +34,6 @@
/* Undefine HAVE_GNUREADLINE */
#undef HAVE_GNUREADLINE
/* Define if we don't have GETOPT in the library */
#undef HAVE_GETOPT

View File

@ -119,8 +119,9 @@ dnl libraries are present (error if they are not)
if test ! "$no_x" = "yes" ; then
X_LIBS="$X_LIBS -lX11 -lXt"
AC_CHECK_LIB(Xext, XShmAttach,X_LIBS="$X_LIBS -lXext",AC_MSG_ERROR(Couldn't find Xext librairies), $X_LIBS $X_EXTRA_LIBS)
AC_CHECK_LIB(Xaw,main,X_LIBS="$X_LIBS -lXaw",AC_MSG_ERROR(Couldn't find Xaw librairies),$X_LIBS $X_EXTRA_LIBS)
AC_CHECK_LIB(Xmu,main,X_LIBS="$X_LIBS -lXmu",AC_MSG_ERROR(Couldn't find Xmu librairies), $X_LIBS $X_EXTRA_LIBS)
AC_CHECK_LIB(Xaw,main,X_LIBS="$X_LIBS -lXaw",AC_MSG_ERROR(Couldn't find Xaw librairies),$X_LIBS $X_EXTRA_LIBS)
fi
@ -172,14 +173,12 @@ AC_MSG_RESULT(Checking for the presence of the Garbage Collector:)
dnl Check for the garbage collector:
AC_CHECK_LIB(gc,GC_malloc,AC_DEFINE(HAVE_LIBGC) LIBS="$LIBS -lgc")
AC_MSG_RESULT(Checking for the asprintf function:)
dnl Check for the asprintf function:
AC_CHECK_FUNC(asprintf)
AC_MSG_RESULT(Checking for getopt:)
dnl Check for getopt function and if not found uses a local copy:
AC_CHECK_FUNC(getopt, GETOPTSRC="", GETOPTSRC= "getopt.h getopt.c getopt1.c")
AC_SUBST(GETOPTSRC)
AC_CHECK_FUNC(getopt_long, getopt_long=true)
AM_CONDITIONAL(HAVE_GETOPT_LONG, test "$getopt_long" = "true")
# Expand the prefix variable (this is really annoying!)
if eval "test x$prefix = xNONE"; then

View File

@ -1,3 +1,7 @@
2001-11-25 Emmanuel Rouat <emmanuel.rouat@wanadoo.fr>
* Makefile.am: adapted for new GNU getopt handling by autoconf
2000-07-18 Arno W. Peters <A.W.Peters@ieee.org>
* Makefile.am: Added wlist.c.

View File

@ -2,8 +2,34 @@
noinst_LIBRARIES = libmisc.a
EXTRA_libmisc_a_SOURCES = \
getopt1.c \
getopt.c \
getopt.h \
alloc.c \
alloc.h \
dup2.c \
dup2.h \
ivars.c \
ivars.h \
missing_math.c \
missing_math.h \
mktemp.c \
mktemp.h \
printnum.c \
printnum.h \
string.c \
stringutil.h \
terminal.c \
terminal.h \
tilde.c \
tilde.h \
misc_time.c \
misc_time.h \
wlist.c
if HAVE_GETOPT_LONG
libmisc_a_SOURCES = \
@GETOPTSRC@ \
alloc.c \
alloc.h \
dup2.c \
@ -27,6 +53,37 @@ libmisc_a_SOURCES = \
wlist.c
else
libmisc_a_SOURCES = \
getopt1.c \
getopt.c \
getopt.h \
alloc.c \
alloc.h \
dup2.c \
dup2.h \
ivars.c \
ivars.h \
missing_math.c \
missing_math.h \
mktemp.c \
mktemp.h \
printnum.c \
printnum.h \
string.c \
stringutil.h \
terminal.c \
terminal.h \
tilde.c \
tilde.h \
misc_time.c \
misc_time.h \
wlist.c
endif
INCLUDES = -I$(top_srcdir)/src/include
MAINTAINERCLEANFILES = Makefile.in