]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/scripts/regress-config
ebl add 3 others errors
[bacula/bacula] / regress / scripts / regress-config
index 3145e1843e4b6f9cd02c8babece874a66218ad3a..f68ea08fb65d9771ca5a77672406bc139bbc30ba 100755 (executable)
@@ -7,7 +7,18 @@ if test "x${CONFIG_SHELL}" != "x"; then
     CONFIG_SHELL=/bin/sh
 fi
 
-CFLAGS="-g -O2 -Wall" \
+# Handle Solaris compiler (possibly some others) 
+VERSION="`cc --version | head -1 | awk '{ print $2 }' 2> /dev/null`"
+
+if [ -n "${VERSION}" -a "${VERSION}" = "(GCC)" ]; then
+  OPTIMIZE="-O2"
+  WARNINGS="-Wall"
+else
+  OPTIMIZE="-O"
+  WARNINGS="-v"
+fi
+
+CFLAGS="-g ${OPTIMIZE} ${WARNINGS}" \
  ./configure \
     --sbindir=$1/bin \
     --sysconfdir=$1/bin \