diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-02-28 15:38:48 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-02-28 15:38:48 +0300 |
commit | a44c8f339c62b3d0c2c276e24058c30ebd29a31e (patch) | |
tree | 3fb384e9b6f74aae20aed59d091070be44717eac | |
parent | e462a50176474c8e0c791c77a6c4863753af1e5d (diff) | |
download | libmicrohttpd-a44c8f339c62b3d0c2c276e24058c30ebd29a31e.tar.gz libmicrohttpd-a44c8f339c62b3d0c2c276e24058c30ebd29a31e.zip |
configure.ac: fixed detection of tsearch-related functions and header.
Precompiler macro HAVE_SEARCH_H is used by code and must be appropriately defined.
-rw-r--r-- | configure.ac | 12 | ||||
-rw-r--r-- | src/microhttpd/Makefile.am | 2 |
2 files changed, 11 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 5f26a61b..d1ce5d42 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -701,8 +701,16 @@ AC_CHECK_HEADERS([sys/types.h sys/time.h sys/msg.h time.h sys/mman.h sys/ioctl.h | |||
701 | inttypes.h stddef.h unistd.h \ | 701 | inttypes.h stddef.h unistd.h \ |
702 | sockLib.h inetLib.h net/if.h], [], [], [AC_INCLUDES_DEFAULT]) | 702 | sockLib.h inetLib.h net/if.h], [], [], [AC_INCLUDES_DEFAULT]) |
703 | 703 | ||
704 | gl_FUNC_TSEARCH | 704 | AC_CHECK_HEADER([[search.h]], |
705 | AM_CONDITIONAL([HAVE_TSEARCH], [test "x$HAVE_TSEARCH" = "x1"]) | 705 | [ |
706 | gl_FUNC_TSEARCH | ||
707 | AS_IF([[test "x$HAVE_TSEARCH" = "x1" && test "x$REPLACE_TSEARCH" != "x1"]], | ||
708 | [AC_DEFINE([[HAVE_SEARCH_H]], [[1]], | ||
709 | [Define to 1 if you have the <search.h> header file and your system have properly functioning tsearch(), tfind() and tdelete() functions])]) | ||
710 | ], | ||
711 | [], [AC_INCLUDES_DEFAULT]) | ||
712 | |||
713 | AM_CONDITIONAL([MHD_HAVE_TSEARCH], [[test "x$ac_cv_header_search_h" = xyes && test "x$HAVE_TSEARCH" = "x1" && test "x$REPLACE_TSEARCH" != "x1"]]) | ||
706 | 714 | ||
707 | # Check for generic functions | 715 | # Check for generic functions |
708 | AC_CHECK_FUNCS([rand random]) | 716 | AC_CHECK_FUNCS([rand random]) |
diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am index 9bf5acea..7573fa7a 100644 --- a/src/microhttpd/Makefile.am +++ b/src/microhttpd/Makefile.am | |||
@@ -110,7 +110,7 @@ if USE_COVERAGE | |||
110 | AM_CFLAGS += --coverage | 110 | AM_CFLAGS += --coverage |
111 | endif | 111 | endif |
112 | 112 | ||
113 | if !HAVE_TSEARCH | 113 | if !MHD_HAVE_TSEARCH |
114 | libmicrohttpd_la_SOURCES += \ | 114 | libmicrohttpd_la_SOURCES += \ |
115 | tsearch.c tsearch.h | 115 | tsearch.c tsearch.h |
116 | endif | 116 | endif |