summaryrefslogtreecommitdiffstats
path: root/contrib/ncurses/convert_configure.pl
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-08-24 01:06:48 +0000
committerpeter <peter@FreeBSD.org>1999-08-24 01:06:48 +0000
commitbacd15cb1fff2dee94d390e0f84c147cd82ea148 (patch)
treead214c5b2c8142ad6dc6d2ce3a9c83e6317d7f77 /contrib/ncurses/convert_configure.pl
downloadFreeBSD-src-bacd15cb1fff2dee94d390e0f84c147cd82ea148.zip
FreeBSD-src-bacd15cb1fff2dee94d390e0f84c147cd82ea148.tar.gz
Import unmodified (but trimmed) ncurses 5.0 prerelease 990821.
This contains the full eti (panel, form, menu) extensions. bmake glue to follow. Obtained from: ftp://ftp.clark.net/pub/dickey/ncurses
Diffstat (limited to 'contrib/ncurses/convert_configure.pl')
-rw-r--r--contrib/ncurses/convert_configure.pl54
1 files changed, 54 insertions, 0 deletions
diff --git a/contrib/ncurses/convert_configure.pl b/contrib/ncurses/convert_configure.pl
new file mode 100644
index 0000000..9d1026d
--- /dev/null
+++ b/contrib/ncurses/convert_configure.pl
@@ -0,0 +1,54 @@
+extproc perl -S -w
+
+# The converted script is written to stdout, so run this script as
+# convert_configure configure > configure.cmd
+#
+# When the converted script runs, it expects that /tmp dir is
+# available (so we create it).
+#
+# run the result like this:
+# .\configure
+;
+
+mkdir '/tmp', 0777 unless -d '/tmp';
+
+print <<EOF;
+extproc sh
+
+# Make sensible defaults:
+CC="gcc -Zexe"
+export CC
+#GCCOPT="$GCCOPT -Zexe"
+#export GCCOPT
+CONFIG_SHELL=sh
+
+EOF
+
+$checking_path = 0;
+
+while (<>) {
+ if (/for\s+(\w+)\s+in\s*\$PATH\s*;/) {
+ $checking_path = 1;
+ $varname = $1;
+ $subst= <<EOS
+$varname="`echo -E \\"\$$varname\\" | tr \\\\\\\\\\\\\\\\ / `"
+EOS
+ }
+ $checking_path = 0 if /^\s*done\s*$/;
+ # We want to create an extra line like this one:
+# ac_dir="`echo -E \"$ac_dir\" | tr \\\\\\\\ / `"
+ s{^((\s*)if\s+test)\s*-f\s*(\$$varname/\S+)\s*;}
+ {$2$subst$1 -f $3 -o -f $3.exe ;}
+ if $checking_path; # Checking for executables
+ s/^host=NONE$/host=os2/; # Make default host
+ s/"\$\{IFS}:"$/"\${IFS};"/; # Fix IFS line
+ s/\btest\s+-s\s+conftest\b/test -f conftest/g; # Fix exe test
+ # This one is needed for curses:
+ s/host=`\$ac_config_sub \$host_alias`/$&\nif test -z "$host"; then host=\$host_alias; fi/;
+ s,/bin/sh(?![/\w]),sh,g;
+ print;
+}
+
+__END__
+
+Changes: 98/11 : support check for executables in ncurses.
OpenPOWER on IntegriCloud