+++ /dev/null
-?RCS: $Id$
-?RCS:
-?RCS: Copyright (c) 1999, Jarkko Hietaniemi
-?RCS:
-?RCS: This file is included with or a derivative work of a file included
-?RCS: with the metaconfig program of Raphael Manfredi's "dist" distribution.
-?RCS: In accordance with clause 7 of dist's modified Artistic License:
-?RCS:
-?RCS: You may distribute under the terms of either the GNU General Public
-?RCS: License or the Artistic License, as specified in the README file.
-?RCS:
-?MAKE:crosscompile:
-?MAKE: -pick add $@ %<
-?S:crosscompile:
-?S: This variable conditionally defines the CROSSCOMPILE symbol
-?S: which signifies that the build process is be a cross-compilation.
-?S: This is normally set by hints files or from Configure command line.
-?S:.
-?C:CROSSCOMPILE:
-?C: This symbol, if defined, signifies that we our
-?C: build process is a cross-compilation.
-?C:.
-?H:#$crosscompile CROSSCOMPILE /**/
-?H:.
-case "$crosscompile" in
-''|[nN]*) crosscompile="$undef" ;;
-esac
-
?RCS: Revision 3.0 1993/08/18 12:08:52 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:intsize longsize shortsize: Compile Myread cat rm
+?MAKE:intsize longsize shortsize: Compile Myread cat rm run
?MAKE: -pick add $@ %<
?S:intsize:
?S: This variable contains the value of the INTSIZE symbol, which
?H:#define LONGSIZE $longsize /**/
?H:#define SHORTSIZE $shortsize /**/
?H:.
-?F:!intsize
: check for lengths of integral types
echo " "
case "$intsize" in
'')
echo "Checking to see how big your integers are..." >&4
- $cat >intsize.c <<'EOCP'
+ $cat >try.c <<'EOCP'
#include <stdio.h>
int main()
{
exit(0);
}
EOCP
- set intsize
- if eval $compile_ok && ./intsize > /dev/null; then
- eval `./intsize`
+ set try
+ if eval $compile_ok && $run ./try > /dev/null; then
+ eval `$run ./try`
@if INTSIZE || intsize
echo "Your integers are $intsize bytes long."
@end
fi
;;
esac
-$rm -f intsize intsize.*
+$rm -f try try.*
?RCS: Revision 3.0 1993/08/18 12:05:23 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:alignbytes: Myread Compile cat rm crosscompile multiarch \
+?MAKE:alignbytes: Myread Compile cat rm usecrosscompile multiarch run \
d_longdbl uselongdouble test
?MAKE: -pick add $@ %<
?S:alignbytes:
?C: double, or a long double when applicable. Usual values are 2,
?C: 4 and 8. The default is eight, for safety.
?C:.
-?H:?%<:#if defined(CROSSCOMPILE) || defined(MULTIARCH)
+?H:?%<:#if defined(USE_CROSS_COMPILE) || defined(MULTIARCH)
?H:?%<:# define MEM_ALIGNBYTES 8
?H:?%<:#else
?H:?%<:#define MEM_ALIGNBYTES $alignbytes
?H:?%<:#endif
?H:.
-?F:!try
: check for alignment requirements
echo " "
-case "$crosscompile$multiarch" in
+case "$usecrosscompile$multiarch" in
*$define*)
$cat <<EOM
You seem to be either cross-compiling or doing a multiarchitecture build,
EOCP
set try
if eval $compile_ok; then
- dflt=`./try`
+ dflt=`$run ./try`
else
dflt='8'
echo "(I can't seem to compile the test program...)"
?RCS: Revision 3.0 1993/08/18 12:05:27 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:bitpbyte: cat rm Myread Compile
+?MAKE:bitpbyte: cat rm Myread Compile run
?MAKE: -pick add $@ %<
?S:bitpbyte:
?S: This variable contains the value of the BITS_PER_BYTE symbol, which
?C:.
?H:#define BITS_PER_BYTE $bitpbyte /**/
?H:.
-?F:!try
: check for length of byte
echo " "
case "$bitpbyte" in
EOCP
set try
if eval $compile_ok; then
- dflt=`./try`
+ dflt=`$run ./try`
else
dflt='8'
echo "(I can't seem to compile the test program. Guessing...)"
?RCS: Revision 3.0 1993/08/18 12:05:28 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:byteorder: cat Myread Oldconfig Loc Compile rm \
- longsize crosscompile multiarch
+?MAKE:byteorder: cat Myread Oldconfig Loc Compile rm run \
+ usecrosscompile multiarch
?MAKE: -pick add $@ %<
?S:byteorder:
?S: This variable holds the byte order. In the following, larger digits
?C: so the default case (for NeXT) is big endian to catch them.
?C: This might matter for NeXT 3.0.
?C:.
-?H:?%<:#if defined(CROSSCOMPILE) || defined(MULTIARCH)
+?H:?%<:#if defined(USE_CROSS_COMPILE) || defined(MULTIARCH)
?H:?%<:# ifdef __LITTLE_ENDIAN__
?H:?%<:# if LONGSIZE == 4
?H:?%<:# define BYTEORDER 0x1234
?H:?%<:#define BYTEORDER 0x$byteorder /* large digits for MSB */
?H:?%<:#endif /* NeXT */
?H:.
-?F:!try
?T:xxx_prompt
-?LINT:use longsize
: check for ordering of bytes in a long
echo " "
-case "$crosscompile$multiarch" in
+case "$usecrosscompile$multiarch" in
*$define*)
$cat <<EOM
You seem to be either cross-compiling or doing a multiarchitecture build,
skipping the byteorder check.
EOM
- byteorder='0xffff'
+ byteorder='ffff'
;;
*)
case "$byteorder" in
xxx_prompt=y
set try
if eval $compile && ./try > /dev/null; then
- dflt=`./try`
+ dflt=`$run ./try`
case "$dflt" in
[1-4][1-4][1-4][1-4]|12345678|87654321)
echo "(The test program ran ok.)"
?MAKE:ccflags ldflags lkflags cppflags optimize locincpth: test cat \
Myread Guess Options Oldconfig +gccversion mips_type +usrinc \
package contains rm +cc cppstdin cppminus cpprun cpplast libpth \
- libs loclibpth hint usesocks sh
+ libs loclibpth hint usesocks sh run
?MAKE: -pick add $@ %<
?S:ccflags:
?S: This variable contains any additional C compiler flags desired by
?D:ccflags=''
?D:ldflags=''
?D:optimize=''
-?F:!try
?INIT:: Possible local include directories to search.
?INIT:: Set locincpth to "" in a hint file to defeat local include searches.
?INIT:locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
I used the command:
$*
- ./try
+ $run ./try
and I got the following output:
?X: even when ld failed, in which case the executable will not run properly,
?X: if its x bit is set at all...
?X:
-?X: Also check the xxx=`./try` output to check for misconfigured -lsfio.
+?X: Also check the xxx=`$run ./try` output to check for misconfigured -lsfio.
?X: If sfio's iffe goofed and it uses _exit instead of exit, then the
?X: output buffers don't get flushed and we don't see any output
?X: when run from within `backticks`. What fun.
?X: --Andy Dougherty 2/13/1998
if $sh -c "$cc -o try $optimize $ccflags $ldflags try.c $libs" >>try.msg 2>&1; then
- if $sh -c './try' >>try.msg 2>&1; then
- xxx=`./try`
+ if $sh -c "$run ./try" >>try.msg 2>&1; then
+ xxx=`$run ./try`
case "$xxx" in
"Ok") dflt=n ;;
*) echo 'The program compiled OK, but produced no output.' >> try.msg
?RCS: Revision 3.0 1993/08/18 12:05:34 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:charsize: cat rm Myread Compile
+?MAKE:charsize: cat rm Myread Compile run
?MAKE: -pick add $@ %<
?S:charsize:
?S: This variable contains the value of the CHARSIZE symbol, which
?C:.
?H:#define CHARSIZE $charsize /**/
?H:.
-?F:!try
: check for length of character
echo " "
case "$charsize" in
EOCP
set try
if eval $compile_ok; then
- dflt=`./try`
+ dflt=`$run ./try`
else
dflt='1'
echo "(I can't seem to compile the test program. Guessing...)"
?X:
?X: Can the compiler cast large floats to 32-bit integers?
?X:
-?MAKE:d_casti32: cat Compile rm intsize Setvar test signal_t
+?MAKE:d_casti32: cat Compile rm intsize Setvar test signal_t run
?MAKE: -pick add $@ %<
?S:d_casti32:
?S: This variable conditionally defines CASTI32, which indicates
EOCP
set try
if eval $compile_ok; then
- ./try
+ $run ./try
yyy=$?
else
echo "(I can't seem to compile the test program--assuming it can't)"
?X:
?X: Can the compiler cast negative / odd floats to unsigned values.
?X:
-?MAKE:d_castneg castflags: cat Compile rm Setvar signal_t
+?MAKE:d_castneg castflags: cat Compile rm Setvar signal_t run
?MAKE: -pick add $@ %<
?S:d_castneg:
?S: This variable conditionally defines CASTNEG, which indicates
EOCP
set try
if eval $compile_ok; then
- ./try
+ $run ./try
castflags=$?
else
echo "(I can't seem to compile the test program--assuming it can't)"
?RCS: patch32: created by ADO
?RCS:
?MAKE:d_closedir d_void_closedir: Inlibc i_dirent i_sysdir i_sysndir \
- i_systypes Compile Setvar rm
+ i_systypes Compile Setvar rm run
?MAKE: -pick add $@ %<
?S:d_closedir:
?S: This variable conditionally defines HAS_CLOSEDIR if closedir() is
?C:.
?H:#$d_void_closedir VOID_CLOSEDIR /**/
?H:.
-?F:!closedir
?LINT:set d_closedir d_void_closedir
: see if closedir exists
set closedir d_closedir
"$define")
echo " "
echo "Checking whether closedir() returns a status..." >&4
- cat > closedir.c <<EOM
+ cat > try.c <<EOM
#$i_dirent I_DIRENT /**/
#$i_sysdir I_SYS_DIR /**/
#$i_sysndir I_SYS_NDIR /**/
#endif
int main() { return closedir(opendir(".")); }
EOM
- set closedir
+ set try
if eval $compile_ok; then
- if ./closedir > /dev/null 2>&1 ; then
+ if $run ./try > /dev/null 2>&1 ; then
echo "Yes, it does."
val="$undef"
else
esac
set d_void_closedir
eval $setvar
-$rm -f closedir*
+$rm -f try try.*
@end
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
?MAKE:d_fd_set d_fd_macros d_fds_bits: Compile cat rm Oldconfig \
- d_socket i_systime i_sysselct
+ d_socket i_systime i_sysselct run
?MAKE: -pick add $@ %<
?S:d_fd_set:
?S: This variable contains the eventual value of the HAS_FD_SET symbol,
?H:#$d_fd_macros HAS_FD_MACROS /**/
?H:#$d_fds_bits HAS_FDS_BITS /**/
?H:.
-?F:!fd_set
: check for fd_set items
$cat <<EOM
?X: by <sys/socket.h>. We won't force people to include
?X: <sys/bsdtypes.h> because it might introduce other
?X: incompatibilities.
-$cat >fd_set.c <<EOCP
+$cat >try.c <<EOCP
#$i_systime I_SYS_TIME
#$i_sysselct I_SYS_SELECT
#$d_socket HAS_SOCKET
#endif
}
EOCP
-set fd_set -DTRYBITS
+set try -DTRYBITS
if eval $compile; then
d_fds_bits="$define"
d_fd_set="$define"
echo "Well, your system knows about the normal fd_set typedef..." >&4
- if ./fd_set; then
+ if $run ./try; then
echo "and you have the normal fd_set macros (just as I'd expect)." >&4
d_fd_macros="$define"
else
$cat <<'EOM'
Hmm, your compiler has some difficulty with fd_set. Checking further...
EOM
- set fd_set
+ set try
if eval $compile; then
d_fds_bits="$undef"
d_fd_set="$define"
echo "Well, your system has some sort of fd_set available..." >&4
- if ./fd_set; then
+ if $run ./try; then
echo "and you have the normal fd_set macros." >&4
d_fd_macros="$define"
else
d_fd_macros="$undef"
fi
fi
-$rm -f fd_set*
+$rm -f try try.*
?RCS: Revision 3.0.1.1 1994/10/29 16:12:51 ram
?RCS: patch36: created by ADO
?RCS:
-?MAKE:d_Gconvert: Compile cat Inlibc rm _o i_stdlib d_qgcvt \
+?MAKE:d_Gconvert: Compile cat Inlibc rm _o i_stdlib d_qgcvt run \
uselongdouble d_longdbl d_PRIgldbl sPRIgldbl
?MAKE: -pick add $@ %<
?S:d_Gconvert:
?H:#define Gconvert(x,n,t,b) $d_Gconvert
?H:.
?T: xxx_list xxx_convert
-?F:!try
?X:
: Check how to convert floats to strings.
echo " "
set try -DTRY_$xxx_convert
if eval $compile; then
echo "$xxx_convert() found." >&4
- if ./try; then
+ if $run ./try; then
echo "I'll use $xxx_convert to convert floats into a string." >&4
break;
else
?RCS: patch61: created
?RCS:
?MAKE:d_gnulibc: Myread Oldconfig Setvar rm \
- Compile
+ Compile run
?MAKE: -pick add $@ %<
?S:d_gnulibc:
?S: Defined if we're dealing with the GNU C Library.
?X:
echo " "
echo "Checking for GNU C Library..." >&4
-cat >gnulibc.c <<EOM
+cat >try.c <<EOM
#include <stdio.h>
int main()
{
#endif
}
EOM
-set gnulibc
-if eval $compile_ok && ./gnulibc; then
+set try
+if eval $compile_ok && $run ./try; then
val="$define"
echo "You are using the GNU C Library"
else
val="$undef"
echo "You are not using the GNU C Library"
fi
-$rm -f gnulibc*
+$rm -f try try.*
set d_gnulibc
eval $setvar
?RCS: Revision 3.0 1993/08/18 12:06:26 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_keepsig: cat Compile rm Guess contains echo n c Setvar
+?MAKE:d_keepsig: cat Compile rm Guess contains echo n c Setvar run
?MAKE: -pick add $@ %<
?S:d_keepsig:
?S: This variable contains the eventual value of the SIGNALS_KEPT symbol,
?X: On AIX a single ./try will not work (with ksh)
?X: Backquotes required on Linux and SGI (prevents "ambiguous output redirect")
?X: (reported by Xavier LeVourch <xavierl@eiffel.com>)
- `sh -c ./try >try.out 2>/dev/null`
+ `sh -c $run ./try >try.out 2>/dev/null`
if $contains abc try.out >/dev/null 2>&1; then
echo "Yes, they do."
val="$define";
?RCS: Revision 3.0 1993/08/18 12:06:44 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_open3: Compile test cat h_fcntl h_sysfile rm Setvar Findhdr
+?MAKE:d_open3: Compile test cat h_fcntl h_sysfile rm Setvar Findhdr run
?MAKE: -pick add $@ %<
?X: It would be easy to separate the h_O_stuff from this.
?X: Is there a reason to do so? -- HMS
?H:.
?W:%<:O_RDONLY O_WRONLY O_RDWR O_NDELAY O_APPEND O_SYNC O_CREAT O_TRUNC
?W:%<:O_EXCL O_NONBLOCK
-?F:!open3
?LINT:set d_open3
?LINT:change h_fcntl h_sysfile
: Locate the flags for 'open()'
echo " "
-$cat >open3.c <<'EOCP'
+$cat >try.c <<'EOCP'
#include <sys/types.h>
#ifdef I_FCNTL
#include <fcntl.h>
EOCP
: check sys/file.h first to get FREAD on Sun
if $test `./findhdr sys/file.h` && \
- set open3 -DI_SYS_FILE && eval $compile; then
+ set try -DI_SYS_FILE && eval $compile; then
h_sysfile=true;
echo "<sys/file.h> defines the O_* constants..." >&4
- if ./open3; then
+ if $run ./try; then
echo "and you have the 3 argument form of open()." >&4
val="$define"
else
val="$undef"
fi
elif $test `./findhdr fcntl.h` && \
- set open3 -DI_FCNTL && eval $compile; then
+ set try -DI_FCNTL && eval $compile; then
h_fcntl=true;
echo "<fcntl.h> defines the O_* constants..." >&4
- if ./open3; then
+ if $run ./try; then
echo "and you have the 3 argument form of open()." >&4
val="$define"
else
fi
set d_open3
eval $setvar
-$rm -f open3*
+$rm -f try try.*
?RCS: Revision 3.0 1993/08/18 12:06:58 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_safebcpy: cat d_bcopy Compile rm \
+?MAKE:d_safebcpy: cat d_bcopy Compile rm run \
d_memmove i_memory i_stdlib i_string i_unistd Oldconfig Setvar
?MAKE: -pick add $@ %<
?S:d_safebcpy:
?C:.
?H:#$d_safebcpy HAS_SAFE_BCOPY /**/
?H:.
-?F:!try
?LINT: set d_safebcpy
: can bcopy handle overlapping blocks?
?X: assume the worst
EOCP
set try
if eval $compile_ok; then
- if ./try 2>/dev/null; then
+ if $run ./try 2>/dev/null; then
echo "Yes, it can."
val="$define"
else
?RCS: Revision 3.0 1993/08/18 12:06:58 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_safemcpy: Compile cat d_memcpy rm \
+?MAKE:d_safemcpy: Compile cat d_memcpy rm run \
d_memmove i_memory i_stdlib i_string i_unistd Oldconfig Setvar
?MAKE: -pick add $@ %<
?S:d_safemcpy:
?C:.
?H:#$d_safemcpy HAS_SAFE_MEMCPY /**/
?H:.
-?F:!try
?LINT: set d_safemcpy
: can memcpy handle overlapping blocks?
?X: assume the worst
EOCP
set try
if eval $compile_ok; then
- if ./try 2>/dev/null; then
+ if $run ./try 2>/dev/null; then
echo "Yes, it can."
val="$define"
else
?RCS: patch61: created
?RCS:
?RCS:
-?MAKE:d_sanemcmp: Compile cat d_memcmp rm \
+?MAKE:d_sanemcmp: Compile cat d_memcmp rm run \
i_memory i_stdlib i_string i_unistd Oldconfig Setvar
?MAKE: -pick add $@ %<
?S:d_sanemcmp:
?C:.
?H:#$d_sanemcmp HAS_SANE_MEMCMP /**/
?H:.
-?F:!try
?LINT: set d_sanemcmp
: can memcmp be trusted to compare relative magnitude?
?X: assume the worst
EOCP
set try
if eval $compile_ok; then
- if ./try 2>/dev/null; then
+ if $run ./try 2>/dev/null; then
echo "Yes, it can."
val="$define"
else
?X: Does the scanf routine read "\n" corretly ? This is was not
?X: the case on AIX...
?X:
-?MAKE:d_scannl: cat rm Setvar Compile
+?MAKE:d_scannl: cat rm Setvar Compile run
?MAKE: -pick add $@ %<
?S:d_scannl:
?S: This variable conditionally defines SCAN_NL, which indicates
?C:.
?H:#$d_scannl SCAN_NL /* scanf("%d\n") works */
?H:.
-?F:!try
?LINT:set d_scannl
: does scanf handle "\n" correctly ?
echo " "
EOCP
set try
if eval $compile_ok; then
- if ./try <<'EOD'
+ if $run ./try <<'EOD'
2
3
EOD
?RCS: Revision 3.0 1993/08/18 12:07:16 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_sgndchr: cat rm Compile Setvar
+?MAKE:d_sgndchr: cat rm Compile Setvar run
?MAKE: -pick add $@ %<
?S:d_sgndchr:
?S: This variable conditionally defines the SIGNEDCHAR symbol, which
?C:.
?H:#$d_sgndchr SIGNEDCHAR /**/
?H:.
-?F:!try
?LINT:set d_sgndchr
: check for signed chars
echo " "
}
EOCP
set try
-if eval $compile && ./try; then
-if ./try; then
+if eval $compile && $run ./try; then
+if $run ./try; then
val="$define"
echo "It certainly can."
else
?RCS: Revision 3.0.1.1 1997/02/28 15:44:33 ram
?RCS: patch61: created
?RCS:
-?MAKE:d_sigsetjmp: Compile Setvar cat rm
+?MAKE:d_sigsetjmp: Compile Setvar cat rm run
?MAKE: -pick add $@ %<
?S:d_sigsetjmp:
?S: This variable conditionally defines the HAS_SIGSETJMP symbol,
?H:?%<:#endif
?H:.
?W:%<:Sigjmp_buf Sigsetjmp Siglongjmp
-?F:!try
?LINT:set d_sigsetjmp
: see if sigsetjmp exists
?X: We can't check for these symbols with Inlibc because sigsetjmp
EOP
set try
if eval $compile; then
- if ./try >/dev/null 2>&1; then
+ if $run ./try >/dev/null 2>&1; then
echo "POSIX sigsetjmp found." >&4
val="$define"
else
?MAKE:d_stdstdio d_stdiobase stdio_ptr stdio_cnt \
d_stdio_ptr_lval_sets_cnt d_stdio_ptr_lval_nochange_cnt stdio_base \
stdio_bufsiz d_stdio_cnt_lval d_stdio_ptr_lval stdio_filbuf: cat \
- Compile contains rm exe_ext \
- Setvar Findhdr Oldconfig
+ Compile contains rm \
+ Setvar Findhdr Oldconfig run to
?MAKE: -pick weed $@ %<
?S:d_stdstdio:
?S: This variable conditionally defines USE_STDIO_PTR if this system
?W:d_stdiobase:FILE_base FILE_bufsiz
?LINT:set d_stdstdio d_stdiobase d_stdio_ptr_lval d_stdio_cnt_lval
?T:ptr_lval cnt_lval filbuf xxx
-?F:!try
: see if _ptr and _cnt from stdio act std
echo " "
EOP
val="$undef"
set try
-if eval $compile; then
- if ./try; then
+if eval $compile && $to try.c; then
+ if $run ./try; then
echo "Your stdio acts pretty std."
val="$define"
else
}
EOP
set try
- if eval $compile && ./try; then
+ if eval $compile && $to try.c && $run ./try; then
echo "Your stdio appears to use $filbuf"
stdio_filbuf="$filbuf"
xxx='ok'
}
EOP
set try
- if eval $compile; then
- case `./try$exe_ext` in
+ if eval $compile && $to try.c; then
+ case `$run ./try` in
Pass_changed)
echo "Increasing ptr in your stdio decreases cnt by the same amount. Good." >&4
d_stdio_ptr_lval_sets_cnt="$define" ;;
}
EOP
set try
- if eval $compile; then
- if ./try; then
+ if eval $compile && $to try.c; then
+ if $run ./try; then
echo "And its _base field acts std."
val="$define"
else
?RCS: Revision 3.0 1993/08/18 12:07:59 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:d_vprintf d_charvspr: Compile Guess cat Csym Setvar
+?MAKE:d_vprintf d_charvspr: Compile Guess cat Csym Setvar run rm
?MAKE: -pick add $@ %<
?S:d_vprintf:
?S: This variable conditionally defines the HAS_VPRINTF symbol, which
if set vprintf val -f d_vprintf; eval $csym; $val; then
echo 'vprintf() found.' >&4
val="$define"
- $cat >vprintf.c <<'EOF'
+ $cat >try.c <<'EOF'
#include <varargs.h>
int main() { xxx("foo"); }
exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
}
EOF
- set vprintf
- if eval $compile && ./vprintf; then
+ set try
+ if eval $compile && $run ./try; then
echo "Your vsprintf() returns (int)." >&4
val2="$undef"
else
val="$undef"
val2="$undef"
fi
+$rm -f try try.*
set d_vprintf
eval $setvar
val=$val2
?RCS: Revision 3.0 1993/08/18 12:08:06 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:doublesize: cat rm Myread Compile
+?MAKE:doublesize: cat rm Myread Compile run
?MAKE: -pick add $@ %<
?S:doublesize:
?S: This variable contains the value of the DOUBLESIZE symbol, which
?C:.
?H:#define DOUBLESIZE $doublesize /**/
?H:.
-?F:!try
: check for length of double
echo " "
case "$doublesize" in
EOCP
set try
if eval $compile_ok; then
- doublesize=`./try`
+ doublesize=`$run ./try`
echo "Your double is $doublesize bytes long."
else
dflt='8'
?RCS: Revision 3.0 1993/08/18 12:08:09 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:floatsize: cat rm Myread Compile
+?MAKE:floatsize: cat rm Myread Compile run
?MAKE: -pick add $@ %<
?S:floatsize:
?S: This variable contains the value of the FLOATSIZE symbol, which
?C:.
?H:#define FLOATSIZE $floatsize /**/
?H:.
-?F:!try
: check for length of float
echo " "
case "$floatsize" in
EOCP
set try
if eval $compile_ok; then
- floatsize=`./try`
+ floatsize=`$run ./try`
else
dflt='4'
echo "(I can't seem to compile the test program. Guessing...)"
?X: Simplify here document for shells that can't handle them well.
?X: (Problem reported on FreeBSD; it's unclear if this helps.) --AD
?X:
-?MAKE:o_nonblock eagain rd_nodata d_eofnblk: cat rm Compile \
+?MAKE:o_nonblock eagain rd_nodata d_eofnblk: cat rm Compile run \
d_open3 h_sysfile h_fcntl signal_t hint Oldconfig Setvar \
startsh i_unistd i_string
?MAKE: -pick add $@ %<
?H:#define RD_NODATA $rd_nodata
?H:#$d_eofnblk EOF_NONBLOCK
?H:.
-?F:!try !try.out !try.ret !try.err
+?F:!try.out !try.ret !try.err
?T:status
?LINT:use d_open3
: check for non-blocking I/O stuff
EOCP
set try
if eval $compile_ok; then
- o_nonblock=`./try`
+ o_nonblock=`$run ./try`
case "$o_nonblock" in
'') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
*) echo "Seems like we can use $o_nonblock.";;
if eval $compile_ok; then
?X: Use script to avoid the possible 'alarm call' message
echo "$startsh" >mtry
- echo "./try >try.out 2>try.ret 3>try.err || exit 4" >>mtry
+ echo "$run ./try >try.out 2>try.ret 3>try.err || exit 4" >>mtry
chmod +x mtry
./mtry >/dev/null 2>&1
case $? in
?RCS: Revision 3.0 1993/08/18 12:09:26 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:orderlib ranlib: Loc ar cat test rm +cc +ccflags +ldflags +libs _a _o
+?MAKE:orderlib ranlib: Loc ar cat test rm +cc +ccflags +ldflags +libs _a _o run
?MAKE: -pick add $@ %<
?S:orderlib:
?S: This variable is "true" if the components of libraries must be ordered
$cc $ccflags -c foo.c >/dev/null 2>&1
$ar rc bar$_a bar2$_o bar1$_o >/dev/null 2>&1
if $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
- ./foobar >/dev/null 2>&1; then
+ $run ./foobar >/dev/null 2>&1; then
echo "$ar appears to generate random libraries itself."
orderlib=false
ranlib=":"
elif $ar ts bar$_a >/dev/null 2>&1 &&
$cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 &&
- ./foobar >/dev/null 2>&1; then
+ $run ./foobar >/dev/null 2>&1; then
echo "a table of contents needs to be added with '$ar ts'."
orderlib=false
ranlib="$ar ts"
?RCS: Revision 3.0 1993/08/18 12:09:37 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:ptrsize: cat rm Myread Compile voidflags
+?MAKE:ptrsize: cat rm Myread Compile voidflags run
?MAKE: -pick add $@ %<
?S:ptrsize:
?S: This variable contains the value of the PTRSIZE symbol, which
?C:.
?H:#define PTRSIZE $ptrsize /**/
?H:.
-?F:!try
: check for length of pointer
echo " "
case "$ptrsize" in
EOCP
set try
if eval $compile_ok; then
- ptrsize=`./try`
+ ptrsize=`$run ./try`
echo "Your pointers are $ptrsize bytes long."
else
dflt='4'
?RCS: Revision 3.0.1.1 1994/08/29 16:33:06 ram
?RCS: patch32: created by ADO
?RCS:
-?MAKE:ssizetype: Myread Typedef sizetype cat rm Compile
+?MAKE:ssizetype: Myread Typedef sizetype cat rm Compile run
?MAKE: -pick add $@ %<
?S:ssizetype:
?S: This variable defines ssizetype to be something like ssize_t,
?C:.
?H:#define SSize_t $ssizetype /* signed count of bytes */
?H:.
-?F:!ssize
: see what type is used for signed size_t
set ssize_t ssizetype int stdio.h sys/types.h
eval $typedef
dflt="$ssizetype"
?X: Now check out whether sizeof(SSize_t) == sizeof(Size_t)
-$cat > ssize.c <<EOM
+$cat > try.c <<EOM
#include <stdio.h>
#include <sys/types.h>
#define Size_t $sizetype
}
EOM
echo " "
-set ssize
-if eval $compile_ok && ./ssize > /dev/null; then
- ssizetype=`./ssize`
+set try
+if eval $compile_ok && $run ./try > /dev/null; then
+ ssizetype=`$run ./try`
echo "I'll be using $ssizetype for functions returning a byte count." >&4
else
$cat >&4 <<EOM
. ./myread
ssizetype="$ans"
fi
-$rm -f ssize ssize.*
+$rm -f try try.*
?RCS: Original author Jarkko Hietaniemi <jhi@iki.fi>
?RCS: Merged into dist by Andy Dougherty July 13, 1998
?RCS:
-?MAKE:ebcdic: Compile Setvar cat rm
+?MAKE:ebcdic: Compile Setvar cat rm run
?MAKE: -pick add $@ %<
?S:ebcdic:
?S: This variable conditionally defines EBCDIC if this
?H:#$ebcdic EBCDIC /**/
?H:.
?LINT:set ebcdic
-?F:!tebcdic tebcdic.c
echo " "
echo "Determining whether or not we are on an EBCDIC system..." >&4
-$cat >tebcdic.c <<'EOM'
+$cat >try.c <<'EOM'
int main()
{
if ('M'==0xd4) return 0;
EOM
val=$undef
-set tebcdic
+set try
if eval $compile_ok; then
- if ./tebcdic; then
+ if $run ./try; then
echo "You seem to speak EBCDIC." >&4
val="$define"
else
- echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF8." >&4
+ echo "Nope, no EBCDIC, probably ASCII or some ISO Latin. Or UTF-8." >&4
fi
else
echo "I'm unable to compile the test program." >&4
echo "I'll assume ASCII or some ISO Latin. Or UTF8." >&4
fi
-$rm -f tebcdic.c tebcdic
+$rm -f try try.*
set ebcdic
eval $setvar
?X: are more easily determined. If you want to add to $al you can do
?X: it in Myinit.U.
?X:
-?MAKE:Cppsym ccsymbols cppsymbols cppccsymbols: \
- eunicefix Guess awk cat tr sed sort rm startsh osname exe_ext \
+?MAKE:Cppsym ccsymbols cppsymbols cppccsymbols: run \
+ eunicefix Guess awk cat tr sed sort rm startsh osname \
+cc +gccversion test comm uniq echo Options trnl \
optimize ccflags ldflags libs
?MAKE: -pick add $@ %<
?F:!ccsym.own
?X: fake LINT hints
?LINT:change cc
-?LINT:change exe_ext
?LINT:change optimize
?LINT:change ccflags
?LINT:change ldflags
irix-) ccflags="\$ccflags -woff 1178" ;;
os2-*) ccflags="\$ccflags -Zlinker /PM:VIO" ;;
esac
-$cc -o try $optimize \$ccflags $ldflags try.c $libs && ./try$exe_ext
+$cc -o try $optimize \$ccflags $ldflags try.c $libs && $run ./try
EOSH
chmod +x Cppsym.try
$eunicefix Cppsym.try
?X: for the sake of setting defaults.
?X:
?MAKE:Oldconfig hint myuname osname osvers: Instruct Myread uname \
- Checkcc Mksymlinks \
+ Checkcc Mksymlinks run \
sh awk sed test cat rm lns tr n c contains Loc Options Tr src trnl ln
?MAKE: -pick wipe $@ %<
?S:myuname:
?T:tans _ isesix INITPROG DJGPP
?D:osname=''
?LINT:change n c sh
+?LINT:extern targetarch
+?LINT:extern hostarch
+?LINT:change hostarch
+?LINT:use run
: Try to determine whether config.sh was made on this system
case "$config_sh" in
'')
fi
fi
+ case "$targetarch" in
+ '') ;;
+ *) hostarch=$osname
+ osname=`echo $targetarch|sed 's,^[^-]*-,,'`
+ osvers=''
+ ;;
+ esac
+
: Now look for a hint file osname_osvers, unless one has been
: specified already.
case "$hintfile" in
elif $test -f $src/hints/$file.sh; then
. $src/hints/$file.sh
$cat $src/hints/$file.sh >> UU/config.sh
- elif $test X$tans = X -o X$tans = Xnone ; then
+ elif $test X"$tans" = X -o X"$tans" = Xnone ; then
: nothing
else
: Give one chance to correct a possible typo.
?X: This unit is then used by sig_name.U.
?X:
?MAKE:Signal: test tr rm awk cat grep startsh eunicefix sed sort uniq \
- Findhdr cppstdin +cppflags cppminus Compile _o _exe trnl
+ Findhdr cppstdin +cppflags cppminus Compile _o _exe trnl run
?MAKE: -pick add $@ %<
?X:all files declared as "public" since they're used from other units
?F:signal.c signal_cmd signal.lst signal signal.awk
set signal
if eval $compile_ok; then
- ./signal$_exe | $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst
+ $run ./signal$_exe | $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst
else
echo "(I can't seem be able to compile the whole test program)" >&4
echo "(I'll try it in little pieces.)" >&4
set signal -DJUST_NSIG
if eval $compile_ok; then
- ./signal$_exe > signal.nsg
+ $run ./signal$_exe > signal.nsg
$cat signal.nsg
else
echo "I can't seem to figure out how many signals you have." >&4
set signal
if eval $compile; then
echo "SIG${xx} found."
- ./signal$_exe >> signal.ls1
+ $run ./signal$_exe >> signal.ls1
else
echo "SIG${xx} NOT found."
fi
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
?MAKE:d_getpgrp d_bsdgetpgrp: Guess Inlibc Setvar cat rm \
- +cc +ccflags +ldflags +libs i_unistd
+ +cc +ccflags +ldflags +libs i_unistd run
?MAKE: -pick add $@ %<
?S:d_getpgrp:
?S: This variable conditionally defines HAS_GETPGRP if getpgrp() is
"$define")
echo " "
echo "Checking to see which flavor of getpgrp is in use..."
- $cat >set.c <<EOP
+ $cat >try.c <<EOP
#$i_unistd I_UNISTD
#include <sys/types.h>
#ifdef I_UNISTD
exit(1);
}
EOP
- if $cc -o set -DTRY_BSD_PGRP $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then
+ if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
echo "You have to use getpgrp(pid) instead of getpgrp()." >&4
val="$define"
- elif $cc -o set $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then
+ elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
echo "You have to use getpgrp() instead of getpgrp(pid)." >&4
val="$undef"
else
esac
set d_bsdgetpgrp
eval $setvar
-$rm -f set set.c
+$rm -f try try.*
@end
?RCS:
?RCS: $Log: d_longdbl.U,v $
?RCS:
-?MAKE:d_longdbl longdblsize: Compile Setvar Myread \
- cat rm test doublesize exe_ext
+?MAKE:d_longdbl longdblsize: Compile Setvar Myread run \
+ cat rm test doublesize
?MAKE: -pick add $@ %<
?S:d_longdbl:
?S: This variable conditionally defines HAS_LONG_DOUBLE if
?H:?LONG_DOUBLESIZE:#endif
?H:.
?LINT:set d_longdbl
-?F:!try
: check for long doubles
echo " "
echo "Checking to see if you have long double..." >&4
?X: 'long double' as just 'double'.
set try
if eval $compile; then
- longdblsize=`./try$exe_ext`
+ longdblsize=`$run ./try`
echo "Your long doubles are $longdblsize bytes long."
else
dflt='8'
?RCS:
?RCS: $Log: d_longlong.U,v $
?RCS:
-?MAKE:d_longlong longlongsize: Compile Setvar Myread \
- cat rm test longsize exe_ext
+?MAKE:d_longlong longlongsize: Compile Setvar Myread run \
+ cat rm test longsize
?MAKE: -pick add $@ %<
?S:d_longlong:
?S: This variable conditionally defines HAS_LONG_LONG if
?H:?LONGLONGSIZE:#endif
?H:.
?LINT:set d_longlong
-?F:!try
: check for long long
echo " "
echo "Checking to see if you have long long..." >&4
EOCP
set try
if eval $compile_ok; then
- longlongsize=`./try$exe_ext`
+ longlongsize=`$run ./try`
echo "Your long longs are $longlongsize bytes long."
else
dflt='8'
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
?MAKE:d_setpgrp d_bsdsetpgrp: cat rm +cc +libs +ccflags \
- +ldflags Inlibc Guess Setvar i_unistd
+ +ldflags Inlibc Guess Setvar i_unistd run
?MAKE: -pick add $@ %<
?S:d_setpgrp:
?S: This variable conditionally defines HAS_SETPGRP if setpgrp() is
"$define")
echo " "
echo "Checking to see which flavor of setpgrp is in use..."
- $cat >set.c <<EOP
+ $cat >try.c <<EOP
#$i_unistd I_UNISTD
#include <sys/types.h>
#ifdef I_UNISTD
exit(1);
}
EOP
- if $cc -o set -DTRY_BSD_PGRP $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then
+ if $cc -o try -DTRY_BSD_PGRP $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
echo 'You have to use setpgrp(pid,pgrp) instead of setpgrp().' >&4
val="$define"
- elif $cc -o set $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then
+ elif $cc -o try $ccflags $ldflags try.c $libs >/dev/null 2>&1 && $run ./try; then
echo 'You have to use setpgrp() instead of setpgrp(pid,pgrp).' >&4
val="$undef"
else
esac
set d_bsdsetpgrp
eval $setvar
-$rm -f set set.c
+$rm -f try try.*
@end
?RCS: patch61: created
?RCS:
?RCS:
-?MAKE:d_strtoul: Inlibc cat longsize Compile
+?MAKE:d_strtoul: Inlibc cat longsize Compile run
?MAKE: -pick add $@ %<
?S:d_strtoul:
?S: This variable conditionally defines the HAS_STRTOUL symbol, which
?C:.
?H:#$d_strtoul HAS_STRTOUL /**/
?H:.
-?F:!try
?LINT:set d_strtoul
: see if strtoul exists
set strtoul d_strtoul
EOCP
set try
if eval $compile; then
- case "`./try`" in
+ case "`$run ./try`" in
ok) echo "Your strtoul() seems to be working okay." ;;
*) cat <<EOM >&4
Your strtoul() doesn't seem to be working okay.
?RCS:
?RCS: $Log: d_union_semun.U,v $
?RCS:
-?MAKE:d_union_semun d_semctl_semun d_semctl_semid_ds: Compile Setvar Myread \
+?MAKE:d_union_semun d_semctl_semun d_semctl_semid_ds: Compile Setvar Myread run \
cat rm d_sem
?MAKE: -pick add $@ %<
?S:d_union_semun:
?H:#$d_semctl_semid_ds USE_SEMCTL_SEMID_DS /**/
?H:.
?T:xxx also
-?F:!try
?LINT: set d_union_semun d_semctl_semun d_semctl_semid_ds
: see whether sys/sem.h defines union semun
echo " "
val="$undef"
set try
if eval $compile; then
- xxx=`./try`
+ xxx=`$run ./try`
case "$xxx" in
semun) val="$define" ;;
esac
val="$undef"
set try
if eval $compile; then
- xxx=`./try`
+ xxx=`$run ./try`
case "$xxx" in
semid_ds) val="$define" ;;
esac
--- /dev/null
+?RCS: $Id: i_varhdr.U,v 3.0.1.3 1997/02/28 15:54:42 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: i_varhdr.U,v $
+?RCS: Revision 3.0.1.3 1997/02/28 15:54:42 ram
+?RCS: patch61: varargs script now starts with leading "startsh"
+?RCS:
+?RCS: Revision 3.0.1.2 1994/10/29 16:21:02 ram
+?RCS: patch36: added ?F: line for metalint file checking
+?RCS:
+?RCS: Revision 3.0.1.1 1994/05/13 15:26:05 ram
+?RCS: patch27: this unit now supersedes old i_stdarg.U and i_varargs.U
+?RCS: patch27: modified to avoid spurious Whoa warnings (ADO)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:49 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_stdarg i_varargs i_varhdr: cat +cc +ccflags rm test Setvar \
+ Findhdr startsh _o run
+?MAKE: -pick add $@ %<
+?S:i_stdarg:
+?S: This variable conditionally defines the I_STDARG symbol, which
+?S: indicates to the C program that <stdarg.h> exists and should
+?S: be included.
+?S:.
+?S:i_varargs:
+?S: This variable conditionally defines I_VARARGS, which indicates
+?S: to the C program that it should include <varargs.h>.
+?S:.
+?S:i_varhdr:
+?S: Contains the name of the header to be included to get va_dcl definition.
+?S: Typically one of varargs.h or stdarg.h.
+?S:.
+?C:I_STDARG:
+?C: This symbol, if defined, indicates that <stdarg.h> exists and should
+?C: be included.
+?C:.
+?C:I_VARARGS:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <varargs.h>.
+?C:.
+?H:#$i_stdarg I_STDARG /**/
+?H:#$i_varargs I_VARARGS /**/
+?H:.
+?W:%<:va_dcl
+?T:valstd
+?F:!varargs
+?LINT:set i_stdarg i_varargs
+?X:
+?X: Don't use setvar because the varags test below might override these.
+?X: Actually, the messages here are just informative. We don't wish to set
+?X: i_varargs or i_stdarg to their final value before knowing which of the
+?X: two we'll include.
+?X:
+: see if stdarg is available
+echo " "
+if $test `./findhdr stdarg.h`; then
+ echo "<stdarg.h> found." >&4
+ valstd="$define"
+else
+ echo "<stdarg.h> NOT found." >&4
+ valstd="$undef"
+fi
+
+: see if varags is available
+echo " "
+if $test `./findhdr varargs.h`; then
+ echo "<varargs.h> found." >&4
+else
+ echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
+fi
+
+?X:
+?X: if you have stdarg.h, you need to support prototypes to actually use it;
+?X: but if stdarg.h exists and the compiler doesn't support prototypes (for some
+?X: bizarre reason), we'll fall back to varargs.h anyway so it's not so bad.
+?X:
+: set up the varargs testing programs
+$cat > varargs.c <<EOP
+#ifdef I_STDARG
+#include <stdarg.h>
+#endif
+#ifdef I_VARARGS
+#include <varargs.h>
+#endif
+
+#ifdef I_STDARG
+int f(char *p, ...)
+#else
+int f(va_alist)
+va_dcl
+#endif
+{
+ va_list ap;
+#ifndef I_STDARG
+ char *p;
+#endif
+#ifdef I_STDARG
+ va_start(ap,p);
+#else
+ va_start(ap);
+ p = va_arg(ap, char *);
+#endif
+ va_end(ap);
+}
+EOP
+$cat > varargs <<EOP
+$startsh
+if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
+ echo "true"
+else
+ echo "false"
+fi
+$rm -f varargs$_o
+EOP
+chmod +x varargs
+
+: now check which varargs header should be included
+echo " "
+i_varhdr=''
+case "$valstd" in
+"$define")
+ if `./varargs I_STDARG`; then
+ val='stdarg.h'
+ elif `./varargs I_VARARGS`; then
+ val='varargs.h'
+ fi
+ ;;
+*)
+ if `./varargs I_VARARGS`; then
+ val='varargs.h'
+ fi
+ ;;
+esac
+case "$val" in
+'')
+echo "I could not find the definition for va_dcl... You have problems..." >&4
+ val="$undef"; set i_stdarg; eval $setvar
+ val="$undef"; set i_varargs; eval $setvar
+ ;;
+*)
+ set i_varhdr
+ eval $setvar
+ case "$i_varhdr" in
+ stdarg.h)
+ val="$define"; set i_stdarg; eval $setvar
+ val="$undef"; set i_varargs; eval $setvar
+ ;;
+ varargs.h)
+ val="$undef"; set i_stdarg; eval $setvar
+ val="$define"; set i_varargs; eval $setvar
+ ;;
+ esac
+ echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
+esac
+$rm -f varargs*
+
?X: echo "Okay, let's see if #! works on this system..."
xcat=/bin/cat
test -f $xcat || xcat=/usr/bin/cat
- echo "#!$xcat" >try
- $eunicefix try
- chmod +x try
- ./try > today
+ echo "#!$xcat" >sharp
+ $eunicefix sharp
+ chmod +x sharp
+ ./sharp > today
if test -s today; then
?X: echo "It does."
sharpbang='#!'
else
- echo "#! $xcat" > try
- $eunicefix try
- chmod +x try
- ./try > today
+ echo "#! $xcat" > sharp
+ $eunicefix sharp
+ chmod +x sharp
+ ./sharp > today
if test -s today; then
?X: echo "It does."
sharpbang='#! '
echo "I presume that if # doesn't work, #! won't work either!"
sharpbang=': use '
fi
-rm -f try today
+rm -f sharp today
--- /dev/null
+?RCS: $Id: startsh.U,v 3.0.1.1 1997/02/28 16:25:31 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: startsh.U,v $
+?RCS: Revision 3.0.1.1 1997/02/28 16:25:31 ram
+?RCS: patch61: avoid needless chatter since this is now done very early
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:51 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:startsh: sh sharpbang eunicefix
+?MAKE: -pick add $@ %<
+?S:startsh:
+?S: This variable contains the string to put on the front of a shell
+?S: script to make sure (hopefully) that it runs with sh and not some
+?S: other shell.
+?S:.
+?F:!sharp
+: figure out how to guarantee sh startup
+?X: Avoid needless chatter since this is now done very early.
+?X: echo " "
+?X: echo "Checking out how to guarantee sh startup..." >&2
+case "$startsh" in
+'') startsh=${sharpbang}${sh} ;;
+*)
+?X: echo "Let's see if '$startsh' works..." ;;
+esac
+cat >sharp <<EOSS
+$startsh
+set abc
+test "$?abc" != 1
+EOSS
+
+chmod +x sharp
+$eunicefix sharp
+if ./sharp; then
+ : echo "Yup, it does."
+else
+ echo "Hmm... '$startsh' does not guarantee sh startup..."
+ echo "You may have to fix up the shell scripts to make sure $sh runs them."
+fi
+rm -f sharp
+
--- /dev/null
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2001 Jarkko Hietaniemi
+?RCS:
+?RCS: You may distribute under the terms of either the GNU General Public
+?RCS: License or the Artistic License, as specified in the README file.
+?RCS:
+?MAKE:run to from targetarch usecrosscompile: src
+?MAKE: -pick add $@ %<
+?Y:TOP
+?S:usecrosscompile:
+?S: This variable conditionally defines the USE_CROSS_COMPILE symbol,
+?S: and indicates that Perl has been cross-compiled.
+?S:.
+?S:run:
+?S: This variable contains the command used by Configure
+?S: to copy and execute a cross-compiled executable in the
+?S: target host. Useful and available only during Perl build.
+?S: Empty string '' if not cross-compiling.
+?S:.
+?S:from:
+?S: This variable contains the command used by Configure
+?S: to copy files from the target host. Useful and available
+?S: only during Perl build.
+?S: The string ':' if not cross-compiling.
+?S:.
+?S:to:
+?S: This variable contains the command used by Configure
+?S: to copy to from the target host. Useful and available
+?S: only during Perl build.
+?S: The string ':' if not cross-compiling.
+?S:.
+?S:targetarch:
+?S: If cross-compiling, this variable contains the target architecture.
+?S: If not, this will be empty.
+?S:.
+?C:USE_CROSS_COMPILE:
+?C: This symbol, if defined, indicates that Perl is being cross-compiled.
+?C:.
+?C:PERL_TARGETARCH:
+?C: This symbol, if defined, indicates the target architecture
+?C: Perl has been cross-compiled to. Undefined if not a cross-compile.
+?C:.
+?H:
+?H:?%<:#ifndef USE_CROSS_COMPILE
+?H:?%<:#$usecrosscompile USE_CROSS_COMPILE /**/
+?H:?%<:#define PERL_TARGETARCH "$targetarch" /**/
+?H:?%<:#endif
+?H:.
+?T:croak pwd exe f q
+?LINT:extern usecrosscompile
+?LINT:extern cc
+?LINT:extern usrinc
+?LINT:extern incpth
+?LINT:extern libpth
+?LINT:change ar
+?LINT:change nm
+?LINT:change ranlib
+?LINT:extern targethost
+?LINT:extern targetdir
+?LINT:extern targetuser
+?LINT:change targetuser
+?LINT:extern targetrun
+?LINT:extern targetfrom
+?LINT:extern targetto
+?LINT:change targetrun
+?LINT:change targetfrom
+?LINT:change targetto
+?LINT:extern locincpth
+?LINT:extern loclibpth
+?LINT:change locincpth
+?LINT:change loclibpth
+
+case "$usecrosscompile" in
+$define|true|[yY]*)
+ croak=''
+ case "$cc" in
+ *-*-gcc) # A cross-compiling gcc, probably.
+ targetarch=`echo $cc|sed 's/-gcc$//'`
+ ar=$targetarch-ar
+ # leave out ld, choosing it is more complex
+ nm=$targetarch-nm
+ ranlib=$targetarch-ranlib
+ ;;
+ esac
+ case "$targetarch" in
+ '') echo "Cross-compiling: you should define targetarch." >&4; croak=y ;;
+ esac
+ case "$usrinc" in
+ '') echo "Cross-compiling: you should define usrinc." >&4; croak=y ;;
+ esac
+ case "$incpth" in
+ '') echo "Cross-compiling: you should define incpth." >&4; croak=y ;;
+ esac
+ case "$libpth" in
+ '') echo "Cross-compiling: you should define libpth." >&4; croak=y ;;
+ esac
+ case "$targethost" in
+ '') echo "Cross-compiling: targethost not defined." >&4; croak=y ;;
+ esac
+ case "$targetdir" in
+ '') echo "Cross compiling: targetdir not defined." >&4; croak=y ;;
+ esac
+ locincpth=''
+ loclibpth=''
+ case "$croak" in
+ y) exit 1 ;;
+ esac
+ case "$src" in
+ /*) run=$src/Cross/run
+ to=$src/Cross/to
+ from=$src/Cross/from
+ ;;
+ *) pwd=`test -f ../Configure & cd ..; pwd`
+ run=$pwd/Cross/run
+ to=$pwd/Cross/to
+ from=$pwd/Cross/from
+ ;;
+ esac
+ case "$targetrun" in
+ '') targetrun=ssh ;;
+ esac
+ case "$targetto" in
+ '') targetto=scp ;;
+ esac
+ case "$targetfrom" in
+ '') targetfrom=scp ;;
+ esac
+ run=$run-$targetrun
+ to=$to-$targetto
+ from=$from-$targetfrom
+ case "$targetuser" in
+ '') targetuser=root ;;
+ esac
+ case "$targetfrom" in
+ scp) q=-q ;;
+ *) q='' ;;
+ esac
+ case "$targetrun" in
+ ssh|rsh)
+ cat >$run <<EOF
+#!/bin/sh
+exe=\$1
+shift
+$to \$exe
+$targetrun -l $targetuser $targethost "cd $targetdir && ./\$exe \$@"
+EOF
+ ;;
+ *) echo "Cross-compiling: unknown targetrun '$targetrun'" >&4
+ exit 1
+ ;;
+ esac
+ case "$targetto" in
+ scp|rcp)
+ cat >$to <<EOF
+#!/bin/sh
+for f in \$@
+do
+ $targetto $q \$f $targetuser@$targethost:$targetdir/. || exit 1
+done
+exit 0
+EOF
+ ;;
+ cp) cat >$to <<EOF
+#!/bin/sh
+cp \$@ $targetdir/.
+EOF
+ ;;
+ *) echo "Cross-compiling: unknown targetto '$targetto'" >&4
+ exit 1
+ ;;
+ esac
+ case "$targetfrom" in
+ scp|rcp)
+ cat >$from <<EOF
+#!/bin/sh
+for f in \$@
+do
+ $targetfrom $q $targetuser@$targethost:$targetdir/\$f . || exit 1
+done
+exit 0
+EOF
+ ;;
+ cp) cat >$from <<EOF
+#!/bin/sh
+for f in \$@
+do
+ cp $targetdir/\$f . || exit 1
+done
+exit 0
+EOF
+ ;;
+ *) echo "Cross-compiling: unknown targetfrom '$targetfrom'" >&4
+ exit 1
+ ;;
+ esac
+ if test ! -f $run; then
+ echo "Cross-compiling: target 'run' script '$run' not found." >&4
+ else
+ chmod a+rx $run
+ fi
+ if test ! -f $to; then
+ echo "Cross-compiling: target 'to' script '$to' not found." >&4
+ else
+ chmod a+rx $to
+ fi
+ if test ! -f $from; then
+ echo "Cross-compiling: target 'from' script '$from' not found." >&4
+ else
+ chmod a+rx $from
+ fi
+ if test ! -f $run -o ! -f $to -o ! -f $from; then
+ exit 1
+ fi
+ cat >&4 <<EOF
+Cross-compiling: Using
+ $run-ssh
+ $to-ssh
+ $from-ssh
+EOF
+ ;;
+*) run=''
+ to=:
+ from=:
+ usecrosscompile='undef'
+ targetarch=''
+ ;;
+esac
+
?RCS:
?RCS:
?MAKE:d_dlsymun: cat cc ccflags ldflags ld rm Setvar dlsrc i_dlfcn \
- cccdlflags ccdlflags lddlflags libs dlext _o
+ cccdlflags ccdlflags lddlflags libs dlext _o run to
?MAKE: -pick add $@ %<
?X: This is specific to perl5.
?S:d_dlsymun:
?C:.
?H:#$d_dlsymun DLSYM_NEEDS_UNDERSCORE /**/
?H:.
-?F: !fred
?LINT:set d_dlsymun
?T: xxx
: Check if dlsym need a leading underscore
#include <stdio.h>
#$i_dlfcn I_DLFCN
#ifdef I_DLFCN
-#include <dlfcn.h> /* the dynamic linker include file for Sunos/Solaris */
+#include <dlfcn.h> /* the dynamic linker include file for SunOS/Solaris */
#else
#include <sys/types.h>
#include <nlist.h>
if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 &&
$ld -o dyna.$dlext $ldflags $lddlflags tmp-dyna${_o} > /dev/null 2>&1 &&
- $cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1; then
- xxx=`./fred`
+ $cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1 && $to dyna.$dlext; then
+ xxx=`$run ./fred`
case $xxx in
1) echo "Test program failed using dlopen." >&4
echo "Perhaps you should not use dynamic loading." >&4;;
?RCS:
?RCS: $Log: d_fcntl_can_lock.U,v $
?RCS:
-?MAKE:d_fcntl_can_lock: d_fcntl Compile Setvar cat rm
+?MAKE:d_fcntl_can_lock: d_fcntl Compile Setvar cat rm run
?MAKE: -pick add $@ %<
?S:d_fcntl_can_lock:
?S: This variable conditionally defines the FCNTL_CAN_LOCK symbol
?H:#$d_fcntl_can_lock FCNTL_CAN_LOCK /**/
?H:.
?LINT: set d_fcntl_can_lock
-?F: !try
?X: fcntl may not be fully functional. As of November 2000, on VMS and
?X: DOS/DJGPP, fctnl-based locking doesn't work.
?X: Thanks to Craig A. Berry <craig.berry@psinetcs.com> for this test.
"$define")
set try
if eval $compile_ok; then
- if ./try; then
+ if $run ./try; then
echo "Yes, it seems to work."
val="$define"
else
?RCS: License or the Artistic License, as specified in the README file.
?RCS:
?MAKE:d_modfl d_modfl_pow32_bug: Inlibc Compile cat rm sPRIfldbl d_longdbl \
- osname gccversion ccflags
+ osname gccversion ccflags run
?MAKE: -pick add $@ %<
?S:d_modfl:
?S: This variable conditionally defines the HAS_MODFL symbol, which
?H:#$d_modfl_pow32_bug HAS_MODFL_POW32_BUG /**/
?H:.
?T:foo saveccflags
-?F:!try
?LINT:set d_modfl
?LINT:set d_modfl_pow32_bug
?LINT:change ccflags
esac
set try
if eval $compile; then
- foo=`./try`
+ foo=`$run ./try`
case "$foo" in
*" 4294967303.150000 1.150000 4294967302.000000")
echo >&4 "Your modfl() is broken for large values."
?RCS: You may distribute under the terms of either the GNU General Public
?RCS: License or the Artistic License, as specified in the README file.
?RCS:
-?MAKE:d_printf_exp_digits: Compile cat rm _exe
+?MAKE:d_printf_exp_digits: Compile cat rm run
?MAKE: -pick add $@ %<
?S:d_printf_exp_digits:
?S: This symbol's value is either 2 or 3, corresponding to the
EOSC
set try
if eval $compile; then
- ./try$_exe
+ $run ./try
case "$?" in
2|3) d_printf_exp_digits=$? ;;
esac
?RCS: You may distribute under the terms of either the GNU General Public
?RCS: License or the Artistic License, as specified in the README file.
?RCS:
-?MAKE:d_strtoll: Inlibc d_longlong Compile cat
+?MAKE:d_strtoll: Inlibc d_longlong Compile cat run
?MAKE: -pick add $@ %<
?S:d_strtoll:
?S: This variable conditionally defines the HAS_STRTOLL symbol, which
?H:#$d_strtoll HAS_STRTOLL /**/
?H:.
?T:yyy
-?F:!try
?LINT:set d_strtoll
: see if strtoll exists
set strtoll d_strtoll
EOCP
set try
if eval $compile; then
- yyy=`./try`
+ yyy=`$run ./try`
case "$yyy" in
ok) echo "Your strtoll() seems to be working okay." ;;
*) cat <<EOM >&4
?RCS: You may distribute under the terms of either the GNU General Public
?RCS: License or the Artistic License, as specified in the README file.
?RCS:
-?MAKE:d_strtoull: Inlibc d_longlong Compile cat
+?MAKE:d_strtoull: Inlibc d_longlong Compile cat run
?MAKE: -pick add $@ %<
?S:d_strtoull:
?S: This variable conditionally defines the HAS_STRTOULL symbol, which
?C:.
?H:#$d_strtoull HAS_STRTOULL /**/
?H:.
-?F:!try
?LINT:set d_strtoull
: see if strtoull exists
set strtoull d_strtoull
EOCP
set try
if eval $compile; then
- case "`./try`" in
+ case "`$run ./try`" in
ok) echo "Your strtoull() seems to be working okay." ;;
*) cat <<EOM >&4
Your strtoull() doesn't seem to be working okay.
?RCS: You may distribute under the terms of either the GNU General Public
?RCS: License or the Artistic License, as specified in the README file.
?RCS:
-?MAKE:d_strtouq: Inlibc cat Compile
+?MAKE:d_strtouq: Inlibc cat Compile run
?MAKE: -pick add $@ %<
?S:d_strtouq:
?S: This variable conditionally defines the HAS_STRTOUQ symbol, which
?C:.
?H:#$d_strtouq HAS_STRTOUQ /**/
?H:.
-?F:!try
?LINT:set d_strtouq
: see if strtouq exists
set strtouq d_strtouq
EOCP
set try
if eval $compile; then
- case "`./try`" in
+ case "`$run ./try`" in
ok) echo "Your strtouq() seems to be working okay." ;;
*) cat <<EOM >&4
Your strtouq() doesn't seem to be working okay.
?RCS: that same Artistic Licence; a copy of which may be found at the root
?RCS: of the source tree for dist 3.0.
?RCS:
-?MAKE:d_u32align: Compile cat rm Oldconfig \
+?MAKE:d_u32align: Compile cat rm Oldconfig run \
byteorder u32type Myread Setvar
?MAKE: -pick add $@ %<
?S:d_u32align:
EOCP
set try
if eval $compile_ok; then
- echo "(Testign for character data alignment may dump core.)" >&4
- ./try 2>&1 >/dev/null
+ echo "(Testing for character data alignment may dump core.)" >&4
+ $run ./try 2>&1 >/dev/null
case "$?" in
0) cat >&4 <<EOM
You can access character data pretty unalignedly.
?X:
?MAKE:usedl ld dlsrc cccdlflags lddlflags ccdlflags: \
Getfile Myread test osname sed i_dld d_dlopen Findhdr Setvar \
- cc ccflags ldflags ls gccversion cat rsrc src
+ cc ccflags ldflags ls gccversion cat rsrc src run
?MAKE: -pick add $@ %<
?Y:BOTTOM
?S:usedl:
exit(1); /* fail */
}
EOM
- if $cc $ccflags $ldflags try.c >/dev/null 2>&1 && ./a.out; then
+ if $cc $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then
cat <<EOM
You appear to have ELF support. I'll use $cc to build dynamic libraries.
EOM
?RCS: that same Artistic Licence; a copy of which may be found at the root
?RCS: of the source tree for dist 3.0.
?RCS:
-?MAKE:fflushNULL fflushall: Compile cat rm test osname \
+?MAKE:fflushNULL fflushall: Compile cat rm test osname run to from \
Oldconfig Myread Setvar exe_ext echo \
d_sysconf i_unistd d_stdio_stream_array stdio_stream_array
?MAKE: -pick add $@ %<
# define STDIO_STREAM_ARRAY $stdio_stream_array
#endif
int main() {
- FILE* p = fopen("try.out", "w");
+ FILE* p;
+ unlink("try.out");
+ p = fopen("try.out", "w");
#ifdef TRY_FPUTC
fputc('x', p);
#else
}
EOCP
: first we have to find out how _not_ to flush
+$to try.c
if $test "X$fflushNULL" = X -o "X$fflushall" = X; then
output=''
set try -DTRY_FPUTC
if eval $compile; then
+ $run ./try 2>/dev/null
$rm -f try.out
- ./try$exe_ext 2>/dev/null
+ $from try.out
if $test ! -s try.out -a "X$?" = X42; then
output=-DTRY_FPUTC
fi
case "$output" in
'')
set try -DTRY_FPRINTF
- $rm -f try.out
if eval $compile; then
+ $run ./try 2>/dev/null
$rm -f try.out
- ./try$exe_ext 2>/dev/null
+ $from try.out
if $test ! -s try.out -a "X$?" = X42; then
output=-DTRY_FPRINTF
fi
case "$fflushNULL" in
'') set try -DTRY_FFLUSH_NULL $output
if eval $compile; then
- $rm -f try.out
- ./try$exe_ext 2>/dev/null
+ $run ./try 2>/dev/null
code="$?"
+ $rm -f try.out
+ $from try.out
if $test -s try.out -a "X$code" = X42; then
fflushNULL="`$cat try.out`"
else
set tryp
if eval $compile; then
$rm -f tryp.out
- $cat tryp.c | ./tryp$exe_ext 2>/dev/null > tryp.out
+ $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
if cmp tryp.c tryp.out >/dev/null 2>&1; then
$cat >&4 <<EOM
fflush(NULL) seems to behave okay with input streams.
set tryp
if eval $compile; then
$rm -f tryp.out
- $cat tryp.c | ./tryp$exe_ext 2>/dev/null > tryp.out
+ $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out
if cmp tryp.c tryp.out >/dev/null 2>&1; then
$cat >&4 <<EOM
Good, at least fflush(stdin) seems to behave okay when stdin is a pipe.
(Now testing the other method--but note that this also may fail.)
EOM
$rm -f try.out
- ./try$exe_ext 2>/dev/null
+ $run ./try 2>/dev/null
if $test -s try.out -a "X$?" = X42; then
fflushall="`$cat try.out`"
fi
?RCS: that same Artistic Licence; a copy of which may be found at the root
?RCS: of the source tree for dist 3.0.
?RCS:
-?MAKE:fpossize: Myread Typedef fpostype Compile longsize
+?MAKE:fpossize: Myread Typedef fpostype Compile longsize run
?MAKE: -pick add $@ %<
?S:fpossize:
?S: This variable contains the size of a fpostype in bytes.
?C:.
?H:#define Fpos_t_size $fpossize /* FPOS size */
?H:.
-?F:!try
?T:yyy zzz
?LINT: set fpossize
echo " "
EOCP
set try
if eval $compile_ok; then
- yyy=`./try`
+ yyy=`$run ./try`
case "$yyy" in
'') fpossize=4
echo "(I can't execute the test program--guessing $fpossize.)" >&4
?RCS: of the source tree for dist 3.0.
?RCS:
?MAKE:gccversion gccosandvers: cat cpp rm +cc \
- Mcc Myread Guess Options Oldconfig Loc osname osvers
+ Mcc Myread Guess Options Oldconfig Loc osname osvers run
?MAKE: -pick add $@ %<
?S:gccversion:
?S: If GNU cc (gcc) is used, this variable holds '1' or '2' to
?S: or if nothing useful can be parsed as the os version.
?S:.
?T:gccshortvers
-?F:!gccvers
?D:gccversion=''
?LINT:change cpp
?LINT:extern ccflags
?X: Check if they have gcc in any guise.
echo " "
echo "Checking for GNU cc in disguise and/or its version number..." >&4
-$cat >gccvers.c <<EOM
+$cat >try.c <<EOM
#include <stdio.h>
int main() {
#ifdef __GNUC__
exit(0);
}
EOM
-if $cc -o gccvers $ccflags $ldflags gccvers.c; then
- gccversion=`./gccvers`
+if $cc -o try $ccflags $ldflags try.c; then
+ gccversion=`$run ./try`
case "$gccversion" in
'') echo "You are not using GNU cc." ;;
*) echo "You are using GNU cc $gccversion."
;;
esac
fi
-$rm -f gccvers*
+$rm -f try try.*
case "$gccversion" in
1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
esac
?MAKE:i_db db_hashtype db_prefixtype \
db_version_major db_version_minor db_version_patch : \
Inhdr +cc +ccflags rm contains cat \
- Compile d_const libs sed
+ Compile d_const libs sed run
?MAKE: -pick add $@ %<
?S:i_db:
?S: This variable conditionally defines the I_DB symbol, and indicates
?H:#define DB_VERSION_MINOR_CFG $db_version_minor /**/
?H:#define DB_VERSION_PATCH_CFG $db_version_patch /**/
?H:.
-?F:!try
?LINT:set i_db
?LINT:change libs
: see if this is a db.h system
}
EOCP
set try
- if eval $compile_ok && ./try; then
+ if eval $compile_ok && $run ./try; then
echo 'Looks OK.' >&4
- set `./try 1`
+ set `$run ./try 1`
db_version_major=$1
db_version_minor=$2
db_version_patch=$3
sPRIgldbl d_PRIeldbl sPRIeldbl sPRIFUldbl d_PRIGUldbl sPRIEUldbl \
d_SCNfldbl \
sSCNfldbl: \
- d_longdbl longdblsize doublesize test cat rm Setvar Compile exe_ext
+ d_longdbl longdblsize doublesize test cat rm \
+ Setvar Compile run
?MAKE: -pick add $@ %<
?S:d_PRIfldbl:
?S: This variable conditionally defines the PERL_PRIfldbl symbol, which
?H:#$d_PRIEUldbl PERL_PRIEldbl $sPRIEUldbl /**/
?H:#$d_SCNfldbl PERL_SCNfldbl $sSCNfldbl /**/
?H:.
-?F:!try
?T:yyy
echo " "
EOCP
set try
if eval $compile; then
- yyy=`./try$exe_ext`
+ yyy=`$run ./try`
case "$yyy" in
123.456)
sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"';
EOCP
set try
if eval $compile; then
- yyy=`./try$exe_ext`
+ yyy=`$run ./try`
case "$yyy" in
123.456)
sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
EOCP
set try
if eval $compile; then
- yyy=`./try$exe_ext`
+ yyy=`$run ./try`
case "$yyy" in
123.456)
sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
EOCP
set try
if eval $compile; then
- yyy=`./try$exe_ext`
+ yyy=`$run ./try`
case "$yyy" in
123.456)
sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
?RCS: that same Artistic Licence; a copy of which may be found at the root
?RCS: of the source tree for dist 3.0.
?RCS:
-?MAKE:need_va_copy: +ccflags rm cat Compile i_stdarg i_stdlib
+?MAKE:need_va_copy: +ccflags rm cat Compile i_stdarg i_stdlib run
?MAKE: -pick add $@ %<
?S:need_va_copy:
?S: This symbol, if defined, indicates that the system stores
?H:#$need_va_copy NEED_VA_COPY /**/
?H:.
?T:okay
-?F:!try
?LINT:set need_va_copy
: see if we need va_copy
echo " "
}
EOCP
set try
- if eval $compile && ./try 2>&1 >/dev/null; then
- case "`./try`" in
+ if eval $compile && $run ./try 2>&1 >/dev/null; then
+ case "`$run ./try`" in
"that's all right, then")
okay=yes
;;
echo rm use64bitint d_quad quadtype uquadtype \
d_longdbl uselongdouble longdblsize doublesize \
charsize shortsize intsize longsize \
- cat Compile i_inttypes exe_ext test d_volatile signal_t
+ cat Compile i_inttypes test d_volatile signal_t run
?MAKE: -pick add $@ %<
?S:ivtype:
?S: This variable contains the C type used for Perl's IV.
?H:#$d_nv_preserves_uv NV_PRESERVES_UV
?H:#define NV_PRESERVES_UV_BITS $d_nv_preserves_uv_bits
?H:.
-?F:!try
?T:volatile
echo " "
case "$i8type" in
'') set try -DINT8
if eval $compile; then
- case "`./try$exe_ext`" in
+ case "`$run ./try`" in
int8_t) i8type=int8_t
u8type=uint8_t
i8size=1
case "$i16type" in
'') set try -DINT16
if eval $compile; then
- case "`./try$exe_ext`" in
+ case "`$run ./try`" in
int16_t)
i16type=int16_t
u16type=uint16_t
case "$i32type" in
'') set try -DINT32
if eval $compile; then
- case "`./try$exe_ext`" in
+ case "`$run ./try`" in
int32_t)
i32type=int32_t
u32type=uint32_t
d_nv_preserves_uv="$undef"
if eval $compile; then
- d_nv_preserves_uv_bits="`./try$exe_ext`"
+ d_nv_preserves_uv_bits="`$run ./try`"
fi
case "$d_nv_preserves_uv_bits" in
\-[1-9]*)
?RCS:
?MAKE:d_PRId64 d_PRIi64 d_PRIu64 d_PRIo64 d_PRIx64 d_PRIXU64 \
sPRId64 sPRIi64 sPRIu64 sPRIo64 sPRIx64 sPRIXU64: \
- quadtype i_inttypes test cat rm Setvar Compile exe_ext
+ quadtype i_inttypes test cat rm Setvar Compile run
?MAKE: -pick add $@ %<
?S:d_PRId64:
?S: This variable conditionally defines the PERL_PRId64 symbol, which
?H:#$d_PRIx64 PERL_PRIx64 $sPRIx64 /**/
?H:#$d_PRIx64 PERL_PRIXU64 $sPRIXU64 /**/
?H:.
-?F:!try
?T:yyy
echo " "
EOCP
set try
if eval $compile; then
- yyy=`./try$exe_ext`
+ yyy=`$run ./try`
case "$yyy" in
12345678901)
sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"';
EOCP
set try
if eval $compile; then
- yyy=`./try$exe_ext`
+ yyy=`$run ./try`
case "$yyy" in
12345678901)
sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"';
EOCP
set try
if eval $compile; then
- yyy=`./try$exe_ext`
+ yyy=`$run ./try`
case "$yyy" in
12345678901)
sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64;
EOCP
set try
if eval $compile; then
- yyy=`./try$exe_ext`
+ yyy=`$run ./try`
case "$yyy" in
12345678901)
sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"';
EOCP
set try
if eval $compile; then
- yyy=`./try$exe_ext`
+ yyy=`$run ./try`
case "$yyy" in
12345678901)
sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"';
EOCP
set try
if eval $compile; then
- yyy=`./try$exe_ext`
+ yyy=`$run ./try`
case "$yyy" in
12345678901)
sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"';
?RCS:
?MAKE:selectminbits: Compile cat rm Oldconfig d_select \
i_time i_systime i_systimek i_sysselct selecttype d_socket \
- byteorder Myread Setvar
+ byteorder Myread Setvar run
?MAKE: -pick add $@ %<
?S:selectminbits:
?S: This variable holds the minimum number of bits operated by select.
?C:.
?H:#define SELECT_MIN_BITS $selectminbits /**/
?H:.
-?F:!try
?T:bits
: check for the select 'width'
case "$selectminbits" in
EOCP
set try
if eval $compile_ok; then
- selectminbits=`./try`
+ selectminbits=`$run ./try`
case "$selectminbits" in
'') cat >&4 <<EOM
Cannot figure out on how many bits at a time your select() operates.
?RCS: that same Artistic Licence; a copy of which may be found at the root
?RCS: of the source tree for dist 3.0.
?RCS:
-?MAKE:d_stdio_stream_array stdio_stream_array: \
+?MAKE:d_stdio_stream_array stdio_stream_array: run \
Compile cat rm Oldconfig Myread Setvar exe_ext
?MAKE: -pick add $@ %<
?S:d_stdio_stream_array:
?H:#endif
?H:.
?T:s
-?F:!try
?LINT:set d_stdio_stream_array
$cat >&4 <<EOM
Checking how to access stdio streams by file descriptor number...
do
set try -DSTDIO_STREAM_ARRAY=$s
if eval $compile; then
- case "`./try$exe_ext`" in
+ case "`$run ./try`" in
yes) stdio_stream_array=$s; break ;;
esac
fi
ldflags_uselargefiles \
libswanted_uselargefiles: \
Myread Oldconfig Setvar test lseeksize fpossize \
- fpostype Compile echo n c cat lseektype rm
+ fpostype Compile echo n c cat lseektype rm run
?MAKE: -pick add $@ %<
?Y:TOP
?S:uselargefiles:
?H:?%<:#$uselargefiles USE_LARGE_FILES /**/
?H:?%<:#endif
?H:.
-?F:!uselargefiles.cbu !try
+?F:!uselargefiles.cbu
?INIT:ccflags_uselargefiles=''
?INIT:ldflags_uselargefiles=''
?INIT:libswanted_uselargefiles=''
EOCP
set try
if eval $compile_ok; then
- lseeksize=`./try`
+ lseeksize=`$run ./try`
$echo "Your file offsets are now $lseeksize bytes long."
else
dflt="$lseeksize"
EOCP
set try
if eval $compile_ok; then
- yyy=`./try`
+ yyy=`$run ./try`
dflt="$lseeksize"
case "$yyy" in
'') echo " "
+++ /dev/null
-?RCS: $Id: Target.U,v $
-?RCS:
-?RCS: Copyright (c) 1998 Andy Dougherty
-?RCS:
-?RCS: You may distribute under the terms of either the GNU General Public
-?RCS: License or the Artistic License, as specified in the README file.
-?RCS:
-?RCS: $Log: Target.U,v $
-?RCS:
-?MAKE:target_host target_root target_run : Oldconfig
-?MAKE: -pick add $@ %<
-?Y:TOP
-?X: This unit provides some basic stubs to support cross-compilation.
-?X: Thanks to Jarkko Hietaniemi <jhi@iki.fi>.
-?X:
-?S:target_host:
-?S: This variable describes the cross-compilation host. By
-?S: default, it is empty. Nothing useful is done with it yet.
-?S:.
-?S:target_root:
-?S: This variable describes the cross-compilation host. By
-?S: default, it is empty. Nothing useful is done with it yet.
-?S:.
-?S:target_run:
-?S: This variable describes how to run a C program for the target.
-?S: All Configure units that compile and run a test C program ought to
-?S: do something like
-?S: $target_run ./try args
-?S: By default, it is empty and nothing useful is done with it yet.
-?S:.
-?LINT:set target_host target_root target_run
-
?RCS:
?MAKE:archname myarchname: sed Loc Myread Oldconfig osname test rm \
usethreads usemultiplicity use64bitint use64bitall archname64 \
- uselongdouble longdblsize doublesize useperlio
+ uselongdouble longdblsize doublesize useperlio targetarch
?MAKE: -pick add $@ %<
?S:archname:
?S: This variable is a short name to characterize the current
archname=''
;;
esac
+case "$targetarch" in
+'') ;;
+?X: Very GCCian.
+*) archname=`echo $targetarch|sed 's,^[^-]*-,,'` ;;
+esac
myarchname="$tarch"
case "$archname" in
'') dflt="$tarch";;
?RCS: You may distribute under the terms of either the GNU General Public
?RCS: License or the Artistic License, as specified in the README file.
?RCS:
-?MAKE:d_pthreads_created_joinable: cat Compile rm usethreads Setvar i_pthread
+?MAKE:d_pthreads_created_joinable: cat Compile rm usethreads Setvar \
+ i_pthread run
?MAKE: -pick add $@ %<
?S:d_pthreads_created_joinable:
?S: This variable conditionally defines the PTHREADS_CREATED_JOINABLE
?C:.
?H:#$d_pthreads_created_joinable PTHREADS_CREATED_JOINABLE /**/
?H:.
-?F:!try
?T:yyy
?LINT: set d_pthreads_created_joinable
: test whether pthreads are created in joinable -- aka undetached -- state
EOCP
set try
if eval $compile; then
- yyy=`./try`
+ yyy=`$run ./try`
case "$yyy" in
detached) echo "No, they aren't." ;;
*) echo "Yes, they are." ;;
else
set try -DPTHREAD_ATTR_GETDETACHSTATE_INT
if eval $compile; then
- yyy=`./try`
+ yyy=`$run ./try`
case "$yyy" in
detached) echo "No, they aren't." ;;
*) echo "Yes, they are." ;;
?RCS: that same Artistic Licence; a copy of which may be found at the root
?RCS: of the source tree for dist 3.0.
?RCS:
-?MAKE:gidsign: Myread Typedef gidtype Compile
+?MAKE:gidsign: Myread Typedef gidtype Compile run
?MAKE: -pick add $@ %<
?S:gidsign:
?S: This variable contains the signedness of a gidtype.
?C:.
?H:#define Gid_t_sign $gidsign /* GID sign */
?H:.
-?F:!try
?T:yyy zzz
?LINT: set gidsign
echo " "
EOCP
set try
if eval $compile; then
- yyy=`./try`
+ yyy=`$run ./try`
case "$yyy" in
'') gidsign=1
echo "(I can't execute the test program--guessing unsigned.)" >&4
?RCS: that same Artistic Licence; a copy of which may be found at the root
?RCS: of the source tree for dist 3.0.
?RCS:
-?MAKE:gidsize: Myread Typedef gidtype Compile
+?MAKE:gidsize: Myread Typedef gidtype Compile run
?MAKE: -pick add $@ %<
?S:gidsize:
?S: This variable contains the size of a gidtype in bytes.
?C:.
?H:#define Gid_t_size $gidsize /* GID size */
?H:.
-?F:!try
?T:yyy zzz
?LINT: set gidsize
echo " "
EOCP
set try
if eval $compile_ok; then
- yyy=`./try`
+ yyy=`$run ./try`
case "$yyy" in
'') gidsize=4
echo "(I can't execute the test program--guessing $gidsize.)" >&4
?RCS: Revision 3.0 1993/08/18 12:09:08 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:lseektype lseeksize: Myread Typedef cat Compile rm longsize
+?MAKE:lseektype lseeksize: Myread Typedef cat Compile rm longsize run
?MAKE: -pick add $@ %<
?S:lseektype:
?S: This variable defines lseektype to be something like off_t, long,
?H:#define LSEEKSIZE $lseeksize /* <offset> size */
?H:#define Off_t_size $lseeksize /* <offset> size */
?H:.
-?F:!try
?LINT:set lseektype
?LINT:set lseeksize
: see what type lseek is declared as in the kernel
EOCP
set try
if eval $compile_ok; then
- lseeksize=`./try`
+ lseeksize=`$run ./try`
echo "Your file offsets are $lseeksize bytes long."
else
dflt=$longsize
?RCS: that same Artistic Licence; a copy of which may be found at the root
?RCS: of the source tree for dist 3.0.
?RCS:
-?MAKE:pidsign: Myread Typedef pidtype Compile
+?MAKE:pidsign: Myread Typedef pidtype Compile run
?MAKE: -pick add $@ %<
?S:pidsign:
?S: This variable contains the signedness of a pidtype.
?C:.
?H:#define Pid_t_sign $pidsign /* PID sign */
?H:.
-?F:!try
?T:yyy zzz
?LINT: set pidsign
echo " "
EOCP
set try
if eval $compile; then
- yyy=`./try`
+ yyy=`$run ./try`
case "$yyy" in
'') pidsign=1
echo "(I can't execute the test program--guessing unsigned.)" >&4
?RCS: that same Artistic Licence; a copy of which may be found at the root
?RCS: of the source tree for dist 3.0.
?RCS:
-?MAKE:pidsize: Myread Typedef pidtype Compile
+?MAKE:pidsize: Myread Typedef pidtype Compile run
?MAKE: -pick add $@ %<
?S:pidsize:
?S: This variable contains the size of a pidtype in bytes.
?C:.
?H:#define Pid_t_size $pidsize /* PID size */
?H:.
-?F:!try
?T:yyy zzz
?LINT: set pidsize
echo " "
EOCP
set try
if eval $compile_ok; then
- yyy=`./try`
+ yyy=`$run ./try`
case "$yyy" in
'') pidsize=4
echo "(I can't execute the test program--guessing $pidsize.)" >&4
?RCS: that same Artistic Licence; a copy of which may be found at the root
?RCS: of the source tree for dist 3.0.
?RCS:
-?MAKE:sizesize: Myread Typedef sizetype Compile
+?MAKE:sizesize: Myread Typedef sizetype Compile run
?MAKE: -pick add $@ %<
?S:sizesize:
?S: This variable contains the size of a sizetype in bytes.
?C:.
?H:#define Size_t_size $sizesize /* */
?H:.
-?F:!try
?T:yyy zzz
?LINT: set sizesize
echo " "
EOCP
set try
if eval $compile_ok; then
- yyy=`./try`
+ yyy=`$run ./try`
case "$yyy" in
'') sizesize=4
echo "(I can't execute the test program--guessing $sizesize.)" >&4
?RCS: that same Artistic Licence; a copy of which may be found at the root
?RCS: of the source tree for dist 3.0.
?RCS:
-?MAKE:ssizesize: Myread Typedef ssizetype Compile
-?MAKE: -pick add $@ %<
+?MAKE:ssizesize: Myread Typedef ssizetype Compile run
+?MAKE: -pick add $@ %< run
?S:ssizesize:
?S: This variable contains the size of a ssizetype in bytes.
?S:.
?C:.
?H:#define Ssize_t_size $ssizesize /* */
?H:.
-?F:!try
?T:yyy zzz
?LINT: set ssizesize
echo " "
EOCP
set try
if eval $compile_ok; then
- yyy=`./try`
+ yyy=`$run ./try`
case "$yyy" in
'') ssizesize=4
echo "(I can't execute the test program--guessing $ssizesize.)" >&4
?RCS: that same Artistic Licence; a copy of which may be found at the root
?RCS: of the source tree for dist 3.0.
?RCS:
-?MAKE:uidsign: Myread Typedef uidtype Compile
+?MAKE:uidsign: Myread Typedef uidtype Compile run
?MAKE: -pick add $@ %<
?S:uidsign:
?S: This variable contains the signedness of a uidtype.
?C:.
?H:#define Uid_t_sign $uidsign /* UID sign */
?H:.
-?F:!try
?T:yyy zzz
?LINT: set uidsign
echo " "
EOCP
set try
if eval $compile; then
- yyy=`./try`
+ yyy=`$run ./try`
case "$yyy" in
'') uidsign=1
echo "(I can't execute the test program--guessing unsigned.)" >&4
?RCS: that same Artistic Licence; a copy of which may be found at the root
?RCS: of the source tree for dist 3.0.
?RCS:
-?MAKE:uidsize: Myread Typedef uidtype Compile
+?MAKE:uidsize: Myread Typedef uidtype Compile run
?MAKE: -pick add $@ %<
?S:uidsize:
?S: This variable contains the size of a uidtype in bytes.
?C:.
?H:#define Uid_t_size $uidsize /* UID size */
?H:.
-?F:!try
?T:yyy zzz
?LINT: set uidsize
echo " "
EOCP
set try
if eval $compile_ok; then
- yyy=`./try`
+ yyy=`$run ./try`
case "$yyy" in
'') uidsize=4
echo "(I can't execute the test program--guessing $uidsize.)" >&4