diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-03-23 14:21:06 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-03-23 22:39:07 +0000 |
commit | d12a41b17a006ccc1b0f98e9df3fc442e4ee7643 (patch) | |
tree | 009988dd542bad8784861bce8bb0df0483ba122a /configure.ac | |
parent | a7edc4f25f1cffb452959e2093fe7b2a65e75d79 (diff) | |
download | wireshark-d12a41b17a006ccc1b0f98e9df3fc442e4ee7643.tar.gz wireshark-d12a41b17a006ccc1b0f98e9df3fc442e4ee7643.tar.bz2 wireshark-d12a41b17a006ccc1b0f98e9df3fc442e4ee7643.zip |
Include alloca.h if we have it.
Bug: 14552
Change-Id: I799691f7f33ca56748ed4e51d7d548f37769837b
Reviewed-on: https://code.wireshark.org/review/26611
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 8d743f3b2f..b5ee1f0626 100644 --- a/configure.ac +++ b/configure.ac @@ -2309,16 +2309,26 @@ AC_CHECK_MEMBERS([struct sockaddr.sa_len],,, #endif]) AC_REPLACE_FUNCS(getopt_long) -dnl -dnl Do we have optreset? -dnl if test "x$ac_cv_func_getopt_long" = xyes; then + # + # The OS has getopt_long(), so it might have optreset. Do we have it? + # AC_CACHE_CHECK([whether optreset is defined], ac_cv_have_optreset, AC_LINK_IFELSE([AC_LANG_SOURCE([[extern int optreset;return optreset;]])], ac_cv_have_optreset=yes, ac_cv_have_optreset=no)) if test "$ac_cv_have_optreset" = yes ; then AC_DEFINE(HAVE_OPTRESET, 1, [Define to 1 if you have the optreset variable]) fi +else + # + # The OS doesn't have getopt_long(), so we're using the GNU libc + # version that we have in wsutil. It doesn't have optreset, so we + # don't need to check for it. + # + # However, it uses alloca(), so we may need to include alloca.h; + # check for it. + # + AC_CHECK_HEADERS(alloca.h) fi AC_REPLACE_FUNCS(strptime) |