From 60e361f74cec241e9728484d8f74901eb231b748 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Thu, 19 Oct 2006 21:21:00 +0000 Subject: [PATCH] * Add checks for getopt / getopt_long. --- configure.ac | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b66036e..3199eed 100644 --- a/configure.ac +++ b/configure.ac @@ -65,10 +65,17 @@ dnl conditional builds AC_ARG_ENABLE(doc, [ --enable-doc build documentation (needs doxygen and LaTeX)]) -AC_CHECK_HEADERS(stdio.h stdarg.h signal.h sys/ioctl.h sys/time.h inttypes.h endian.h unistd.h arpa/inet.h netinet/in.h winsock2.h errno.h locale.h) +AC_CHECK_HEADERS(stdio.h stdarg.h signal.h sys/ioctl.h sys/time.h inttypes.h endian.h unistd.h arpa/inet.h netinet/in.h winsock2.h errno.h locale.h getopt.h) AC_CHECK_FUNCS(signal ioctl vsnprintf getenv putenv strcasecmp htons) AC_CHECK_FUNCS(usleep gettimeofday) +AC_CHECK_FUNCS(getopt_long, + [AC_DEFINE(HAVE_GETOPT_LONG, 1, Define to 1 if you have the `getopt_long' function.)], + [AC_CHECK_LIB(gnugetopt, getopt_long, + [AC_DEFINE(HAVE_GETOPT_LONG, 1, Define to 1 if you have the `getopt_long' function.) + GETOPT_LIBS="${GETOPT_LIBS} -lgnugetopt"])]) +AC_SUBST(GETOPT_LIBS) + AC_MSG_CHECKING(for Sleep) AC_TRY_COMPILE([#include ],[Sleep(42);], [AC_MSG_RESULT(yes)