]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Compile getopt_long() conditionally
authorRamiro Polla <ramiro.polla@gmail.com>
Sun, 20 Jun 2010 21:53:11 +0000 (18:53 -0300)
committerJoel Rosdahl <joel@rosdahl.net>
Fri, 25 Jun 2010 08:35:29 +0000 (10:35 +0200)
configure.ac
getopt_long.c

index bf71b9d813815a5844e4187e22823dbc14bcc63b..b2d69baac151396cb9b3a3231f656c32ac25f9fb 100644 (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)
index 4c9c3af062d22e5129d88a57e8c80407b74cc91e..bf518d79d4afee691395d70af2ef411313cb6136 100644 (file)
  * 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 */