summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5c3efb1)
raw | patch | inline | side by side (parent: 5c3efb1)
author | Florian Forster <octo@noris.net> | |
Tue, 1 Apr 2008 12:11:35 +0000 (14:11 +0200) | ||
committer | Florian Forster <octo@noris.net> | |
Tue, 1 Apr 2008 12:11:35 +0000 (14:11 +0200) |
When checking for <upsclient.h> (and the headers of a few other libraries) the
library specific CFLAGS were added to the global CFLAGS variable. This variable
is used when checking for ``header usability'', but not when checking for
``header presence'' for some reason.
This commit uses the global CPPFLAGS variable instead, which is used in both
checks. Libraries that benefit from this commit are:
- libcurl,
- libmysql(client),
- libnetsnmp,
- libupsclient.
Resolves #6
library specific CFLAGS were added to the global CFLAGS variable. This variable
is used when checking for ``header usability'', but not when checking for
``header presence'' for some reason.
This commit uses the global CPPFLAGS variable instead, which is used in both
checks. Libraries that benefit from this commit are:
- libcurl,
- libmysql(client),
- libnetsnmp,
- libupsclient.
Resolves #6
configure.in | patch | blob | history |
diff --git a/configure.in b/configure.in
index e68d97e2569b4d447f82aa08ecb472d1247ee96e..db344978d38a27dff2adecdc2f06f4c281176a16 100644 (file)
--- a/configure.in
+++ b/configure.in
then
with_libcurl="no ($with_curl_config failed)"
else
- SAVE_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS $with_curl_cflags"
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_curl_cflags"
AC_CHECK_HEADERS(curl/curl.h, [], [with_libcurl="no (curl/curl.h not found)"], [])
- CFLAGS="$SAVE_CFLAGS"
+ CPPFLAGS="$SAVE_CPPFLAGS"
fi
fi
if test "x$with_libcurl" = "xyes"
then
with_libmysql="no"
else
- SAVE_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS $with_mysql_cflags"
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_mysql_cflags"
AC_CHECK_HEADERS(mysql/mysql.h, [], [with_libmysql="no (mysql/mysql.h not found)"], [])
- CFLAGS="$SAVE_CFLAGS"
+ CPPFLAGS="$SAVE_CPPFLAGS"
fi
fi
if test "x$with_libmysql" = "xyes"
then
with_libnetsnmp="no ($with_snmp_config failed)"
else
- SAVE_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS $with_snmp_cflags"
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_snmp_cflags"
AC_CHECK_HEADERS(net-snmp/net-snmp-config.h, [], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"])
- CFLAGS="$SAVE_CFLAGS"
+ CPPFLAGS="$SAVE_CPPFLAGS"
fi
fi
if test "x$with_libnetsnmp" = "xyes"
fi
if test "x$with_libupsclient" = "xyes"
then
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $with_upsclient_cflags"
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_upsclient_cflags"
AC_CHECK_HEADERS(upsclient.h, [], [with_libupsclient="no (upsclient.h not found)"])
- CFLAGS="$SAVE_CFLAGS"
+ CPPFLAGS="$SAVE_CPPFLAGS"
fi
if test "x$with_libupsclient" = "xyes"
then
fi
if test "x$with_libupsclient" = "xyes"
then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_upsclient_cflags"
+
AC_CHECK_TYPES([UPSCONN_t, UPSCONN], [], [],
[#include <stdlib.h>
#include <stdio.h>
#include <upsclient.h>])
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
fi
AM_CONDITIONAL(BUILD_WITH_LIBUPSCLIENT, test "x$with_libupsclient" = "xyes")