diff options
author | Mike Frysinger <vapier@chromium.org> | 2016-03-28 15:18:13 -0400 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2016-03-29 12:16:32 +0000 |
commit | 6c290e2b66be79ad6e7dc58e779adf38d0bc0670 (patch) | |
tree | 9297f05b8a67f8a777884b8c57da22b4509fdd91 /configure.ac | |
parent | 130ecc3ab325f2203cd0e632d091a4e7a80d4151 (diff) |
configure: fix cache var handling
Need to use the AC_CACHE_CHECK macro in order for the cache vars to be
loaded+checked, otherwise the vars here are just plain variables. This
also allows people to control the various tests when cross-compiling.
Bug: 9912
Change-Id: I119eb87807098c84520954dd34cbd0ddd1b6ccb0
Reviewed-on: https://code.wireshark.org/review/14683
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac index d2f0a2e66d..10d9537ca8 100644 --- a/configure.ac +++ b/configure.ac @@ -1877,7 +1877,9 @@ fi # Check whether GLib modules are supported, to determine whether we # can support plugins. # -AC_MSG_CHECKING(whether GLib supports loadable modules) + +AC_CACHE_CHECK([whether GLib supports loadable modules], + [ac_cv_glib_supports_modules], [ ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$WS_CFLAGS $GLIB_CFLAGS $CFLAGS" @@ -1901,12 +1903,11 @@ main () ac_cv_glib_supports_modules=yes]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" +]) if test "$ac_cv_glib_supports_modules" = yes ; then - AC_MSG_RESULT(yes) have_plugins=yes plugins_dir="plugins" else - AC_MSG_RESULT(no) have_plugins=no plugins_dir="" fi @@ -1948,7 +1949,8 @@ fi # be different from the system's printf since GLib can optionally use # its own printf implementation.) # -AC_MSG_CHECKING(whether GLib supports POSIX/XSI thousands grouping) +AC_CACHE_CHECK([whether GLib supports POSIX/XSI thousands grouping], + [ac_cv_glib_supports_printf_grouping], [ ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$WS_CFLAGS $GLIB_CFLAGS $CFLAGS" @@ -1972,11 +1974,9 @@ main () ac_cv_glib_supports_printf_grouping=no]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" +]) if test "$ac_cv_glib_supports_printf_grouping" = yes ; then - AC_MSG_RESULT(yes) AC_DEFINE(HAVE_GLIB_PRINTF_GROUPING, 1, [Define if GLib's printf functions support thousands grouping.]) -else - AC_MSG_RESULT(no) fi if test "x$have_gtk" = "xyes" @@ -2754,20 +2754,19 @@ AC_CHECK_FUNC(getopt_long, # # Do we have optreset? # - AC_MSG_CHECKING(whether optreset is defined) - AC_TRY_LINK([], - [ + AC_CACHE_CHECK([whether optreset is defined], + [ac_cv_pcap_debug_defined], [ + AC_TRY_LINK([], + [ extern int optreset; return optreset; - ], - ac_cv_pcap_debug_defined=yes, - ac_cv_pcap_debug_defined=no) + ], + ac_cv_pcap_debug_defined=yes, + ac_cv_pcap_debug_defined=no) + ]) if test "$ac_cv_pcap_debug_defined" = yes ; then - AC_MSG_RESULT(yes) AC_DEFINE(HAVE_OPTRESET, 1, [Define to 1 if you have the optreset variable]) - else - AC_MSG_RESULT(no) fi ], GETOPT_LO="wsgetopt.lo") |