Menu

#5 configure not POSIX compliant

1.0
closed
nobody
None
2014-10-20
2014-10-11
Chris Mayo
No

With dash as /bin/sh:
$ ./configure
...
./configure: 4008: test: /usr/bin/qmake: unexpected operator
Found /usr/bin/qmake
QMake version 2.01a
Using Qt version 4.8.5 in /usr/lib64/qt4
./configure: 4039: test: /usr/bin/snmpget: unexpected operator
Found /usr/bin/snmpget
configure: creating ./config.status
config.status: creating Makefile

Problem is the use of ==, suggest changing to -z:

--- /var/tmp/qtmib-1.1/configure.ac.orig
+++ /var/tmp/qtmib-1.1/configure.ac
@@ -19,14 +19,14 @@

 # testing qmake
 QMAKE=`which qmake`
-if test "$QMAKE" == ""
+if test -z "$QMAKE"
 then
    # fix for Fedora
    if test -f /usr/lib64/qt4/bin/qmake; then
        QMAKE=/usr/lib64/qt4/bin/qmake
    fi

-   if test "$QMAKE" == ""
+   if test -z "$QMAKE"
    then
        AC_MSG_ERROR([qmake is missing, please install QT4 development packages.])
    fi
@@ -50,7 +50,7 @@

 # testing net-snmp
 NETSNMP=`which snmpget`
-if test "$NETSNMP" == ""
+if test -z "$NETSNMP"
 then
    AC_MSG_WARN([net-snmp is requred for running qtmib, please install it (http://www.net-snmp.org/).])
 else

Discussion

  • RCP Team

    RCP Team - 2014-10-19

    Fixed in version 1.1.1. Thank you for the patch!

     
  • RCP Team

    RCP Team - 2014-10-20
    • status: open --> closed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.