diff options
author | Giacomo Bagnoli <g.bagnoli@asidev.com> | 2010-03-04 14:27:04 +0100 |
---|---|---|
committer | Giacomo Bagnoli <g.bagnoli@asidev.com> | 2010-03-04 14:27:04 +0100 |
commit | 33f5fec2909f1b6312cb392eb21aeead9c0ed6f1 (patch) | |
tree | a4968ebe1c1bf8264167403d3427b1fcdb393ec2 /configure.ac | |
parent | f0c050a4b2c6f4f46f49afec00469649bbb58fad (diff) |
Better support for autodetection of AQuoSA framework qres library in configure script
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index 8b84178..5fc8ef7 100644 --- a/configure.ac +++ b/configure.ac @@ -10,17 +10,26 @@ AC_HEADER_STDC AC_CHECK_LIB([pthread], [pthread_create]) AC_CHECK_LIB([m], [round]) AC_CHECK_LIB([rt], [clock_gettime]) -AC_ARG_ENABLE([lockmem], AS_HELP_STRING([--enable-lockmem],[lock all memory to avoid it being swapped out])) -AC_ARG_ENABLE([aquosa], AS_HELP_STRING([--enable-aquosa], [Add support for the AQuoSA framework])) +AC_ARG_WITH([lockmem], AS_HELP_STRING([--enable-lockmem],[lock all memory to avoid it being swapped out])) AS_IF([test "x$enable_lockmem" = "xyes"], [ AC_DEFINE([LOCKMEM], [], [lock all memory to avoid it being swapout]) ]) -AS_IF([test "x$enable_aquosa" = "xyes"], [ - AC_CHECK_LIB([qreslib], [qres_init]) - AC_DEFINE([AQUOSA],[], [AQuoSA framework support]) -]) +AC_ARG_WITH([aquosa], + [AS_HELP_STRING([--enable-aquosa], + [Add support for the AQuoSA framework])], + [], + [with_aquosa=check]) +LIBQRESLIB= +AS_IF([test "x$with_aquosa" != xno], + [AC_CHECK_LIB([qreslib], [qres_init], + [AC_SUBST([LIBQRESLIB], ["-lqreslib"]) + AC_DEFINE([AQUOSA],[1], [Define if you have qreslib]) + ], + [if test "x$with_aquosa" != xcheck; then + AC_MSG_FAILURE([AQuoSA library not found]) + fi + ], -lqreslib)]) AC_CONFIG_HEADERS([src/config.h]) AC_CONFIG_FILES([Makefile src/Makefile README:README.in INSTALL:INSTALL.in]) AC_OUTPUT - |