-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | acinclude.m4 | 45 | ||||
-rw-r--r-- | configure.ac | 2 |
3 files changed, 2 insertions, 50 deletions
diff --git a/Makefile.am b/Makefile.am index 741d585..638d6af 100644 --- a/Makefile.am +++ b/Makefile.am | |||
@@ -1,23 +1,20 @@ | |||
1 | 1 | ||
2 | SUBDIRS=include lib test | 2 | SUBDIRS=include lib test |
3 | EXTRA_DIST= NEWS NEWS.xml NEWS.xsl | 3 | EXTRA_DIST= NEWS NEWS.xml NEWS.xsl |
4 | 4 | ||
5 | DISTCHECK_CONFIGURE_FLAGS=--with-pkgconfigdir=$${dc_install_base}/lib/pkgconfig | 5 | pkgconfigdir=${libdir}/pkgconfig |
6 | if HAVE_PKGCONFIG | ||
7 | pkgconfigdir=@PKGCONFIG_DIR@ | ||
8 | pkgconfig_DATA=libopkele.pc | 6 | pkgconfig_DATA=libopkele.pc |
9 | endif | ||
10 | 7 | ||
11 | all-local: NEWS | 8 | all-local: NEWS |
12 | if HAVE_DOXYGEN | 9 | if HAVE_DOXYGEN |
13 | clean-local: | 10 | clean-local: |
14 | rm -rf doxydox | 11 | rm -rf doxydox |
15 | endif | 12 | endif |
16 | 13 | ||
17 | NEWS: NEWS.xsl NEWS.xml | 14 | NEWS: NEWS.xsl NEWS.xml |
18 | ${XSLTPROC} -o $@ NEWS.xsl NEWS.xml | 15 | ${XSLTPROC} -o $@ NEWS.xsl NEWS.xml |
19 | 16 | ||
20 | if HAVE_DOXYGEN | 17 | if HAVE_DOXYGEN |
21 | dox: Doxyfile | 18 | dox: Doxyfile |
22 | ${DOXYGEN} | 19 | ${DOXYGEN} |
23 | endif | 20 | endif |
diff --git a/acinclude.m4 b/acinclude.m4 index 532f978..80defc7 100644 --- a/acinclude.m4 +++ b/acinclude.m4 | |||
@@ -1,109 +1,64 @@ | |||
1 | dnl AC_WITH_PKGCONFIG([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) | ||
2 | dnl Outputs: | ||
3 | dnl AC_SUBST: PKGCONFIG_PKGCONFIG PKGCONFIG_DIR | ||
4 | dnl AM_CONDTIONAL: HAVE_PKGCONFIG | ||
5 | AC_DEFUN([AC_WITH_PKGCONFIG],[ | ||
6 | PKGCONFIG_PKGCONFIG="" | ||
7 | PKGCONFIG_DIR="" | ||
8 | HAVE_PKGCONFIG="no" | ||
9 | EXPLICIT_PKGCONFIGDIR="no" | ||
10 | test -z "${WANT_PKGCONFIG}" && WANT_PKGCONFIG="" | ||
11 | AC_PATH_PROG([PKGCONFIG_PKGCONFIG],[pkg-config],[false]) | ||
12 | if test "${PKGCONFIG_PKGCONFIG}" != "false" ; then | ||
13 | AC_ARG_WITH([pkgconfigdir], | ||
14 | AC_HELP_STRING([--with-pkgconfigdir=dir],[Specify pkgconfig directory]), | ||
15 | [ | ||
16 | if test "${withval}" = "no" ; then | ||
17 | WANT_PKGCONFIG="no" | ||
18 | else | ||
19 | PKGCONFIG_DIR="${withval}" | ||
20 | EXPLICIT_PKGCONFIGDIR="yes" | ||
21 | fi | ||
22 | ],[ | ||
23 | AC_MSG_CHECKING([for pkgconfig directory]) | ||
24 | PKGCONFIG_DIR="`${PKGCONFIG_PKGCONFIG} --debug 2>&1 | grep '^Scanning'| head -n 1 | cut -d\' -f2-|cut -d\' -f1`" | ||
25 | AC_MSG_RESULT([${PKGCONFIG_DIR}]) | ||
26 | ] | ||
27 | ) | ||
28 | if test -d "${PKGCONFIG_DIR}" ; then | ||
29 | HAVE_PKGCONFIG=yes | ||
30 | AC_SUBST([PKGCONFIG_PKGCONFIG]) | ||
31 | AC_SUBST([PKGCONFIG_DIR]) | ||
32 | else | ||
33 | AC_MSG_NOTICE([unexistent pkgconfig directory: ${PKGCONFIG_DIR}]) | ||
34 | if test "${EXPLICIT_PKGCONFIGDIR}" = "yes" ; then | ||
35 | HAVE_PKGCONFIG=yes | ||
36 | AC_SUBST([PKGCONFIG_PKGCONFIG]) | ||
37 | AC_SUBST([PKGCONFIG_DIR]) | ||
38 | else | ||
39 | ifelse([$2], , :, [$2]) | ||
40 | fi | ||
41 | fi | ||
42 | fi | ||
43 | AM_CONDITIONAL([HAVE_PKGCONFIG],[test "${HAVE_PKGCONFIG}" = "yes"]) | ||
44 | ]) | ||
45 | |||
46 | dnl AC_WITH_DOXYGEN([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) | 1 | dnl AC_WITH_DOXYGEN([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) |
47 | dnl Outputs: | 2 | dnl Outputs: |
48 | dnl AC_SUBST: DOXYGEN HAVE_DOXYGEN | 3 | dnl AC_SUBST: DOXYGEN HAVE_DOXYGEN |
49 | dnl AM_CONDTIONAL: HAVE_DOXYGEN | 4 | dnl AM_CONDTIONAL: HAVE_DOXYGEN |
50 | AC_DEFUN([AC_WITH_DOXYGEN],[ | 5 | AC_DEFUN([AC_WITH_DOXYGEN],[ |
51 | HAVE_DOXYGEN="no" | 6 | HAVE_DOXYGEN="no" |
52 | AC_PATH_PROG([DOXYGEN],[doxygen],[false]) | 7 | AC_PATH_PROG([DOXYGEN],[doxygen],[false]) |
53 | if test "${DOXYGEN}" = "false" ; then | 8 | if test "${DOXYGEN}" = "false" ; then |
54 | ifelse([$2], , :, [$2]) | 9 | ifelse([$2], , :, [$2]) |
55 | else | 10 | else |
56 | HAVE_DOXYGEN="yes" | 11 | HAVE_DOXYGEN="yes" |
57 | AC_SUBST([DOXYGEN]) | 12 | AC_SUBST([DOXYGEN]) |
58 | $1 | 13 | $1 |
59 | fi | 14 | fi |
60 | AC_SUBST([HAVE_DOXYGEN]) | 15 | AC_SUBST([HAVE_DOXYGEN]) |
61 | AM_CONDITIONAL([HAVE_DOXYGEN],[test "${HAVE_DOXYGEN}" = "yes"]) | 16 | AM_CONDITIONAL([HAVE_DOXYGEN],[test "${HAVE_DOXYGEN}" = "yes"]) |
62 | ]) | 17 | ]) |
63 | 18 | ||
64 | dnl AC_WITH_DOT([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) | 19 | dnl AC_WITH_DOT([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) |
65 | dnl Outputs: | 20 | dnl Outputs: |
66 | dnl AC_SUBST: DOT HAVE_DOT | 21 | dnl AC_SUBST: DOT HAVE_DOT |
67 | dnl AM_CONDITIONAL: HAVE_DOT | 22 | dnl AM_CONDITIONAL: HAVE_DOT |
68 | AC_DEFUN([AC_WITH_DOT],[ | 23 | AC_DEFUN([AC_WITH_DOT],[ |
69 | HAVE_DOT="no" | 24 | HAVE_DOT="no" |
70 | AC_PATH_PROG([DOT],[dot],[false]) | 25 | AC_PATH_PROG([DOT],[dot],[false]) |
71 | if test "${DOT}" = "false" ; then | 26 | if test "${DOT}" = "false" ; then |
72 | ifelse([$2], , :, [$2]) | 27 | ifelse([$2], , :, [$2]) |
73 | else | 28 | else |
74 | HAVE_DOT="yes" | 29 | HAVE_DOT="yes" |
75 | AC_SUBST([DOT]) | 30 | AC_SUBST([DOT]) |
76 | $1 | 31 | $1 |
77 | fi | 32 | fi |
78 | AC_SUBST([HAVE_DOT]) | 33 | AC_SUBST([HAVE_DOT]) |
79 | AM_CONDITIONAL([HAVE_DOT],[test "${HAVE_DOT}" = "yes"]) | 34 | AM_CONDITIONAL([HAVE_DOT],[test "${HAVE_DOT}" = "yes"]) |
80 | ]) | 35 | ]) |
81 | 36 | ||
82 | dnl AC_WITH_PCRE([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) | 37 | dnl AC_WITH_PCRE([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) |
83 | dnl Outputs: | 38 | dnl Outputs: |
84 | dnl AC_SUBST: PCRE_CONFIG PCRE_PREFIX PCRE_EXEC_PREFIX | 39 | dnl AC_SUBST: PCRE_CONFIG PCRE_PREFIX PCRE_EXEC_PREFIX |
85 | dnl PCRE_VERSION PCRE_CFLAGS PCRE_LIBS | 40 | dnl PCRE_VERSION PCRE_CFLAGS PCRE_LIBS |
86 | dnl PCRE_LIBS_POSIX PCRE_CFLAGS_POSIX | 41 | dnl PCRE_LIBS_POSIX PCRE_CFLAGS_POSIX |
87 | dnl AC_DEFINE: HAVE_PCRE PCRE_VERSION | 42 | dnl AC_DEFINE: HAVE_PCRE PCRE_VERSION |
88 | dnl env: HAVE_PCRE=yes|no | 43 | dnl env: HAVE_PCRE=yes|no |
89 | AC_DEFUN([AC_WITH_PCRE],[ | 44 | AC_DEFUN([AC_WITH_PCRE],[ |
90 | HAVE_PCRE="no" | 45 | HAVE_PCRE="no" |
91 | PCRE_CONFIG="" | 46 | PCRE_CONFIG="" |
92 | PCRE_PREFIX="" | 47 | PCRE_PREFIX="" |
93 | PCRE_EXEC_PREFIX="" | 48 | PCRE_EXEC_PREFIX="" |
94 | PCRE_VERSION="" | 49 | PCRE_VERSION="" |
95 | PCRE_CFLAGS="" | 50 | PCRE_CFLAGS="" |
96 | PCRE_LIBS="" | 51 | PCRE_LIBS="" |
97 | PCRE_LOCATIONS="${PATH}:/usr/local/bin:/usr/bin" | 52 | PCRE_LOCATIONS="${PATH}:/usr/local/bin:/usr/bin" |
98 | test -z "$WANT_PCRE" && WANT_PCRE="" | 53 | test -z "$WANT_PCRE" && WANT_PCRE="" |
99 | AC_ARG_WITH([pcre], | 54 | AC_ARG_WITH([pcre], |
100 | AC_HELP_STRING([--with-pcre=location],[Look for pcre in specified locations]), | 55 | AC_HELP_STRING([--with-pcre=location],[Look for pcre in specified locations]), |
101 | [ | 56 | [ |
102 | if test "${withval}" = "no" ; then | 57 | if test "${withval}" = "no" ; then |
103 | WANT_PCRE="no" | 58 | WANT_PCRE="no" |
104 | else | 59 | else |
105 | if test -x "${withval}" ; then | 60 | if test -x "${withval}" ; then |
106 | PCRE_CONFIG="${withval}" | 61 | PCRE_CONFIG="${withval}" |
107 | elif test -x "${withval}/pcre-config" ; then | 62 | elif test -x "${withval}/pcre-config" ; then |
108 | PCRE_CONFIG="${withval}/pcre-config" | 63 | PCRE_CONFIG="${withval}/pcre-config" |
109 | elif test -x "${withval}/bin/pcre-config" ; then | 64 | elif test -x "${withval}/bin/pcre-config" ; then |
diff --git a/configure.ac b/configure.ac index 53e22ba..4f9b6c2 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,78 +1,78 @@ | |||
1 | AC_INIT([libopkele], [0.3], [libopkele-bugs@klever.net]) | 1 | AC_INIT([libopkele], [0.3], [libopkele-bugs@klever.net]) |
2 | AC_CONFIG_SRCDIR([include/opkele/opkele-config.h]) | 2 | AC_CONFIG_SRCDIR([include/opkele/opkele-config.h]) |
3 | AC_CONFIG_HEADERS([config.h include/opkele/acconfig.h]) | 3 | AC_CONFIG_HEADERS([config.h include/opkele/acconfig.h]) |
4 | AM_INIT_AUTOMAKE([dist-bzip2]) | 4 | AM_INIT_AUTOMAKE([dist-bzip2]) |
5 | 5 | ||
6 | AC_PROG_INSTALL | 6 | AC_PROG_INSTALL |
7 | AC_PROG_CXX | 7 | AC_PROG_CXX |
8 | AC_PROG_CC | 8 | AC_PROG_CC |
9 | AC_PROG_LIBTOOL | 9 | AC_PROG_LIBTOOL |
10 | PKG_PROG_PKG_CONFIG | ||
10 | 11 | ||
11 | AC_HEADER_STDC | 12 | AC_HEADER_STDC |
12 | 13 | ||
13 | AC_PATH_PROG([XSLTPROC],[xsltproc],[true]) | 14 | AC_PATH_PROG([XSLTPROC],[xsltproc],[true]) |
14 | AC_WITH_PKGCONFIG | ||
15 | 15 | ||
16 | PKG_CHECK_MODULES([OPENSSL],[openssl],,[ | 16 | PKG_CHECK_MODULES([OPENSSL],[openssl],,[ |
17 | AC_MSG_ERROR([no openssl library found. get one from http://www.openssl.org/]) | 17 | AC_MSG_ERROR([no openssl library found. get one from http://www.openssl.org/]) |
18 | ]) | 18 | ]) |
19 | 19 | ||
20 | WANT_KONFORKA="yes" | 20 | WANT_KONFORKA="yes" |
21 | AC_ARG_ENABLE([konforka], | 21 | AC_ARG_ENABLE([konforka], |
22 | AC_HELP_STRING([--disable-konforka],[do not use konforka library (default: use if found)]), | 22 | AC_HELP_STRING([--disable-konforka],[do not use konforka library (default: use if found)]), |
23 | [ | 23 | [ |
24 | test "${enableval}" = "no" && WANT_KONFORKA="no" | 24 | test "${enableval}" = "no" && WANT_KONFORKA="no" |
25 | ] | 25 | ] |
26 | ) | 26 | ) |
27 | if test "${WANT_KONFORKA}" = "yes" ; then | 27 | if test "${WANT_KONFORKA}" = "yes" ; then |
28 | PKG_CHECK_MODULES([KONFORKA],[konforka],[ | 28 | PKG_CHECK_MODULES([KONFORKA],[konforka],[ |
29 | AC_SUBST([KONFORKA_CFLAGS]) | 29 | AC_SUBST([KONFORKA_CFLAGS]) |
30 | AC_SUBST([KONFORKA_LIBS]) | 30 | AC_SUBST([KONFORKA_LIBS]) |
31 | AC_DEFINE([HAVE_KONFORKA],,[defined in presence of konforka library]) | 31 | AC_DEFINE([HAVE_KONFORKA],,[defined in presence of konforka library]) |
32 | AC_DEFINE([OPKELE_HAVE_KONFORKA],,[defined in presence of konforka library]) | 32 | AC_DEFINE([OPKELE_HAVE_KONFORKA],,[defined in presence of konforka library]) |
33 | AC_SUBST([KONFORKA_KONFORKA],[konforka]) | 33 | AC_SUBST([KONFORKA_KONFORKA],[konforka]) |
34 | ],[true]) | 34 | ],[true]) |
35 | fi | 35 | fi |
36 | 36 | ||
37 | WANT_DOXYGEN="yes" | 37 | WANT_DOXYGEN="yes" |
38 | AC_ARG_ENABLE([doxygen], | 38 | AC_ARG_ENABLE([doxygen], |
39 | AC_HELP_STRING([--disable-doxygen],[do not generate documentation]), | 39 | AC_HELP_STRING([--disable-doxygen],[do not generate documentation]), |
40 | [ | 40 | [ |
41 | test "${enableval}" = "no" && WANT_DOXYGEN="no" | 41 | test "${enableval}" = "no" && WANT_DOXYGEN="no" |
42 | ] | 42 | ] |
43 | ) | 43 | ) |
44 | if test "${WANT_DOXYGEN}" = "yes" ; then | 44 | if test "${WANT_DOXYGEN}" = "yes" ; then |
45 | AC_WITH_DOXYGEN | 45 | AC_WITH_DOXYGEN |
46 | AC_WITH_DOT | 46 | AC_WITH_DOT |
47 | else | 47 | else |
48 | AM_CONDITIONAL([HAVE_DOXYGEN],[false]) | 48 | AM_CONDITIONAL([HAVE_DOXYGEN],[false]) |
49 | AM_CONDITIONAL([HAVE_DOT],[false]) | 49 | AM_CONDITIONAL([HAVE_DOT],[false]) |
50 | fi | 50 | fi |
51 | 51 | ||
52 | LIBCURL_CHECK_CONFIG(,,,[ | 52 | LIBCURL_CHECK_CONFIG(,,,[ |
53 | AC_MSG_ERROR([no required libcurl library. get one from http://curl.haxx.se/]) | 53 | AC_MSG_ERROR([no required libcurl library. get one from http://curl.haxx.se/]) |
54 | ]) | 54 | ]) |
55 | 55 | ||
56 | PKG_CHECK_MODULES([PCRE],[libpcre],,[ | 56 | PKG_CHECK_MODULES([PCRE],[libpcre],,[ |
57 | AC_MSG_ERROR([no libpcre found, go get it at http://www.pcre.org/]) | 57 | AC_MSG_ERROR([no libpcre found, go get it at http://www.pcre.org/]) |
58 | ]) | 58 | ]) |
59 | 59 | ||
60 | curl_ssl_verify_host="true" | 60 | curl_ssl_verify_host="true" |
61 | AC_ARG_ENABLE([ssl-verify-host], | 61 | AC_ARG_ENABLE([ssl-verify-host], |
62 | AC_HELP_STRING([--disable-ssl-verify-host],[disable cURL cert/host relationships verification]), | 62 | AC_HELP_STRING([--disable-ssl-verify-host],[disable cURL cert/host relationships verification]), |
63 | [ test "${enableval}" = "no" && curl_ssl_verify_host="false" ] | 63 | [ test "${enableval}" = "no" && curl_ssl_verify_host="false" ] |
64 | ) | 64 | ) |
65 | ${curl_ssl_verify_host} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYHOST],,[defined if cURL is not to verify cert/host]) | 65 | ${curl_ssl_verify_host} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYHOST],,[defined if cURL is not to verify cert/host]) |
66 | 66 | ||
67 | curl_ssl_verify_peer="true" | 67 | curl_ssl_verify_peer="true" |
68 | AC_ARG_ENABLE([ssl-verify-peer], | 68 | AC_ARG_ENABLE([ssl-verify-peer], |
69 | AC_HELP_STRING([--disable-ssl-verify-peer],[disable cURL cert validity verification]), | 69 | AC_HELP_STRING([--disable-ssl-verify-peer],[disable cURL cert validity verification]), |
70 | [ test "${enableval}" = "no" && curl_ssl_verify_peer="false" ] | 70 | [ test "${enableval}" = "no" && curl_ssl_verify_peer="false" ] |
71 | ) | 71 | ) |
72 | ${curl_ssl_verify_peer} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYPEER],,[defined if cURL is not to verify cert validity]) | 72 | ${curl_ssl_verify_peer} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYPEER],,[defined if cURL is not to verify cert validity]) |
73 | 73 | ||
74 | postels_law=true | 74 | postels_law=true |
75 | AC_ARG_ENABLE([postels-law], | 75 | AC_ARG_ENABLE([postels-law], |
76 | AC_HELP_STRING([--disable-postels-law],[Be strict, do not adhere to Postel's Law ("be conservative in what you do, be liberal in what you accept from others", RFC 793)]), | 76 | AC_HELP_STRING([--disable-postels-law],[Be strict, do not adhere to Postel's Law ("be conservative in what you do, be liberal in what you accept from others", RFC 793)]), |
77 | [ test "${enableval}" = "no" && postels_law=false ] | 77 | [ test "${enableval}" = "no" && postels_law=false ] |
78 | ) | 78 | ) |