- Some more comments
[obnox/wireshark/wip.git] / configure.in
index eae4c49c3ee245a211a11f10950245faac67ea23..b435430ae5b3e5a8f2df4ab63acf95fe2c846b88 100644 (file)
@@ -562,7 +562,7 @@ AC_SUBST(editcap_man)
 # Enable/disable dumpcap
 
 AC_ARG_ENABLE(dumpcap,
-[  --enable-dumpcap        build dumpcap.  [default=no]],enable_dumpcap=$enableval,enable_dumpcap=no)
+[  --enable-dumpcap        build dumpcap.  [default=yes]],enable_dumpcap=$enableval,enable_dumpcap=yes)
 
 if test "x$enable_dumpcap" = "xyes" ; then
        dumpcap_bin="dumpcap\$(EXEEXT)"
@@ -771,7 +771,7 @@ dnl lua check
 AC_MSG_CHECKING(whether to use liblua for the lua scripting plugin)
 
 AC_ARG_WITH(lua,
-[  --with-lua[[=DIR]]       use liblua (located in directory DIR, if supplied) for the lua scripting plugin.  [[default=no]]],
+[  --with-lua[[=DIR]]        use liblua (located in directory DIR, if supplied) for the lua scripting plugin.  [[default=no]]],
 [
        if test $withval = no
        then
@@ -785,7 +785,7 @@ AC_ARG_WITH(lua,
        fi
 ],[
        #
-       # Use liblua if it's present, otherwise don't.
+       # Don't use liblua by default (it isn't ready yet)
        #
        want_lua=no
        lua_dir=
@@ -823,7 +823,11 @@ AC_MSG_CHECKING(whether to install ethereal setuid)
 if test "x$enable_setuid_install" = "xno" ; then
        AC_MSG_RESULT(no)
 else
-       AC_MSG_RESULT(yes)
+       if test "x$enable_dumpcap" = "xno" ; then
+               AC_MSG_ERROR(Setuid install works only with --enable-dumpcap, but dumpcap disabled)
+       else
+               AC_MSG_RESULT(yes)
+       fi
 fi
 
 AM_CONDITIONAL(SETUID_INSTALL, test x$enable_setuid_install = xyes)
@@ -1029,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=""
@@ -1200,6 +1217,7 @@ AC_SUBST(STRPTIME_C)
 AC_SUBST(STRPTIME_O)
 
 AC_CHECK_FUNCS(getprotobynumber gethostbyname2)
+AC_CHECK_FUNCS(issetugid)
 
 dnl blank for now, but will be used in future
 AC_SUBST(ethereal_SUBDIRS)