-rw-r--r-- | configure.ac | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index c5759b0..283757f 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,128 +1,128 @@ | |||
1 | AC_INIT([libopkele], [0.3.2], [libopkele-bugs@klever.net]) | 1 | AC_INIT([libopkele], [0.3.2], [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 | PKG_PROG_PKG_CONFIG |
11 | 11 | ||
12 | AC_HEADER_STDC | 12 | AC_HEADER_STDC |
13 | 13 | ||
14 | AC_PATH_PROG([XSLTPROC],[xsltproc],[true]) | 14 | AC_PATH_PROG([XSLTPROC],[xsltproc],[true]) |
15 | 15 | ||
16 | AC_MSG_CHECKING([for source tree version]) | 16 | AC_MSG_CHECKING([for source tree version]) |
17 | if headrev=$(cd $srcdir && git rev-parse --verify HEAD 2>/dev/null) ; then | 17 | if headrev=$(cd $srcdir && git rev-parse --verify HEAD 2>/dev/null) ; then |
18 | PACKAGE_SRC_VERSION="$(cd $srcdir && git describe --tags $headrev)" | 18 | PACKAGE_SRC_VERSION="$(cd $srcdir && git describe --tags $headrev)" |
19 | test "$PACKAGE_SRC_VERSION" = "$PACKAGE_VERSION" \ | 19 | test "$PACKAGE_SRC_VERSION" = "$PACKAGE_VERSION" \ |
20 | -o "${PACKAGE_SRC_VERSION#${PACKAGE_VERSION}-}" != "$PACKAGE_SRC_VERSION" || PACKAGE_SRC_VERSION="${PACKAGE_VERSION}:${PACKAGE_SRC_VERSION}" | 20 | -o "${PACKAGE_SRC_VERSION#${PACKAGE_VERSION}-}" != "$PACKAGE_SRC_VERSION" || PACKAGE_SRC_VERSION="${PACKAGE_VERSION}:${PACKAGE_SRC_VERSION}" |
21 | ( cd $srcdir && git diff-index $headrev | read dirt ) && PACKAGE_SRC_VERSION="${PACKAGE_SRC_VERSION}-dirty" | 21 | ( cd $srcdir && git diff-index $headrev | read dirt ) && PACKAGE_SRC_VERSION="${PACKAGE_SRC_VERSION}-dirty" |
22 | else | 22 | else |
23 | PACKAGE_SRC_VERSION="$PACKAGE_VERSION" | 23 | PACKAGE_SRC_VERSION="$PACKAGE_VERSION" |
24 | fi | 24 | fi |
25 | AC_MSG_RESULT([$PACKAGE_SRC_VERSION]) | 25 | AC_MSG_RESULT([$PACKAGE_SRC_VERSION]) |
26 | AC_SUBST([PACKAGE_SRC_VERSION]) | 26 | AC_SUBST([PACKAGE_SRC_VERSION]) |
27 | AC_DEFINE_UNQUOTED([PACKAGE_SRC_VERSION],["$PACKAGE_SRC_VERSION"],[more or less precise source tree version]) | 27 | AC_DEFINE_UNQUOTED([PACKAGE_SRC_VERSION],["$PACKAGE_SRC_VERSION"],[more or less precise source tree version]) |
28 | 28 | ||
29 | PKG_CHECK_MODULES([OPENSSL],[openssl],,[ | 29 | PKG_CHECK_MODULES([OPENSSL],[openssl],,[ |
30 | AC_MSG_ERROR([no openssl library found. get one from http://www.openssl.org/]) | 30 | AC_MSG_ERROR([no openssl library found. get one from http://www.openssl.org/]) |
31 | ]) | 31 | ]) |
32 | 32 | ||
33 | WANT_KONFORKA="yes" | 33 | WANT_KONFORKA="yes" |
34 | AC_ARG_ENABLE([konforka], | 34 | AC_ARG_ENABLE([konforka], |
35 | AC_HELP_STRING([--disable-konforka],[do not use konforka library (default: use if found)]), | 35 | AC_HELP_STRING([--disable-konforka],[do not use konforka library (default: use if found)]), |
36 | [ | 36 | [ |
37 | test "${enableval}" = "no" && WANT_KONFORKA="no" | 37 | test "${enableval}" = "no" && WANT_KONFORKA="no" |
38 | ] | 38 | ] |
39 | ) | 39 | ) |
40 | if test "${WANT_KONFORKA}" = "yes" ; then | 40 | if test "${WANT_KONFORKA}" = "yes" ; then |
41 | PKG_CHECK_MODULES([KONFORKA],[konforka],[ | 41 | PKG_CHECK_MODULES([KONFORKA],[konforka],[ |
42 | AC_SUBST([KONFORKA_CFLAGS]) | 42 | AC_SUBST([KONFORKA_CFLAGS]) |
43 | AC_SUBST([KONFORKA_LIBS]) | 43 | AC_SUBST([KONFORKA_LIBS]) |
44 | AC_DEFINE([HAVE_KONFORKA],,[defined in presence of konforka library]) | 44 | AC_DEFINE([HAVE_KONFORKA],,[defined in presence of konforka library]) |
45 | AC_DEFINE([OPKELE_HAVE_KONFORKA],,[defined in presence of konforka library]) | 45 | AC_DEFINE([OPKELE_HAVE_KONFORKA],,[defined in presence of konforka library]) |
46 | AC_SUBST([KONFORKA_KONFORKA],[konforka]) | 46 | AC_SUBST([KONFORKA_KONFORKA],[konforka]) |
47 | ],[true]) | 47 | ],[true]) |
48 | fi | 48 | fi |
49 | 49 | ||
50 | WANT_DOXYGEN="yes" | 50 | WANT_DOXYGEN="yes" |
51 | AC_ARG_ENABLE([doxygen], | 51 | AC_ARG_ENABLE([doxygen], |
52 | AC_HELP_STRING([--disable-doxygen],[do not generate documentation]), | 52 | AC_HELP_STRING([--disable-doxygen],[do not generate documentation]), |
53 | [ | 53 | [ |
54 | test "${enableval}" = "no" && WANT_DOXYGEN="no" | 54 | test "${enableval}" = "no" && WANT_DOXYGEN="no" |
55 | ] | 55 | ] |
56 | ) | 56 | ) |
57 | if test "${WANT_DOXYGEN}" = "yes" ; then | 57 | if test "${WANT_DOXYGEN}" = "yes" ; then |
58 | AC_WITH_DOXYGEN | 58 | AC_WITH_DOXYGEN |
59 | AC_WITH_DOT | 59 | AC_WITH_DOT |
60 | else | 60 | else |
61 | AM_CONDITIONAL([HAVE_DOXYGEN],[false]) | 61 | AM_CONDITIONAL([HAVE_DOXYGEN],[false]) |
62 | AM_CONDITIONAL([HAVE_DOT],[false]) | 62 | AM_CONDITIONAL([HAVE_DOT],[false]) |
63 | fi | 63 | fi |
64 | 64 | ||
65 | LIBCURL_CHECK_CONFIG(,,,[ | 65 | LIBCURL_CHECK_CONFIG(,,,[ |
66 | AC_MSG_ERROR([no required libcurl library. get one from http://curl.haxx.se/]) | 66 | AC_MSG_ERROR([no required libcurl library. get one from http://curl.haxx.se/]) |
67 | ]) | 67 | ]) |
68 | 68 | ||
69 | if test -n "$PCRE_LIBS" -a -n "$PCRE_CFLAGS" ; then | 69 | if test -n "$PCRE_LIBS" -a -n "$PCRE_CFLAGS" ; then |
70 | AC_SUBST([PCRE_CFLAGS]) | 70 | AC_SUBST([PCRE_CFLAGS]) |
71 | AC_SUBST([PCRE_LIBS]) | 71 | AC_SUBST([PCRE_LIBS]) |
72 | : | 72 | : |
73 | else | 73 | else |
74 | PKG_CHECK_MODULES([PCRE],[libpcre],,[ | 74 | PKG_CHECK_MODULES([PCRE],[libpcre],,[ |
75 | AC_MSG_ERROR([no libpcre found, go get it at http://www.pcre.org/]) | 75 | AC_MSG_ERROR([no libpcre found, go get it at http://www.pcre.org/]) |
76 | ]) | 76 | ]) |
77 | fi | 77 | fi |
78 | 78 | ||
79 | curl_ssl_verify_host="true" | 79 | curl_ssl_verify_host="true" |
80 | AC_ARG_ENABLE([ssl-verify-host], | 80 | AC_ARG_ENABLE([ssl-verify-host], |
81 | AC_HELP_STRING([--disable-ssl-verify-host],[disable cURL cert/host relationships verification]), | 81 | AC_HELP_STRING([--disable-ssl-verify-host],[disable cURL cert/host relationships verification]), |
82 | [ test "${enableval}" = "no" && curl_ssl_verify_host="false" ] | 82 | [ test "${enableval}" = "no" && curl_ssl_verify_host="false" ] |
83 | ) | 83 | ) |
84 | ${curl_ssl_verify_host} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYHOST],,[defined if cURL is not to verify cert/host]) | 84 | ${curl_ssl_verify_host} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYHOST],,[defined if cURL is not to verify cert/host]) |
85 | 85 | ||
86 | curl_ssl_verify_peer="true" | 86 | curl_ssl_verify_peer="true" |
87 | AC_ARG_ENABLE([ssl-verify-peer], | 87 | AC_ARG_ENABLE([ssl-verify-peer], |
88 | AC_HELP_STRING([--disable-ssl-verify-peer],[disable cURL cert validity verification]), | 88 | AC_HELP_STRING([--disable-ssl-verify-peer],[disable cURL cert validity verification]), |
89 | [ test "${enableval}" = "no" && curl_ssl_verify_peer="false" ] | 89 | [ test "${enableval}" = "no" && curl_ssl_verify_peer="false" ] |
90 | ) | 90 | ) |
91 | ${curl_ssl_verify_peer} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYPEER],,[defined if cURL is not to verify cert validity]) | 91 | ${curl_ssl_verify_peer} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYPEER],,[defined if cURL is not to verify cert validity]) |
92 | 92 | ||
93 | postels_law=true | 93 | postels_law=true |
94 | AC_ARG_ENABLE([postels-law], | 94 | AC_ARG_ENABLE([postels-law], |
95 | 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)]), | 95 | 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)]), |
96 | [ test "${enableval}" = "no" && postels_law=false ] | 96 | [ test "${enableval}" = "no" && postels_law=false ] |
97 | ) | 97 | ) |
98 | $postels_law && AC_DEFINE([POSTELS_LAW],,[defined if we want to adhere to Postel's Law]) | 98 | $postels_law && AC_DEFINE([POSTELS_LAW],,[defined if we want to adhere to Postel's Law]) |
99 | 99 | ||
100 | AC_DEFINE_UNQUOTED([OPKELE_SRC_DIR],["$PWD"],[source directory]) | 100 | AC_DEFINE_UNQUOTED([OPKELE_SRC_DIR],["$PWD"],[source directory]) |
101 | 101 | ||
102 | nitpick=false | 102 | nitpick=false |
103 | AC_ARG_ENABLE([nitpicking], | 103 | AC_ARG_ENABLE([nitpicking], |
104 | AC_HELP_STRING([--enable-nitpicking],[make compiler somewhat overly fastidious about the code it deals with]), | 104 | AC_HELP_STRING([--enable-nitpicking],[make compiler somewhat overly fastidious about the code it deals with]), |
105 | [ test "$enableval" = "no" || nitpick=true ] | 105 | [ test "$enableval" = "no" || nitpick=true ] |
106 | ) | 106 | ) |
107 | if $nitpick ; then | 107 | if $nitpick ; then |
108 | CPP_NITPICK="-pedantic -Wall -Wextra -Wundef -Wshadow \ | 108 | CPP_NITPICK="-pedantic -Wall -Wextra -Wundef -Wshadow \ |
109 | -Wunsafe-loop-optimizations -Wconversion -Wmissing-declarations \ | 109 | -Wunsafe-loop-optimizations -Wconversion -Wmissing-format-attribute \ |
110 | -Wmissing-format-attribute -Wredundant-decls" | 110 | -Wredundant-decls -ansi" |
111 | # -Wlogical-op -Wmissing-noreturn | 111 | # -Wlogical-op -Wmissing-noreturn |
112 | C_NITPICK="$CPP_NITPICK" | 112 | C_NITPICK="$CPP_NITPICK" |
113 | CXX_NITPICK="$C_NITPICK" | 113 | CXX_NITPICK="$C_NITPICK" |
114 | 114 | ||
115 | CPPFLAGS="$CPPFLAGS $CPP_NITPICK" | 115 | CPPFLAGS="$CPPFLAGS $CPP_NITPICK" |
116 | CFLAGS="$CFLAGS $C_NITPICK" | 116 | CFLAGS="$CFLAGS $C_NITPICK" |
117 | CXXFLAGS="$CXXFLAGS $CXX_NITPICK" | 117 | CXXFLAGS="$CXXFLAGS $CXX_NITPICK" |
118 | fi | 118 | fi |
119 | 119 | ||
120 | AC_CONFIG_FILES([ | 120 | AC_CONFIG_FILES([ |
121 | Makefile | 121 | Makefile |
122 | libopkele.pc | 122 | libopkele.pc |
123 | Doxyfile | 123 | Doxyfile |
124 | include/Makefile | 124 | include/Makefile |
125 | lib/Makefile | 125 | lib/Makefile |
126 | test/Makefile | 126 | test/Makefile |
127 | ]) | 127 | ]) |
128 | AC_OUTPUT | 128 | AC_OUTPUT |