build system: use AC_SEARCH_LIBS rather than assuming -ldl is needed.
[gregoa/bti.git] / configure.ac
1 AC_INIT([bti], [027], [greg@kroah.com])
2 AC_PREREQ(2.60)
3
4 AM_INIT_AUTOMAKE(bti, 027)
5 dnl AM_CONFIG_HEADER([check-news foreign 1.9 dist-bzip2])
6
7 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
8
9 AC_PROG_CC
10 AC_PROG_INSTALL
11
12 AC_CONFIG_MACRO_DIR([m4])
13
14 AC_PATH_PROG([XSLTPROC], [xsltproc])
15
16 dnl FIXME: Replace `main' with a function in `-lnsl':
17 AC_CHECK_LIB([nsl], [main])
18
19 PKG_PROG_PKG_CONFIG()
20
21 PKG_CHECK_MODULES(LIBOAUTH, oauth)
22 PKG_CHECK_MODULES(LIBPCRE, libpcre)
23 PKG_CHECK_MODULES([LIBCURL], [libcurl])
24 PKG_CHECK_MODULES([XML], [libxml-2.0])
25
26 AC_SEARCH_LIBS([dlopen], [dl])
27
28 dnl Checks for header files.
29 #AC_CHECK_HEADERS([fcntl.h stddef.h stdlib.h string.h unistd.h])
30
31 dnl Checks for typedefs, structures, and compiler characteristics.
32 #AC_TYPE_PID_T
33 #AC_TYPE_SIZE_T
34 #AC_TYPE_SSIZE_T
35
36 dnl Checks for library functions.
37 #AC_FUNC_ALLOCA
38 #AC_FUNC_FORK
39 #AC_FUNC_MALLOC
40 #AC_FUNC_REALLOC
41 #AC_CHECK_FUNCS([strcasecmp strchr strdup strncasecmp strndup])
42
43 AC_CONFIG_FILES([Makefile])
44
45 AC_OUTPUT
46
47
48 echo "
49         bti $VERSION
50         =======
51
52         prefix:                 ${prefix}
53         datarootdir:            ${datarootdir}
54         mandir:                 ${mandir}
55
56         compiler:               ${CC}
57         cflags:                 ${CFLAGS}
58         ldflags:                ${LDFLAGS}
59
60         xsltproc:               ${XSLTPROC}
61 "
62