diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-12-24 17:10:40 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-12-25 01:11:10 +0000 |
commit | 20503c70478e0f83b7cafebbbb759de801a1d53e (patch) | |
tree | 429adece393765104527f18823738805e4fe105c /configure.ac | |
parent | b6f70ed3f8959f6ba89f8df029b22b7d57ad8f0a (diff) |
Check for getopt_long(), not getopt().
We support three types of platforms:
1) UN*Xes that have both getopt() and getopt_long();
2) UN*Xes that have getopt() but not getopt_long();
3) Windows, which has neither.
Checking for getopt_long() lets us distinguish between 1) and 2) and
build getopt_long() for them.
Change-Id: Iaf0f142f9bebaa2eed2128d544ec9786711def45
Reviewed-on: https://code.wireshark.org/review/6045
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 86fb03f8f4..5ebfa04c7f 100644 --- a/configure.ac +++ b/configure.ac @@ -2665,10 +2665,10 @@ AC_C_BIGENDIAN # XXX - do we need this? AC_PROG_GCC_TRADITIONAL -AC_CHECK_FUNC(getopt, +AC_CHECK_FUNC(getopt_long, [ GETOPT_LO="" - AC_DEFINE(HAVE_GETOPT, 1, [Define to 1 if you have the getopt function.]) + AC_DEFINE(HAVE_GETOPT_LONG, 1, [Define to 1 if you have the getopt_long function.]) ], GETOPT_LO="wsgetopt.lo") AC_SUBST(GETOPT_LO) |