echo " "
echo "Checking which 64-bit integer type we could use..." >&4
+?X: We prefer quad types in order of int, long, long long, int64_t.
case "$intsize" in
8) val=int
eval $setvar
quadkind=2
;;
- *) case "$uselonglong:$d_longlong:$longlongsize" in
- define:define:8)
+ *) case "$d_longlong:$longlongsize" in
+ define:8)
val='"long long"'
set quadtype
eval $setvar
?X:
?MAKE:Cppsym ccsymbols cppsymbols cppccsymbols: \
eunicefix Guess awk cat tr sed sort rm startsh osname exe_ext \
- Compile +cc +gccversion test comm uniq echo Options trnl
+ +cc +gccversion test comm uniq echo Options trnl \
+ optimize ccflags ldflags libs
?MAKE: -pick add $@ %<
-?T:also symbols i postprocess_cc_v xxx
+?T:also symbols i postprocess_cc_v
?X:
?X: The symbol list is in alpha order for ease of maintenance...
?X:
?F:!ccsym.com
?F:!ccsym.cpp
?F:!ccsym.own
+?X: fake LINT hints
+?LINT:change cc
+?LINT:change exe_ext
+?LINT:change optimize
+?LINT:change ccflags
+?LINT:change ldflags
+?LINT:change libs
+?LINT:extern s
+?LINT:change s
+?LINT:extern s__
+?LINT:change s__
echo " "
$echo "Guessing which symbols your C compiler and preprocessor define..." >&4
?X: If your symbol is mixed case, just add it as-is.
cat <<EOSH > Cppsym
$startsh
if $test \$# -gt 0; then
- echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
+ echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
+ if $test -s Cppsym.got; then
+ $rm -f Cppsym.got
+ exit 0
+ fi
+ $rm -f Cppsym.got
+ exit 1
else
- $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
+ $tr " " "$trnl" | ./Cppsym.try
+ exit 0
fi
-$test -s Cppsym.got && exit 0
-exit 1
EOSH
chmod +x Cppsym
$eunicefix Cppsym
+?X: The below awk script will die a horrible death if
+?X: some of the tested symbols are not long ints.
+?X: Also, we do not make difference between just defined and defined zero.
cat <<EOSH > Cppsym.try
+$startsh
cat <<'EOCP' > try.c
#include <stdio.h>
int main() {
EOSH
cat <<'EOSH' >> Cppsym.try
'length($1) > 0 {
- printf "#ifdef %s\nprintf(\"%s\\n\");\n#endif\n", $1, $1
- printf "#ifdef _%s\nprintf(\"_%s\\n\");\n#endif\n", $1, $1
- printf "#ifdef __%s\nprintf(\"__%s\\n\");\n#endif\n", $1, $1
- printf "#ifdef __%s__\nprintf(\"__%s__\\n\");\n#endif\n", $1, $1 }' \
- >> try.c
+ printf "#ifdef %s\n#if %s+0\nprintf(\"%s=%%ld\\n\", %s);\n#else\nprintf(\"%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+ printf "#ifdef _%s\n#if _%s+0\nprintf(\"_%s=%%ld\\n\", _%s);\n#else\nprintf(\"_%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+ printf "#ifdef __%s\n#if __%s+0\nprintf(\"__%s=%%ld\\n\", __%s);\n#else\nprintf(\"__%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+ printf "#ifdef __%s__\n#if __%s__+0\nprintf(\"__%s__=%%ld\\n\", __%s__);\n#else\nprintf(\"__%s__\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+}' >> try.c
echo '}' >> try.c
EOSH
-cat <<'EOSH' >> Cppsym.try
-set try
-eval $compile_ok && ./try$exe_ext
+cat <<EOSH >> Cppsym.try
+cc="$cc"
+optimize="$optimize"
+ccflags="$ccflags"
+ldflags="$ldflags"
+libs="$libs"
+exe_ext="$exe_ext"
+$cc $optimize $ccflags $ldflags -o try$exe_ext try.c $libs && ./try$exe_ext
EOSH
chmod +x Cppsym.try
$eunicefix Cppsym.try
?X: the awk script must be on two lines for older awk programs, sigh! -- ADO
$awk '/\=/ { print $0; next }
{ print $0"=1" }' ccsym.raw >ccsym.list
-$awk '{ print $0"=1" }' Cppsym.true >ccsym.true
+$awk '/\=/ { print $0; next }
+ { print $0"=1" }' Cppsym.true >ccsym.true
$comm -13 ccsym.true ccsym.list >ccsym.own
$comm -12 ccsym.true ccsym.list >ccsym.com
$comm -23 ccsym.true ccsym.list >ccsym.cpp
?C:.
?H:?%<:#$d_gethname HAS_GETHOSTNAME /**/
?H:?%<:#$d_uname HAS_UNAME /**/
-?H:?%<:#$d_phostname HAS_PHOSTNAME
+?H:?%<:#$d_phostname HAS_PHOSTNAME /**/
?H:?%<:#ifdef HAS_PHOSTNAME
?H:?%<:#define PHOSTNAME "$aphostname" /* How to get the host name */
?H:?%<:#endif
?RCS: Revision 3.0 1993/08/18 12:09:03 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:libs ignore_versioned_solibs: \
+?MAKE:libs ignore_versioned_solibs libsfound libsfiles libsdirs: \
test cat Myread Oldconfig Loc libpth package xlibpth so _a \
- usesocks use64bits
+ usesocks ccflags
?MAKE: -pick add $@ %<
?S:libs:
?S: This variable holds the additional libraries we want to use.
?S: It is up to the Makefile to deal with it.
?S:.
+?S:libsfound:
+?S: This variable holds the full pathnames of the libraries
+?S: we found and accepted.
+?S:.
+?S:libsfiles:
+?S: This variable holds the filenames aka basenames of the libraries
+?S: we found and accepted.
+?S:.
+?S:libsdirs:
+?S: This variable holds the directory names aka dirnames of the libraries
+?S: we found and accepted, duplicates are removed.
+?S:.
?S:ignore_versioned_solibs:
?S: This variable should be non-empty if non-versioned shared
?S: libraries (libfoo.so.x.y) are to be ignored (because they
?S: cannot be linked against).
?S:.
-?T:xxx thislib libswanted libstyle libname
+?T:xxx yyy thislib libswanted libstyle libname
?D:libs=''
?X:
?X: This order is chosen so that libraries -lndir, -ldir, -lucb, -lbsd,
?X:: default ordered library list
?X:libswanted='net socket inet nsl nm sdbm gdbm ndbm dbm malloc dl'
?X:libswanted="$libswanted dld sun m c_s c posix cposix ndir dir ucb"
-?X:libswanted="$libswanted bsd BSD PW x"
+?X:libswanted="$libswanted bsd BSD PW x iconv"
?X:
?INIT:: default library list
?INIT:libswanted=''
?INIT:: some systems want to use only the non-versioned libso:s
?INIT:ignore_versioned_solibs=''
+?LINT:extern libscheck
: Looking for optional libraries
echo " "
echo "Checking for optional libraries..." >&4
libname="$thislib"
if xxx=`./loc lib$thislib.$so.[0-9]'*' X $libpth`; $test -f "$xxx"; then
if $test -a "X$ignore_versioned_solibs" = "X"; then
- xxx=/ignored/$xxx
+ xxx=/ignored$xxx
else
libstyle=shared
fi
libstyle="static"
fi
if $test -f "$xxx"; then
-?X: HP-UX 64-bit compilation works only with 64-bit libraries.
- if test X"$osname" = Xhpux -a -f /lib/pa20_64/libc.sl; then
- case "`file $xxx`" in
- *LP64*) ;;
- *) xxx=/non/64/bit/$xxx ;;
- esac
- fi
+?X: If $xxx is not to be used as a library, $libscheck (set in
+?X: some hints file, most likely) should set the $xxx to a non-file.
+ eval $libscheck
fi
if $test -f "$xxx"; then
case "$libstyle" in
esac
case " $dflt " in
*"-l$thislib "*);;
- *) dflt="$dflt -l$libname";;
+ *) dflt="$dflt -l$libname"
+ libsfound="$libsfound $xxx"
+ yyy=`basename $xxx`
+ libsfiles="$libsfiles $yyy"
+ yyy=`echo $xxx|sed "s@/$yyy\\$@@"`
+ case " $libsdirs " in
+ *" $yyy "*) ;;
+ *) libsdirs="$libsdirs $yyy" ;;
+ esac
+ ;;
esac
else
echo "No -l$thislib."
set fseeko d_fseeko
eval $inlibc
case "$longsize" in
-8) echo "(Your long is 64 bits, so in a pinch you could use fseek.)" ;;
+8) echo "(Your long is 64 bits, so you could use fseek.)" ;;
esac
set ftello d_ftello
eval $inlibc
case "$longsize" in
-8) echo "(Your long is 64 bits, so in a pinch you could use ftell.)" ;;
+8) echo "(Your long is 64 bits, so you could use ftell.)" ;;
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:uselongdouble: Myread Oldconfig Setvar cat test usemorebits
+?MAKE:uselongdouble: Myread Oldconfig Setvar cat test usemorebits d_sqrtl
?MAKE: -pick add $@ %<
?Y:TOP
?S:uselongdouble:
;;
esac
+case "$uselongdouble:$d_sqrtl" in
+$define:$undef)
+ $cat <<EOM >&4
+
+You requested the use of long doubles but you do not seem to have
+the mathematic functions for long doubles. I'm disabling the use
+of long doubles.
+EOM
+ uselongdouble=$undef
+ ;;
+esac
+
esac
case "$uselonglong" in
-$define|true|[yY]*) dflt='y';;
-*) dflt='n';;
+'') dflt='y';;
esac
rp='Try to use long longs if available?'
. ./myread
?C: This symbol, if defined, indicates that Perl should
?C: be built to use multiplicity.
?C:.
-?H:?%<:#ifndef MULTIPLICTY
+?H:?%<:#ifndef MULTIPLICITY
?H:?%<:#$usemultiplicity MULTIPLICITY /**/
?H:?%<:#endif
?H:.
?RCS:
?RCS: $Log: xs_apiversion.U,v $
?RCS:
-?MAKE:xs_apiversion pm_apiversion: apiversion bincompat5005
+?MAKE:xs_apiversion pm_apiversion: version bincompat5005
?MAKE: -pick add $@ %<
?S:xs_apiversion:
?S: This variable contains the version of the oldest perl binary
?C: (presumably) be similar.
?C: See the INSTALL file for how this works.
?C:.
-?H:#define PERL_XS_APIVERSION $xs_apiversion /* Change to string for tuples?*/
-?H:#define PERL_PM_APIVERSION $pm_apiversion /* Change to string for tuples?*/
+?H:#define PERL_XS_APIVERSION "$xs_apiversion"
+?H:#define PERL_PM_APIVERSION "$pm_apiversion"
?H:.
: Find earliest binary compatible site_perl subdirectory perl can use.
case "$bincompat5005" in
"$define") xs_apiversion='5.005' ;;
-*) xs_apiversion=$apiversion ;; # The current site_perl version.
+*) xs_apiversion=$version ;; # The current site_perl version.
esac
: Find earliest pure perl site_perl subdirectory perl can use.
: The versioned directories started at 5.005.