mirror of
https://github.com/php-win-ext/pecl-processing-rrd.git
synced 2026-03-24 00:52:13 +01:00
config - simpler lib searching #22683
git-svn-id: http://svn.php.net/repository/pecl/rrd/trunk@317361 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
37
config.m4
37
config.m4
@@ -17,43 +17,26 @@ fi
|
||||
|
||||
if test "$PHP_RRD" != "no"; then
|
||||
if test "$PHP_RRD" != "yes"; then
|
||||
AC_MSG_CHECKING(if rrdtool specified path is valid)
|
||||
if test -r $PHP_RRD/include/rrd.h && test -f $PHP_RRD/lib/librrd.$SHLIB_SUFFIX_NAME -o -f $PHP_RRD/lib/librrd.a; then # path given as parameter
|
||||
RRDTOOL_DIR=$PHP_RRD
|
||||
AC_MSG_CHECKING(if rrdtool specified path is valid)
|
||||
if test -r "$PHP_RRD/include/rrd.h"; then
|
||||
RRDTOOL_INCDIR=$PHP_RRD/include
|
||||
RRDTOOL_LIBDIR=$PHP_RRD/lib
|
||||
AC_MSG_RESULT([yes])
|
||||
RRDTOOL_LIBDIR=$PHP_RRD/$PHP_LIBDIR
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([The specified RRDTool path is invalid or the installation is incomplete
|
||||
Please specify another path or reinstall the rrdtool distribution])
|
||||
fi
|
||||
else
|
||||
dnl Header path
|
||||
AC_MSG_CHECKING([for rrdtool header files in default path])
|
||||
for i in /usr/local/rrdtool /usr/local /usr /opt ""; do
|
||||
test -r $i/include/rrd.h && RRDTOOL_DIR=$i && RRDTOOL_INCDIR=$i/include
|
||||
AC_MSG_CHECKING([for rrdtool header files in default paths])
|
||||
for i in /usr /usr/local /usr/local/rrdtool /opt; do
|
||||
test -r $i/include/rrd.h && RRDTOOL_LIBDIR=$i/$PHP_LIBDIR && RRDTOOL_INCDIR=$i/include
|
||||
done
|
||||
if test -z "$RRDTOOL_INCDIR"; then
|
||||
AC_MSG_RESULT([not found])
|
||||
AC_MSG_ERROR([Please reinstall the rrdtool distribution])
|
||||
else
|
||||
AC_MSG_RESULT(found in $RRDTOOL_INCDIR)
|
||||
fi
|
||||
dnl Library path
|
||||
AC_MSG_CHECKING([for rrdtool library files in default paths])
|
||||
for i in librrd.$SHLIB_SUFFIX_NAME librrd.a; do
|
||||
if test -f $libdir/$i; then
|
||||
RRDTOOL_LIBDIR=$libdir/$i
|
||||
elif test -f $RRDTOOL_DIR/lib/$i; then
|
||||
RRDTOOL_LIBDIR=$RRDTOOL_DIR/lib
|
||||
fi
|
||||
done
|
||||
if test -z "$RRDTOOL_LIBDIR"; then
|
||||
AC_MSG_RESULT([not found])
|
||||
AC_MSG_ERROR([Please reinstall the rrdtool distribution])
|
||||
else
|
||||
AC_MSG_RESULT(found in $RRDTOOL_LIBDIR)
|
||||
AC_MSG_RESULT(found in $RRDTOOL_INCDIR)
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -68,7 +51,7 @@ if test "$PHP_RRD" != "no"; then
|
||||
], [
|
||||
AC_MSG_ERROR([wrong rrd lib version or lib not found])
|
||||
], [
|
||||
-L$RRDTOOL_LIBDIR -lrrd
|
||||
-L$RRDTOOL_LIBDIR
|
||||
])
|
||||
|
||||
dnl save temporary LDFLAGS, necessary for PHP_CHECK_FUNC
|
||||
|
||||
Reference in New Issue
Block a user