projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4320ac5
)
build system: Some cosmetic fixes for the libupsclient.
author
Florian Forster
<octo@huhu.verplant.org>
Tue, 4 Sep 2007 08:14:22 +0000
(10:14 +0200)
committer
Florian Forster
<octo@huhu.verplant.org>
Tue, 4 Sep 2007 08:14:22 +0000
(10:14 +0200)
configure.in
patch
|
blob
|
history
diff --git
a/configure.in
b/configure.in
index
d02c12f
..
f291956
100644
(file)
--- a/
configure.in
+++ b/
configure.in
@@
-1271,7
+1271,12
@@
AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@],
with_libupsclient="yes"
if "x$withval" != "xyes"
then
with_libupsclient="yes"
if "x$withval" != "xyes"
then
- with_upsclient_config="$withval/bin/libupsclient-config"
+ if test -x "$withval"
+ then
+ with_upsclient_config="$withval"
+ else
+ with_upsclient_config="$withval/bin/libupsclient-config"
+ fi
fi
fi
],
fi
fi
],
@@
-1285,25
+1290,30
@@
then
if test $upsclient_config_status -ne 0
then
if test $upsclient_config_status -ne 0
then
- with_libupsclient="no"
+ with_libupsclient="no
($with_upsclient_config failed)
"
fi
fi
if test "x$with_libupsclient" = "xyes"
then
fi
fi
if test "x$with_libupsclient" = "xyes"
then
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $with_upsclient_cflags"
+
+ AC_CHECK_HEADERS(upsclient.h, [], [with_libupsclient="no (upsclient.h not found)"])
+
+ CFLAGS="$SAVE_CFLAGS"
+fi
+if test "x$with_libupsclient" = "xyes"
+then
with_upsclient_libs=`$with_upsclient_config --libs 2>/dev/null`
upsclient_config_status=$?
if test $upsclient_config_status -ne 0
then
with_upsclient_libs=`$with_upsclient_config --libs 2>/dev/null`
upsclient_config_status=$?
if test $upsclient_config_status -ne 0
then
- with_libupsclient="no"
+ with_libupsclient="no
($with_upsclient_config failed)
"
fi
fi
if test "x$with_libupsclient" = "xyes"
then
fi
fi
if test "x$with_libupsclient" = "xyes"
then
- CFLAGS_ORIG=$CFLAGS
- CFLAGS="$CFLAGS $with_upsclient_cflags"
- LDFLAGS_ORIG=$LDFLAGS
- LDFLAGS="$LDFLAGS $with_upsclient_libs"
AC_CHECK_LIB(upsclient, upscli_connect,
[
BUILD_WITH_LIBUPSCLIENT_CFLAGS="$with_upsclient_cflags"
AC_CHECK_LIB(upsclient, upscli_connect,
[
BUILD_WITH_LIBUPSCLIENT_CFLAGS="$with_upsclient_cflags"
@@
-1312,14
+1322,8
@@
then
AC_SUBST(BUILD_WITH_LIBUPSCLIENT_LIBS)
],
[
AC_SUBST(BUILD_WITH_LIBUPSCLIENT_LIBS)
],
[
- with_libupsclient="no"
- ])
- CFLAGS=$CFLAGS_ORIG
- LDFLAGS=$LDFLAGS_ORIG
-fi
-if test "x$with_libupsclient" = "xyes"
-then
- AC_DEFINE(HAVE_LIBUPSCLIENT, 1, [Define to 1 if you have the upsclient library (-lupsclient).])
+ with_libupsclient="no (symbol 'upscli_connect' not found)"
+ ], [$with_upsclient_libs])
fi
if test "x$with_libupsclient" = "xyes"
then
fi
if test "x$with_libupsclient" = "xyes"
then