test/configure

changeset 9
ebdecbbb2f79
parent 8
82cd9f1d94cb
child 11
215b49563679
--- a/test/configure	Sat Aug 03 17:45:03 2019 +0200
+++ b/test/configure	Tue Aug 13 21:01:48 2019 +0200
@@ -104,42 +104,42 @@
 done
 
 # set dir variables
-if [ -z $BINDIR ]; then
+if [ -z "$BINDIR" ]; then
 	BINDIR=$EPREFIX/bin
 fi
-if [ -z $SBINDIR ]; then
+if [ -z "$SBINDIR" ]; then
 	SBINDIR=$EPREFIX/sbin
 fi
-if [ -z $LIBDIR ]; then
+if [ -z "$LIBDIR" ]; then
 	LIBDIR=$EPREFIX/lib
 fi
-if [ -z $LIBEXEC ]; then
+if [ -z "$LIBEXEC" ]; then
 	LIBEXECDIR=$EPREFIX/libexec
 fi
-if [ -z $DATADIR ]; then
+if [ -z "$DATADIR" ]; then
 	DATADIR=$PREFIX/share
 fi
-if [ -z $SYSCONFDIR]; then
+if [ -z "$SYSCONFDIR" ]; then
 	SYSCONFDIR=$PREFIX/etc
 fi
-if [ -z $SHAREDSTATEDIR ]; then
+if [ -z "$SHAREDSTATEDIR" ]; then
 	SHAREDSTATEDIR=$PREFIX/com
 fi
-if [ -z $LOCALSTATEDIR ]; then
+if [ -z "$LOCALSTATEDIR" ]; then
 	LOCALSTATEDIR=$PREFIX/var
 fi
-if [ -z $INCLUDEDIR ]; then
+if [ -z "$INCLUDEDIR" ]; then
 	INCLUDEDIR=$PREFIX/include
 fi
-if [ -z $INFODIR ]; then
+if [ -z "$INFODIR" ]; then
 	INFODIR=$PREFIX/info
 fi
-if [ -z $MANDIR ]; then
+if [ -z "$MANDIR" ]; then
 	MANDIR=$PREFIX/man
 fi
 
 which pkg-config > /dev/null
-if [ $? -ne 0 ]; then
+if [ $? -eq 0 ]; then
     PKG_CONFIG=pkg-config
 else
     PKG_CONFIG=false
@@ -226,13 +226,13 @@
 
 # add user specified flags to config.mk
 echo >> $TEMP_DIR/config.mk
-if [[ ! -z ${ENV_CFLAGS} ]]; then
+if [ ! -z "${ENV_CFLAGS}" ]; then
     echo "CFLAGS += $ENV_CFLAGS" >> $TEMP_DIR/config.mk
 fi
-if [[ ! -z ${ENV_CXXFLAGS} ]]; then
+if [ ! -z "${ENV_CXXFLAGS}" ]; then
     echo "CXXFLAGS += $ENV_CXXFLAGS" >> $TEMP_DIR/config.mk
 fi
-if [[ ! -z ${ENV_LDFLAGS} ]]; then
+if [ ! -z "${ENV_LDFLAGS}" ]; then
     echo "LDFLAGS += $ENV_LDFLAGS" >> $TEMP_DIR/config.mk
 fi
 
@@ -246,14 +246,14 @@
     # dependency libpq 
     while true
     do
-        if [ -z "PKG_CONFIG" ]; then
+        if [ -z "$PKG_CONFIG" ]; then
         	break
         fi
-        if ! pkg-config libpq ; then
+        if ! $PKG_CONFIG libpq ; then
             break
         fi
-        CFLAGS+=" `pkg-config --cflags libpq`"
-        LDFLAGS+=" `pkg-config --libs libpq`"
+        CFLAGS+=" `$PKG_CONFIG --cflags libpq`"
+        LDFLAGS+=" `$PKG_CONFIG --libs libpq`"
 		echo yes
         return 0
     done
@@ -267,14 +267,14 @@
     # dependency openssl 
     while true
     do
-        if [ -z "PKG_CONFIG" ]; then
+        if [ -z "$PKG_CONFIG" ]; then
         	break
         fi
-        if ! pkg-config openssl ; then
+        if ! $PKG_CONFIG openssl ; then
             break
         fi
-        CFLAGS+=" `pkg-config --cflags openssl`"
-        LDFLAGS+=" `pkg-config --libs openssl`"
+        CFLAGS+=" `$PKG_CONFIG --cflags openssl`"
+        LDFLAGS+=" `$PKG_CONFIG --libs openssl`"
 		echo yes
         return 0
     done
@@ -288,14 +288,14 @@
     # dependency libxml2 
     while true
     do
-        if [ -z "PKG_CONFIG" ]; then
+        if [ -z "$PKG_CONFIG" ]; then
         	break
         fi
-        if ! pkg-config libxml-2.0 ; then
+        if ! $PKG_CONFIG libxml-2.0 ; then
             break
         fi
-        CFLAGS+=" `pkg-config --cflags libxml-2.0`"
-        LDFLAGS+=" `pkg-config --libs libxml-2.0`"
+        CFLAGS+=" `$PKG_CONFIG --cflags libxml-2.0`"
+        LDFLAGS+=" `$PKG_CONFIG --libs libxml-2.0`"
 		echo yes
         return 0
     done
@@ -323,13 +323,13 @@
 
 # add general dependency flags to config.mk
 echo >> $TEMP_DIR/config.mk
-if [[ ! -z ${CFLAGS} ]]; then
+if [ ! -z "${CFLAGS}" ]; then
     echo "CFLAGS += $CFLAGS" >> $TEMP_DIR/config.mk
 fi
-if [[ ! -z ${CXXFLAGS} ]]; then
+if [ ! -z "${CXXFLAGS}" ]; then
     echo "CXXFLAGS += $CXXFLAGS" >> $TEMP_DIR/config.mk
 fi
-if [[ ! -z ${LDFLAGS} ]]; then
+if [ ! -z "${LDFLAGS}" ]; then
     echo "LDFLAGS += $LDFLAGS" >> $TEMP_DIR/config.mk
 fi
 
@@ -362,13 +362,13 @@
 
 
 echo >> $TEMP_DIR/config.mk
-if [[ ! -z ${CFLAGS} ]]; then
+if [ ! -z "${CFLAGS}" ]; then
     echo "CFLAGS  += $CFLAGS" >> $TEMP_DIR/config.mk
 fi
-if [[ ! -z ${CXXFLAGS} ]]; then
+if [ ! -z "${CXXFLAGS}" ]; then
     echo "CXXFLAGS += $CXXFLAGS" >> $TEMP_DIR/config.mk
 fi
-if [[ ! -z ${LDFLAGS} ]]; then
+if [ ! -z "${LDFLAGS}" ]; then
     echo "LDFLAGS += $LDFLAGS" >> $TEMP_DIR/config.mk
 fi
 

mercurial