s4-selftest: use CONFIG_H environment variable to find config.h
authorAndrew Tridgell <tridge@samba.org>
Sat, 27 Mar 2010 01:44:20 +0000 (12:44 +1100)
committerAndrew Tridgell <tridge@samba.org>
Sun, 28 Mar 2010 06:57:29 +0000 (17:57 +1100)
source4/selftest/tests.sh

index 253f4f55926903a7a41666747d66c6a07ad4e2eb..f832b4f15ed84067f8d1ac23269ff37a551edb0d 100755 (executable)
@@ -118,7 +118,10 @@ for options in "" "--option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD -
     plantest "ldb.ldap with options $options" dc $bbdir/test_ldb.sh ldap \$SERVER $options
 done
 # see if we support ldaps
     plantest "ldb.ldap with options $options" dc $bbdir/test_ldb.sh ldap \$SERVER $options
 done
 # see if we support ldaps
-if grep ENABLE_GNUTLS.1 include/config.h > /dev/null; then
+[ -n "$CONFIG_H" ] || {
+    CONFIG_H="include/config.h"
+}
+if grep ENABLE_GNUTLS.1 $CONFIG_H > /dev/null; then
     for options in "" "-U\$USERNAME%\$PASSWORD"; do
        plantest "ldb.ldaps with options $options" dc $bbdir/test_ldb.sh ldaps \$SERVER_IP $options
     done
     for options in "" "-U\$USERNAME%\$PASSWORD"; do
        plantest "ldb.ldaps with options $options" dc $bbdir/test_ldb.sh ldaps \$SERVER_IP $options
     done