* tests/config-flags.pm.W32: Create a predefined Windows file.
* Makefile.am (test_FILES): Add it to the distribution.
* build_w32.bat: Install tests/config-flags.pm if not existing.
* tests/run_make_tests.pl (get_config): Create new function.
* tests/scripts/features/archives: Call get_config() rather than
using %CONFIG_FLAGS directly.
* tests/scripts/features/load: Ditto.
* tests/scripts/features/loadapi: Ditto.
* tests/scripts/functions/wildcard: Ditto.
test_FILES = tests/run_make_tests tests/run_make_tests.bat \
tests/run_make_tests.pl tests/test_driver.pl \
tests/config-flags.pm.in tests/config_flags_pm.com \
+ tests/config-flags.pm.W32 \
tests/mkshadow tests/jhelp.pl tests/guile.supp tests/README
# test/scripts are added via dist-hook below.
:Success\r
echo %OUTDIR% build succeeded.\r
if exist Basic.mk copy /Y Basic.mk Makefile\r
+if not exist tests\config-flags.pm copy /Y tests\config-flags.pm.W32 tests\config-flags.pm\r
call :Reset\r
goto :EOF\r
\r
--- /dev/null
+# This is a -*-perl-*- script
+#
+# Set variables for Windows systems.
+
+%CONFIG_FLAGS = (
+ USE_SYSTEM_GLOB => 'no'
+);
+
+1;
return ($v, $d, $f);
}
+sub get_config
+{
+ return exists($CONFIG_FLAGS{$_[0]}) ? $CONFIG_FLAGS{$_[0]} : '';
+}
+
sub set_more_defaults
{
- local($string);
- local($index);
+ my $string;
# Now that we have located make_path, locate the srcdir and blddir
my ($mpv, $mpd, $mpf) = find_prog($make_path);
utouch(-60, qw(a1.o a2.o a3.o));
}
-my $ar = $CONFIG_FLAGS{AR};
-
-# Fallback if configure did not find AR, such as VMS
-# which does not run configure.
-$ar = 'ar' if $ar eq '';
+# Fallback if configure did not find AR
+my $ar = get_config('AR') || 'ar';
my $redir = '2>&1';
$redir = '' if $osname eq 'VMS';
# Don't do anything if this system doesn't support "load"
exists $FEATURES{load} or return -1;
-# CONFIG_FLAGS are loaded from config-flags.pm and set by configure
-if (! exists $CONFIG_FLAGS{CC}) {
+my $cc = get_config('CC');
+if (! $cc) {
$verbose and print "Skipping load test: no CC defined\n";
return -1;
}
# Make sure we can compile
-my $sobuild = "$CONFIG_FLAGS{CC} ".($srcdir? "-I$srcdir/src":'')." $CONFIG_FLAGS{CPPFLAGS} $CONFIG_FLAGS{CFLAGS} -shared -fPIC $CONFIG_FLAGS{LDFLAGS} -o testload.so testload.c";
+my $cflags = get_config('CFLAGS');
+my $cppflags = get_config('CPPFLAGS');
+my $ldflags = get_config('LDFLAGS');
+my $sobuild = "$cc ".($srcdir? "-I$srcdir/src":'')." $cppflags $cflags -shared -fPIC $ldflags -o testload.so testload.c";
my $clog = `$sobuild 2>&1`;
if ($? != 0) {
# Don't do anything if this system doesn't support "load"
exists $FEATURES{load} or return -1;
-# CONFIG_FLAGS are loaded from config-flags.pm and set by configure
-if (! exists $CONFIG_FLAGS{CC}) {
+my $cc = get_config('CC');
+if (! $cc) {
$verbose and print "Skipping load test: no CC defined\n";
return -1;
}
# Make sure we can compile
-my $sobuild = "$CONFIG_FLAGS{CC} ".($srcdir? "-I$srcdir/src":'')." $CONFIG_FLAGS{CPPFLAGS} $CONFIG_FLAGS{CFLAGS} -shared -fPIC $CONFIG_FLAGS{LDFLAGS} -o testapi.so testapi.c";
+my $cflags = get_config('CFLAGS');
+my $cppflags = get_config('CPPFLAGS');
+my $ldflags = get_config('LDFLAGS');
+my $sobuild = "$cc ".($srcdir? "-I$srcdir/src":'')." $cppflags $cflags -shared -fPIC $ldflags -o testapi.so testapi.c";
my $clog = `$sobuild 2>&1`;
if ($? != 0) {
# Test for dangling symlinks
# This doesn't work with the built-in glob... needs to be updated!
- if ($CONFIG_FLAGS{USE_SYSTEM_GLOB} eq 'yes') {
+ if (get_config('USE_SYSTEM_GLOB') eq 'yes') {
symlink($dir, $lnk);
run_make_test(qq!all: ; \@echo \$(wildcard $lnk)!, '', "$lnk");