From: Ramiro Polla Date: Sun, 20 Jun 2010 21:53:11 +0000 (-0300) Subject: Compile getopt_long() conditionally X-Git-Tag: v3.1~207 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d165b4ebc3a4ae40cf9631c86e83bfb7519ca1be;p=thirdparty%2Fccache.git Compile getopt_long() conditionally --- diff --git a/configure.ac b/configure.ac index bf71b9d81..b2d69baac 100644 --- a/configure.ac +++ b/configure.ac @@ -181,6 +181,7 @@ AC_CHECK_HEADERS(ctype.h pwd.h stdlib.h string.h strings.h sys/time.h) AC_CHECK_FUNCS(asprintf) AC_CHECK_FUNCS(gethostname) +AC_CHECK_FUNCS(getopt_long) AC_CHECK_FUNCS(getpwuid) AC_CHECK_FUNCS(gettimeofday) AC_CHECK_FUNCS(mkstemp) diff --git a/getopt_long.c b/getopt_long.c index 4c9c3af06..bf518d79d 100644 --- a/getopt_long.c +++ b/getopt_long.c @@ -32,6 +32,10 @@ * SUCH DAMAGE. */ +#include "config.h" + +#ifndef HAVE_GETOPT_LONG + #include "getopt_long.h" #include @@ -189,3 +193,5 @@ getopt_long(int argc, char *const argv[], } return optopt; } + +#endif /* HAVE_GETOPT_LONG */