aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2006-02-15 19:20:36 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2006-02-15 19:20:36 +0000
commitcad86206cb0e72197842e911d84e2929d4d2ef37 (patch)
tree1c1d556e61c5e36588a51342d5469102336e3aa1 /configure.in
parent691ba88de163282b66ab86fdaa26655a63a72b46 (diff)
Check for getopt in the configure script, as we do for other routines
not available on all platforms. Include getopt.c in EXTRA_ethereal_SOURCES and include getopt.h in EXTRA_ethereal_INCLUDES, as we do with the other files that supply routines not available on all platforms, rather than always including them in the source for dumpcap. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17311 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 4ad5e2ad8c..b435430ae5 100644
--- a/configure.in
+++ b/configure.in
@@ -1033,6 +1033,19 @@ AC_C_BIGENDIAN
# XXX - do we need this?
AC_PROG_GCC_TRADITIONAL
+GETOPT_C=""
+GETOPT_O=""
+AC_CHECK_FUNC(getopt, GETOPT_O="",
+ [GETOPT_O="getopt.o"
+ AC_DEFINE(NEED_GETOPT_H, 1, [Define if getopt.h needs to be included])
+])
+if test "$ac_cv_func_getopt" = no ; then
+ GETOPT_C="getopt.c"
+ GETOPT_O="getopt.o"
+fi
+AC_SUBST(GETOPT_C)
+AC_SUBST(GETOPT_O)
+
# If there's a system out there that has snprintf and _doesn't_ have vsnprintf,
# then this won't work.
SNPRINTF_C=""