summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c1ddaf5)
raw | patch | inline | side by side (parent: c1ddaf5)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 27 May 2017 12:51:11 +0000 (14:51 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 27 May 2017 12:51:11 +0000 (14:51 +0200) |
configure.ac | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index 102933c4b1d37777f2f478346e8ffc4f0aa59ccb..68ff2e44e6b910385b3eabc6afe814c39a993f01 100644 (file)
--- a/configure.ac
+++ b/configure.ac
# }}}
# --with-libpqos {{{
-with_libpqos_cppflags=""
-with_libpqos_ldflags=""
-AC_ARG_WITH(libpqos, [AS_HELP_STRING([--with-libpqos@<:@=PREFIX@:>@], [Path to libpqos.])],
-[
- if test "x$withval" != "xno" && test "x$withval" != "xyes"
- then
- with_libpqos_cppflags="-I$withval/include"
- with_libpqos_ldflags="-L$withval/lib"
- with_libpqos="yes"
- else
- with_libpqos="$withval"
- fi
-],
-[
- with_libpqos="yes"
-])
-if test "x$with_libpqos" = "xyes"
-then
- SAVE_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags"
+AC_ARG_WITH([libpqos],
+ [AS_HELP_STRING([--with-libpqos@<:@=PREFIX@:>@], [Path to libpqos.])],
+ [
+ if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
+ with_libpqos_cppflags="-I$withval/include"
+ with_libpqos_ldflags="-L$withval/lib"
+ with_libpqos="yes"
+ else
+ with_libpqos="$withval"
+ fi
+ ],
+ [with_libpqos="yes"]
+)
- AC_CHECK_HEADERS(pqos.h, [with_libpqos="yes"], [with_libpqos="no (pqos.h not found)"])
+if test "x$with_libpqos" = "xyes"; then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags"
- CPPFLAGS="$SAVE_CPPFLAGS"
+ AC_CHECK_HEADERS([pqos.h],
+ [with_libpqos="yes"],
+ [with_libpqos="no (pqos.h not found)"]
+ )
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
fi
-if test "x$with_libpqos" = "xyes"
-then
- SAVE_CPPFLAGS="$CPPFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
- CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags"
- LDFLAGS="$LDFLAGS $with_libpqos_ldflags"
- AC_CHECK_LIB(pqos, pqos_init, [with_libpqos="yes"], [with_libpqos="no (Can't find libpqos)"])
+if test "x$with_libpqos" = "xyes"; then
+ SAVE_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $with_libpqos_ldflags"
+
+ AC_CHECK_LIB([pqos], [pqos_init],
+ [with_libpqos="yes"],
+ [with_libpqos="no (Can't find libpqos)"]
+ )
- CPPFLAGS="$SAVE_CPPFLAGS"
- LDFLAGS="$SAVE_LDFLAGS"
+ LDFLAGS="$SAVE_LDFLAGS"
fi
-if test "x$with_libpqos" = "xyes"
-then
+
+if test "x$with_libpqos" = "xyes"; then
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags"
- AC_RUN_IFELSE([AC_LANG_PROGRAM(
- [[#include <pqos.h>]],
- [[return !(PQOS_VERSION >= 106)]])],
- [with_libpqos="yes"], [with_libpqos="no (pqos library version 1.06 or higher is required)"])
+ AC_RUN_IFELSE(
+ [
+ AC_LANG_PROGRAM(
+ [[
+ #include <pqos.h>
+ ]],
+ [[
+ return !(PQOS_VERSION >= 106)
+ ]]
+ )
+ ],
+ [with_libpqos="yes"],
+ [with_libpqos="no (pqos library version 1.06 or higher is required)"]
+ )
+
CPPFLAGS="$SAVE_CPPFLAGS"
fi
-if test "x$with_libpqos" = "xyes"
-then
- BUILD_WITH_LIBPQOS_CPPFLAGS="$with_libpqos_cppflags"
- BUILD_WITH_LIBPQOS_LDFLAGS="$with_libpqos_ldflags"
- BUILD_WITH_LIBPQOS_LIBS="-lpqos"
- AC_SUBST(BUILD_WITH_LIBPQOS_CPPFLAGS)
- AC_SUBST(BUILD_WITH_LIBPQOS_LDFLAGS)
- AC_SUBST(BUILD_WITH_LIBPQOS_LIBS)
+
+if test "x$with_libpqos" = "xyes"; then
+ BUILD_WITH_LIBPQOS_CPPFLAGS="$with_libpqos_cppflags"
+ BUILD_WITH_LIBPQOS_LDFLAGS="$with_libpqos_ldflags"
+ BUILD_WITH_LIBPQOS_LIBS="-lpqos"
fi
+
+AC_SUBST([BUILD_WITH_LIBPQOS_CPPFLAGS])
+AC_SUBST([BUILD_WITH_LIBPQOS_LDFLAGS])
+AC_SUBST([BUILD_WITH_LIBPQOS_LIBS])
# }}}
# --with-libprotobuf {{{