--- a/make/configure.vm Sun Aug 04 10:46:51 2019 +0200 +++ b/make/configure.vm Tue Aug 13 21:13:43 2019 +0200 @@ -162,42 +162,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 @@ -311,13 +311,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 @@ -344,16 +344,16 @@ fi #end #if( $sub.pkgconfig.size() > 0 ) - if [ -z "PKG_CONFIG" ]; then + if [ -z "$PKG_CONFIG" ]; then break fi #end #foreach( $pkg in $sub.pkgconfig ) - if ! pkg-config $pkg.getPkgConfigParam() ; then + if ! $PKG_CONFIG $pkg.getPkgConfigParam() ; then break fi - CFLAGS+=" `pkg-config --cflags $pkg.getPkgConfigParam()`" - LDFLAGS+=" `pkg-config --libs $pkg.getPkgConfigParam()`" + CFLAGS+=" `$PKG_CONFIG --cflags $pkg.getPkgConfigParam()`" + LDFLAGS+=" `$PKG_CONFIG --libs $pkg.getPkgConfigParam()`" #end #foreach( $flags in $sub.flags ) #if( $flags.exec ) @@ -411,21 +411,21 @@ while true do #if( $dependency.pkgconfig.size() > 0 ) - if [ -z "PKG_CONFIG" ]; then + if [ -z "$PKG_CONFIG" ]; then ERROR=1 break fi #end #foreach( $pkg in $dependency.pkgconfig ) printf "checking for pkg-config package $pkg.getPkgConfigParam()... " - if ! pkg-config $pkg.getPkgConfigParam() ; then + if ! $PKG_CONFIG $pkg.getPkgConfigParam() ; then echo no ERROR=1 break fi echo yes - CFLAGS+=" `pkg-config --cflags $pkg.getPkgConfigParam()`" - LDFLAGS+=" `pkg-config --libs $pkg.getPkgConfigParam()`" + CFLAGS+=" `$PKG_CONFIG --cflags $pkg.getPkgConfigParam()`" + LDFLAGS+=" `$PKG_CONFIG --libs $pkg.getPkgConfigParam()`" #end #foreach( $flags in $dependency.flags ) @@ -456,13 +456,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 #end @@ -567,13 +567,13 @@ #end echo >> $TEMP_DIR/config.mk -if [[ ! -z ${CFLAGS} ]]; then +if [ ! -z "${CFLAGS}" ]; then echo "${target.getCFlags()} += $CFLAGS" >> $TEMP_DIR/config.mk fi -if [[ ! -z ${CXXFLAGS} ]]; then +if [ ! -z "${CXXFLAGS}" ]; then echo "${target.getCXXFlags()} += $CXXFLAGS" >> $TEMP_DIR/config.mk fi -if [[ ! -z ${LDFLAGS} ]]; then +if [ ! -z "${LDFLAGS}" ]; then echo "${target.getLDFlags()} += $LDFLAGS" >> $TEMP_DIR/config.mk fi