Compile getopt_long() conditionally

This commit is contained in:
Ramiro Polla 2010-06-20 18:53:11 -03:00 committed by Joel Rosdahl
parent ffbdbe879b
commit d165b4ebc3
2 changed files with 7 additions and 0 deletions

View File

@ -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)

View File

@ -32,6 +32,10 @@
* SUCH DAMAGE.
*/
#include "config.h"
#ifndef HAVE_GETOPT_LONG
#include "getopt_long.h"
#include <stdio.h>
@ -189,3 +193,5 @@ getopt_long(int argc, char *const argv[],
}
return optopt;
}
#endif /* HAVE_GETOPT_LONG */