fix extra argument when testing for PERLCC problem -- Simon Leinen
[rrdtool.git] / configure.ac
index 912e68b..243465e 100644 (file)
@@ -6,7 +6,7 @@ dnl
 dnl Inspiration from http://autoconf-archive.cryp.to
 
 dnl tell automake the this script is for rrdtool
-AC_INIT([rrdtool],[1.2.6])
+AC_INIT([rrdtool],[1.2.7])
 AC_CANONICAL_TARGET
 AM_INIT_AUTOMAKE
 AC_CONFIG_HEADERS([config.h])
@@ -166,6 +166,10 @@ AC_STRUCT_TM
 
 dnl Checks for libraries.
 AC_CHECK_FUNC(acos, , AC_CHECK_LIB(m, acos))
+dnl Use libiconv if we have one but fall back to libc otherwhise
+AC_CHECK_LIB(iconv, iconv_open, , [
+         AC_CHECK_FUNC(iconv_open,,)
+         ])
 
 dnl add pic flag in any case this makes sure all our code is relocatable
 eval `./libtool --config | grep pic_flag`
@@ -309,9 +313,9 @@ else
         AC_MSG_CHECKING(for the C compiler perl wants to use to build its modules)
        perlcc=`$PERL -MConfig -e 'print $Config{cc}'`
        AC_MSG_RESULT($perlcc)
-       if test ! -x $perlcc; then
+       if test ! -x "$perlcc"; then
               AC_PATH_PROG(PERLCC, ${perlcc}, no)
-              if test -x "x$PERLCC" = "xno"; then
+              if test "x$PERLCC" = "xno"; then
                   AC_MSG_WARN([
 I would not find the Compiler ($perlcc) that was originally used to compile your
 perl binary. You should either make sure that this compiler is available on your