don't ignore failed thread creation
[iwhd.git] / configure.ac
blobbd0609bb7797d38244e7cb996f85f4605e48892d
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 # Copyright (C) 1991, 1993-2010 Red Hat, Inc.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 AC_PREREQ([2.65])
20 AC_INIT([iwhd], [1.0], [iwhd-devel@fedorahosted.org])
21 AC_CONFIG_AUX_DIR([build-aux])
23 AC_CONFIG_HEADERS([config.h:config.hin])
24 AM_INIT_AUTOMAKE([1.11.1 color-tests parallel-tests])
25 AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
27 # Checks for programs.
28 AC_PROG_CXX
29 AC_PROG_CC
30 AM_PROG_CC_C_O
32 leg -V > /dev/null 2>&1 ||
33   AC_MSG_ERROR([you need the leg program to build this code;
34     <http://piumarta.com/software/peg/>])
36 AC_CHECK_LIB([curl], [curl_easy_init],
37         [CURL_LIB=-lcurl],
38         [AC_MSG_ERROR([Missing required CURL lib])])
39 AC_SUBST([CURL_LIB])
41 AC_CHECK_LIB([jansson], [json_object_get],
42         [JANSSON_LIB=-ljansson],
43         [AC_MSG_ERROR([Missing required Jansson lib])])
44 AC_SUBST([JANSSON_LIB])
46 AC_CHECK_LIB([microhttpd], [MHD_start_daemon],
47         [UHTTPD_LIB=-lmicrohttpd],
48         [AC_MSG_ERROR([Missing required microhttpd lib])])
49 AC_SUBST([UHTTPD_LIB])
51 AC_CHECK_LIB([pthread], [pthread_create],
52         [PTHREAD_LIB=-lpthread],
53         [AC_MSG_ERROR([Missing required pthread lib])])
54 AC_SUBST([PTHREAD_LIB])
56 AC_CHECK_LIB([glib-2.0], [g_hash_table_new_full],
57         [GLIB2_LIB=-lglib-2.0],
58         [AC_MSG_ERROR([Missing required glib2 lib])])
59 AC_SUBST([GLIB2_LIB])
61 PKG_CHECK_MODULES([HAIL],[libhail >= 0.8])
62 AC_SUBST([HAIL_LIBS])
63 AC_SUBST([HAIL_CFLAGS])
65 AC_CHECK_LIB([crypto], [OPENSSL_init_library],
66         [CRYPTO_LIB=-lcrypto],
67         [AC_MSG_ERROR([Missing required crypto lib])])
68 AC_SUBST([CRYPTO_LIB])
70 AC_CHECK_LIB([xml2], [xmlInitParser],
71         [XML2_LIB=-lxml2],
72         [AC_MSG_ERROR([Missing required XML2 lib])])
73 AC_SUBST([XML2_LIB])
75 # from http://www.gnu.org/software/autoconf-archive/
76 AX_BOOST_BASE
77 AX_BOOST_SYSTEM
78 AX_BOOST_THREAD
80 # Checks for header files.
81 AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h strings.h sys/time.h unistd.h])
83 # Checks for typedefs, structures, and compiler characteristics.
84 AC_HEADER_STDBOOL
85 AC_TYPE_SIZE_T
86 AC_TYPE_UINT64_T
88 # Checks for library functions.
89 AC_FUNC_MALLOC
90 AC_FUNC_REALLOC
91 AC_CHECK_FUNCS([gettimeofday memmove memset strcasecmp strdup strndup strtoul])
93 AC_CONFIG_FILES([Makefile t/Makefile])
94 AC_OUTPUT