aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil/Makefile.am
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-07-06 14:02:39 -0700
committerGuy Harris <guy@alum.mit.edu>2014-07-06 21:03:09 +0000
commit5bfc21cf9e42af13a8d1ad6eb545ab82cb7dbe9d (patch)
tree89a9afacd2d37d3eadc22165a0256a14b089da1e /wsutil/Makefile.am
parente64942068632fc01b6a1211bfb90df8265e41fe7 (diff)
Clean up handling of missing functions.
With autotools, CMake, and nmake, if we have a function, #define HAVE_{function_name_in_all_caps}, otherwise don't #define it. If we provide our own version of a function in libwsutil, make sure we have a header that declares it, and *ONLY* include that header if HAVE_{function_name_in_all_caps} is *NOT* defined, so that we don't have the system declaration and our declaration colliding. Check for inet_aton, strncasecmp, and strptime with CMake, just as we do with autotools. Simplify the addition of {function_name_in_all_caps}_LO to libwsutil in autotools. Change-Id: Id5be5c73f79f81919a3a865324e400eca7b88889 Reviewed-on: https://code.wireshark.org/review/2903 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wsutil/Makefile.am')
-rw-r--r--wsutil/Makefile.am35
1 files changed, 9 insertions, 26 deletions
diff --git a/wsutil/Makefile.am b/wsutil/Makefile.am
index 385acc6e73..c2e0c22186 100644
--- a/wsutil/Makefile.am
+++ b/wsutil/Makefile.am
@@ -25,32 +25,14 @@ DIST_SUBDIRS = $(SUBDIRS)
ACLOCAL_AMFLAGS = `../aclocal-flags`
# Optional objects that I know how to build. These will be
-# linked into libwsutil.
-wsutil_optional_objects =
-
-if NEED_GETOPT_LO
-wsutil_optional_objects += @GETOPT_LO@
-endif
-
-if NEED_INET_ATON_LO
-wsutil_optional_objects += @INET_ATON_LO@
-endif
-
-if NEED_INET_NTOP_LO
-wsutil_optional_objects += @INET_NTOP_LO@
-endif
-
-if NEED_INET_PTON_LO
-wsutil_optional_objects += @INET_PTON_LO@
-endif
-
-if NEED_STRNCASECMP_LO
-wsutil_optional_objects += @STRNCASECMP_LO@
-endif
-
-if NEED_STRPTIME_LO
-wsutil_optional_objects += @STRPTIME_LO@
-endif
+# linked into libwsutil if necessary.
+wsutil_optional_objects = \
+ @GETOPT_LO@ \
+ @INET_ATON_LO@ \
+ @INET_NTOP_LO@ \
+ @INET_PTON_LO@ \
+ @STRNCASECMP_LO@ \
+ @STRPTIME_LO@
if SSE42_SUPPORTED
wsutil_optional_objects += libwsutil_sse42.la
@@ -92,6 +74,7 @@ EXTRA_libwsutil_la_SOURCES= \
inet_pton.c \
inet_v6defs.h \
strncasecmp.c \
+ strncasecmp.h \
strptime.c \
strptime.h \
wsgetopt.c \