]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Remove bashisms from configure.in
authorFrederic Marchal <fmarchal@users.sourceforge.net>
Sat, 1 Jun 2013 17:36:58 +0000 (19:36 +0200)
committerFrederic Marchal <fmarchal@users.sourceforge.net>
Sat, 1 Jun 2013 17:36:58 +0000 (19:36 +0200)
Tests using == as equality operator are not portable. They are replaced by
a single =.

Thanks to Renato Botelho for reporting this bug.

configure.in

index a0e2021a47c64ad28f489ae78556436b0d749547..61f1dd4ac7935a98344ccc692f3dcd3b4199bc0b 100644 (file)
@@ -36,7 +36,7 @@ saved_CFLAGS="${CFLAGS}"
 CFLAGS="${CFLAGS} -Wextra -Wno-unused-parameter"
 AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_extra_warnings="yes"],[have_extra_warnings="no"])
 AC_MSG_RESULT($have_extra_warnings)
-if test "$have_extra_warnings" == "no" ; then
+if test "$have_extra_warnings" = "no" ; then
     CFLAGS="${saved_CFLAGS}"
 fi
 
@@ -45,7 +45,7 @@ saved_CFLAGS="${CFLAGS}"
 CFLAGS="${CFLAGS} -Werror=implicit-function-declaration"
 AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_implicit_function_declaration="yes"],[have_implicit_function_declaration="no"])
 AC_MSG_RESULT($have_implicit_function_declaration)
-if test "$have_implicit_function_declaration" == "no" ; then
+if test "$have_implicit_function_declaration" = "no" ; then
     CFLAGS="${saved_CFLAGS}"
 fi
 
@@ -54,7 +54,7 @@ saved_CFLAGS="${CFLAGS}"
 CFLAGS="${CFLAGS} -Werror=format"
 AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_error_format="yes"],[have_error_format="no"])
 AC_MSG_RESULT($have_error_format)
-if test "$have_error_format" == "no" ; then
+if test "$have_error_format" = "no" ; then
     CFLAGS="${saved_CFLAGS}"
 fi
 
@@ -89,7 +89,7 @@ AS_HELP_STRING([--with-gd],[Compile with support for the graphical gd library]),
 [],[with_gd=check])
 if ( test "x$with_gd" != "xno" ) ; then
        AC_CHECK_HEADERS(gd.h gdfontl.h gdfontt.h gdfonts.h gdfontmb.h gdfontg.h)
-       if ( test "x$ac_cv_header_gd_h" == "xyes" ) ; then
+       if ( test "x$ac_cv_header_gd_h" = "xyes" ) ; then
                AC_CHECK_LIB(gd, gdImagePng,LIBS="-lgd ${LIBS}"; HAVE_GD_LIB="yes", HAVE_GD_LIB="")
                if ( test "x$HAVE_GD_LIB" != "xyes" ) ; then
                        AC_MSG_ERROR([ligbd is required to compile sarg with gd])
@@ -133,7 +133,7 @@ AS_HELP_STRING([--with-pcre],[Compile with support for the Perl Compatible Regul
 [],[with_pcre=check])
 if ( test "x$with_pcre" != "xno" ) ; then
        AC_CHECK_HEADERS(pcre.h)
-       if ( test "x$ac_cv_header_pcre_h" == "xyes" ) ; then
+       if ( test "x$ac_cv_header_pcre_h" = "xyes" ) ; then
                LDFLAGS="$LDFLAGS $(pcre-config --libs)"
                CFLAGS="$CFLAGS $(pcre-config --cflags)"
        else
@@ -246,7 +246,7 @@ AS_HELP_STRING([--enable-fontdir=fontdir],
     fi
 ],[FONTDIR="${datarootdir}/sarg/fonts"])
 if test "$FONTDIR" ; then
-   if test "x$prefix" == "xNONE" ; then
+   if test "x$prefix" = "xNONE" ; then
       tempfullpath=`prefix=$ac_default_prefix ; eval "echo $FONTDIR"`
    else
       tempfullpath=`eval "echo $FONTDIR"`
@@ -264,7 +264,7 @@ AS_HELP_STRING([--enable-imagedir=imagedir],
         IMAGEDIR=$enableval
     fi
 ],[IMAGEDIR="${datarootdir}/sarg/images"])
-if test "x$prefix" == "xNONE" ; then
+if test "x$prefix" = "xNONE" ; then
    tempfullpath=`prefix=$ac_default_prefix ; eval "echo $IMAGEDIR"`
 else
    tempfullpath=`eval "echo $IMAGEDIR"`
@@ -288,7 +288,7 @@ AS_HELP_STRING([--enable-extraprotection],
        CFLAGS="${CFLAGS} -Wformat -Werror=format-security"
        AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_format_security="yes"],[have_format_security="no"])
        AC_MSG_RESULT($have_format_security)
-       if test "$have_format_security" == "no" ; then
+       if test "$have_format_security" = "no" ; then
           CFLAGS="${saved_CFLAGS}"
        fi
 
@@ -297,7 +297,7 @@ AS_HELP_STRING([--enable-extraprotection],
        CFLAGS="${CFLAGS} -Wempty-body"
        AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_empty_body="yes"],[have_empty_body="no"])
        AC_MSG_RESULT($have_empty_body)
-       if test "$have_empty_body" == "no" ; then
+       if test "$have_empty_body" = "no" ; then
           CFLAGS="${saved_CFLAGS}"
        fi
     fi
@@ -369,14 +369,14 @@ AC_SUBST(VERSION,"$PACKAGE_VERSION")
 AC_CONFIG_FILES([Makefile po/Makefile.in])
 AC_OUTPUT
 
-if ( test "x$gd_status" == "xdisabled" ) ; then
+if ( test "x$gd_status" = "xdisabled" ) ; then
        AC_MSG_NOTICE([Not building with gd as requested on the configuration command line])
-elif ( test "x$gd_status" == "xnot found" ) ; then
+elif ( test "x$gd_status" = "xnot found" ) ; then
        AC_MSG_NOTICE([gd.h was not found so the graphs won't be available in the report])
 fi
 
-if ( test "x$pcre_status" == "xdisabled" ) ; then
+if ( test "x$pcre_status" = "xdisabled" ) ; then
        AC_MSG_NOTICE([Not building with pcre as requested on the configuration command line])
-elif ( test "x$pcre_status" == "xnot found" ) ; then
+elif ( test "x$pcre_status" = "xnot found" ) ; then
        AC_MSG_NOTICE([pcre.h was not found so the regexp won't be available in the hostalias])
 fi