Slight fixes for getopt_long hack, so it will

work for systems without getopt.h at all.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@130 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
aet 2002-01-03 07:32:36 +00:00
parent 9bd6c8f9bb
commit 0c2086857a
1 changed files with 7 additions and 6 deletions

View File

@ -136,11 +136,6 @@ AM_PROG_LIBTOOL
dnl Automatically update the libtool script if it becomes out-of-date.
#AC_SUBST(LIBTOOL_DEPS)
AC_SUBST(GETOPTSRC)
AC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPT_LONG),
[GETOPTSRC="$GETOPTSRC \$(top_srcdir)/src/common/getopt.c \$(top_srcdir)/src/common/getopt1.c"
CPPFLAGS="-I\$(top_srcdir)/src/common $CPPFLAGS"])
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([errno.h fcntl.h malloc.h stdlib.h string.h sys/time.h unistd.h syslog.h getopt.h security/pam_appl.h security/_pam_macros.h])
@ -150,13 +145,19 @@ AC_C_CONST
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_SUBST(GETOPTSRC)
AC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPT_LONG, 1, [Define if you have the `getopt_long' function.]),
[GETOPTSRC="$GETOPTSRC \$(top_srcdir)/src/common/getopt.c \$(top_srcdir)/src/common/getopt1.c"
CPPFLAGS="-I\$(top_srcdir)/src/common $CPPFLAGS"
AC_DEFINE(HAVE_GETOPT_H, 1, [Define if you have the <getopt.h> header file.])])
dnl Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_STAT
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([getopt_long getpass gettimeofday memset mkdir strdup strerror])
AC_CHECK_FUNCS([getpass gettimeofday memset mkdir strdup strerror])
dnl C Compiler features
AC_C_INLINE