aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac30
1 files changed, 29 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index a055c11..6c20f48 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,9 +63,37 @@ AC_FUNC_STRFTIME
AC_FUNC_VFORK
AC_FUNC_VPRINTF
AC_FUNC_WAIT3
-AC_CHECK_FUNCS(ftime gethostname gettimeofday getusershell getwd select socket strdup strerror strtol ether_hostton strerror)
+AC_CHECK_FUNCS(ftime gethostname gettimeofday getusershell ether_hostton)
+AC_REPLACE_FUNCS(strchrnul strndup strnlen strerror)
rad_REPLACE_GNU_GETOPT
+AC_ARG_WITH(included-argp,
+ [ --with-included-argp Use included argp library],
+ [USE_INCLUDED_ARGP=$withval],
+ [USE_INCLUDED_ARGP=no])
+
+AC_CHECK_FUNCS(argp_parse, :, USE_INCLUDED_ARGP=yes)
+
+if test $USE_INCLUDED_ARGP = yes; then
+ AC_LIBOBJ([argp-ba])
+ AC_LIBOBJ([argp-eexst])
+ AC_LIBOBJ([argp-fmtstream])
+ AC_LIBOBJ([argp-fs-xinl])
+ AC_LIBOBJ([argp-help])
+ AC_LIBOBJ([argp-parse])
+ AC_LIBOBJ([argp-pv])
+ AC_LIBOBJ([argp-pvh])
+ AC_LIBOBJ([argp-xinl])
+fi
+
+if test $USE_INCLUDED_ARGP != yes; then
+ AC_CHECK_DECLS(program_invocation_name,,,[#include <argp.h>])
+ AH_BOTTOM([
+#if !HAVE_DECL_PROGRAM_INVOCATION_NAME
+extern char *program_invocation_short_name;
+extern char *program_invocation_name;
+#endif])
+fi
dnl libpcap stuff
dnl All the stuff below has been shamelessly stolen from libpcap-0.4

Return to:

Send suggestions and report system problems to the System administrator.