fi
])
-#
-# AC_WIRESHARK_LIBPCRE_CHECK
-#
-AC_DEFUN([AC_WIRESHARK_LIBPCRE_CHECK],
-[
- if test "x$pcre_dir" != "x"
- then
- #
- # The user specified a directory in which libpcre resides,
- # so add the "include" subdirectory of that directory to
- # the include file search path and the "lib" subdirectory
- # of that directory to the library search path.
- #
- # XXX - if there's also a libpcre in a directory that's
- # already in CFLAGS, CPPFLAGS, or LDFLAGS, this won't
- # make us find the version in the specified directory,
- # as the compiler and/or linker will search that other
- # directory before it searches the specified directory.
- #
- wireshark_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -I$pcre_dir/include"
- wireshark_save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -I$pcre_dir/include"
- wireshark_save_LIBS="$LIBS"
- LIBS="$LIBS -lpcre"
- wireshark_save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -L$pcre_dir/lib"
- fi
-
- #
- # Make sure we have "pcre.h". If we don't, it means we probably
- # don't have libpcre, so don't use it.
- #
- AC_CHECK_HEADER(pcre.h,,
- [
- if test "x$pcre_dir" != "x"
- then
- #
- # The user used "--with-pcre=" to specify a directory
- # containing libpcre, but we didn't find the header file
- # there; that either means they didn't specify the
- # right directory or are confused about whether libpcre
- # is, in fact, installed. Report the error and give up.
- #
- AC_MSG_ERROR([libpcre header not found in directory specified in --with-pcre])
- else
- if test "x$want_pcre" = "xyes"
- then
- #
- # The user tried to force us to use the library, but we
- # couldn't find the header file; report an error.
- #
- AC_MSG_ERROR(Header file pcre.h not found.)
- else
- #
- # We couldn't find the header file; don't use the
- # library, as it's probably not present.
- #
- want_pcre=no
- fi
- fi
- ])
-
- if test "x$want_pcre" != "xno"
- then
- #
- # Well, we at least have the pcre header file.
- #
- # We're only using standard functions from libpcre,
- # so we don't need to perform extra checks.
- #
- AC_CHECK_LIB(pcre, pcre_compile,
- [
- if test "x$pcre_dir" != "x"
- then
- #
- # Put the "-I" and "-L" flags for pcre at
- # the beginning of CFLAGS, CPPFLAGS,
- # LDFLAGS, and LIBS.
- #
- PCRE_LIBS="-L$pcre_dir/lib -lpcre $wireshark_save_LIBS"
- else
- PCRE_LIBS="-lpcre"
- fi
- AC_DEFINE(HAVE_LIBPCRE, 1, [Define to use libpcre library])
- ],[
- if test "x$pcre_dir" != "x"
- then
- #
- # Restore the versions of CFLAGS, CPPFLAGS,
- # LDFLAGS, and LIBS before we added the
- # "--with-pcre=" directory, as we didn't
- # actually find pcre there.
- #
- CFLAGS="$wireshark_save_CFLAGS"
- CPPFLAGS="$wireshark_save_CPPFLAGS"
- LDFLAGS="$wireshark_save_LDFLAGS"
- LIBS="$wireshark_save_LIBS"
- PCRE_LIBS=""
- fi
- want_pcre=no
- ])
- AC_SUBST(PCRE_LIBS)
- fi
-])
-
#
# AC_WIRESHARK_LIBLUA_CHECK
#
[GCC_OPTION="$1"
AC_MSG_CHECKING(whether we can add $GCC_OPTION to LDFLAGS)
if test "x$ac_supports_W_linker_passthrough" = "xyes"; then
- LDFLAGS_saved="$CFLAGS"
+ LDFLAGS_saved="$LDFLAGS"
LDFLAGS="$LDFLAGS $GCC_OPTION"
AC_LINK_IFELSE([
AC_LANG_SOURCE([[
AC_CHECK_PROG([ac_ws_python_config], python-config, "yes", "no")
if test "x$ac_ws_python_config" = "xno"; then
ac_cv_wireshark_python_devel=no
- if test "x$want_python" = "xyes"
- then
- #
- # The user tried to force us to use Python, but we
- # couldn't find the python-config tool; report an error.
- #
- AC_MSG_ERROR("python-config not found")
- fi
+ if test "x$want_python" = "xyes"
+ then
+ #
+ # The user tried to force us to use Python, but we
+ # couldn't find the python-config tool; report an error.
+ #
+ AC_MSG_ERROR("python-config not found")
+ fi
+ #
+ # Set want_python to no, so we report that we aren't using
+ # the Python interpreter.
+ #
+ want_python=no
else
AC_MSG_CHECKING([python devel])
ac_save_ws_cflags=$CFLAGS
ac_cv_wireshark_python_devel=no
CFLAGS=$ac_save_ws_cflags
LIBS=$ac_save_ws_libs
- if test "x$want_python" = "xyes"
- then
- #
- # The user tried to force us to use Python, but we
- # couldn't compile the test program; report an error.
- #
- AC_MSG_ERROR("Python test program failed compilation")
- fi
+ if test "x$want_python" = "xyes"
+ then
+ #
+ # The user tried to force us to use Python, but we
+ # couldn't compile the test program; report an error.
+ #
+ AC_MSG_ERROR("Python test program failed compilation")
+ fi
AC_MSG_RESULT([no])
+ #
+ # Set want_python to no, so we report that we aren't using
+ # the Python interpreter.
+ #
+ want_python=no
])
fi
# ])