Lines Matching +full:- +full:vv
3 #-
11 # is granted to deal in this work without restriction, including un-
23 #-
36 if test -n "${ZSH_VERSION+x}" && (emulate sh) >/dev/null 2>&1; then
41 if test -d /usr/xpg4/bin/. >/dev/null 2>&1; then
83 rm -f "$bn.gen"
121 test -f "$srcfile" || genopt_die Source file \$srcfile not set.
152 0:/\*-|0:\ \**|0:)
216 set x -G "$srcfile"
219 if test x"$1" = x"-G"; then
225 ls -l /dev/null /dev/tty
232 vv() { function
236 eval "$@" >vv.out 2>&1
237 sed "s^${_c} " <vv.out
248 *) rm -f "$_f" ;;
261 oldish_ed=stdout-ed,no-stderr-ed
263 if test -t 1; then
303 fd=${3-$f}
318 fd=${3-$f}
339 vv ']' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN conftest.c $LIBS $ccpr"
340 test $tcfn = no && test -f a.out && tcfn=a.out
341 test $tcfn = no && test -f a.exe && tcfn=a.exe
342 test $tcfn = no && test -f conftest.exe && tcfn=conftest.exe
343 test $tcfn = no && test -f conftest && tcfn=conftest
344 if test -f $tcfn; then
354 test $ct = sunpro && vscan='-e ignored -e turned.off'
356 test_n "$vscan" && grep $vscan vv.out >/dev/null 2>&1 && fv=$fr
361 rmf conftest.c conftest.o ${tcfn}* vv.out
368 ac_testn "$@" <<-EOF
395 add_cppflags -DHAVE_$fu=$fv
403 # ac_flags [-] add varname cflags [text] [ldflags]
405 if test x"$1" = x"-"; then
424 ac_testn can_$vn '' "$ft" <<-'EOF'
445 hv=`echo "$hf" | tr -d "$lfcr" | tr -c $alll$allu$alln $alls`
502 dstversion=`sed -n '/define MKSH_VERSION/s/^.*"\([^"]*\)".*$/\1/p' "$srcdir/sh.h"`
503 add_cppflags -DMKSH_BUILDSH
510 optflags=-std-compile-opts
526 echo "$me: Unknown option -c '$i'!" >&2
533 :-c)
536 :-E)
539 :-G)
540 echo "$me: Do not call me with '-G'!" >&2
543 :-g)
545 add_cppflags -DDEBUG
546 CFLAGS="$CFLAGS -g3 -fno-builtin"
548 :-j)
551 :-L)
557 :-M)
560 :-O)
561 optflags=-std-compile-opts
563 :-o)
566 :-Q)
569 :-r)
572 :-T)
578 :-v)
588 echo "$me: Unknown option -'$last' '$i'!" >&2
594 echo "$me: Option -'$last' not followed by argument!" >&2
603 if test -d $tfn || test -d $tfn.exe; then
608 *.ll *.o *.gen *.cat1 Rebuild.sh lft no signames.inc test.sh x vv.out *.htm
614 check_categories="$check_categories shell:legacy-no int:32"
616 check_categories="$check_categories shell:legacy-yes"
617 add_cppflags -DMKSH_LEGACY_MODE
621 add_cppflags -DMKSH_EBCDIC
625 check_categories="$check_categories shell:textmode-no shell:binmode-yes"
627 check_categories="$check_categories shell:textmode-yes shell:binmode-no"
628 add_cppflags -DMKSH_WITH_TEXTMODE
632 CPPFLAGS="-I. $CPPFLAGS"
634 CPPFLAGS="-I. -I'$srcdir' $CPPFLAGS"
643 x=`uname -s 2>/dev/null || uname`
644 test x"$x" = x"`uname -n 2>/dev/null`" || TARGET_OS=$x
651 ccpc=-Wc,
652 ccpl=-Wl,
654 ccpr='|| for _f in ${tcfn}*; do case $_f in *.1|*.faq|*.ico) ;; *) rm -f "$_f" ;; esac; done'
679 vv ']' "${CC-cc} -E $CFLAGS $CPPFLAGS $NOWARN conftest.c | grep ct= | tr -d \\\\015 >x"
682 rmf x vv.out
709 grep 'NeXT Mach [0-9][0-9.]*:' | \
710 sed 's/^.*NeXT Mach \([0-9][0-9.]*\):.*$/\1/'`
713 test_n "$TARGET_OSREV" || TARGET_OSREV=`uname -r`
721 add_cppflags -DMKSH_NO_SIGSETJMP
722 add_cppflags -DMKSH_TYPEDEF_SIG_ATOMIC_T=int
725 add_cppflags -D_POSIX_SOURCE
727 : "${LIBS=-lposix}"
729 add_cppflags -D__A_UX__
732 add_cppflags -D_ALL_SOURCE
746 add_cppflags -DMKSH_UNEMPLOYED
747 add_cppflags -DMKSH_DISABLE_TTY_WARNING
749 add_cppflags -DMKSH__NO_SETEUGID
756 add_cppflags -DMKSH__NO_SYMLINK
758 add_cppflags -DMKSH__NO_SETEUGID
759 add_cppflags -DMKSH_DISABLE_TTY_WARNING
765 add_cppflags -D_DARWIN_C_SOURCE
773 add_cppflags -D_GNU_SOURCE
779 *) add_cppflags -D_GNU_SOURCE ;;
781 add_cppflags -DSETUID_CAN_FAIL_WITH_EAGAIN
782 # define MKSH__NO_PATH_MAX to use Hurd-only functions
783 add_cppflags -DMKSH__NO_PATH_MAX
788 *) add_cppflags -D_GNU_SOURCE ;;
790 add_cppflags -DSETUID_CAN_FAIL_WITH_EAGAIN
793 add_cppflags -DMKSH_ASSUME_UTF8
798 add_cppflags -D_POSIX_SOURCE
799 add_cppflags -D_LIMITS_EXTENSION
800 add_cppflags -D_BSD_EXTENSION
801 add_cppflags -D_SUSV2_SOURCE
802 add_cppflags -D_GNU_SOURCE
803 add_cppflags -DMKSH_ASSUME_UTF8
806 add_cppflags -DMKSH__NO_SYMLINK
808 add_cppflags -DMKSH_NO_CMDLINE_EDITING
809 add_cppflags -DMKSH__NO_SETEUGID
811 add_cppflags -DMKSH_UNEMPLOYED
812 add_cppflags -DMKSH_NOPROSPECTOFWORK
813 # these taken from Harvey-OS github and need re-checking
814 add_cppflags -D_setjmp=setjmp -D_longjmp=longjmp
819 HP-UX)
822 ccpc='-X '
823 ccpl='-Y '
824 add_cppflags -D_ALL_SOURCE
825 : "${LIBS=-lcrypt}"
832 add_cppflags -DMKSH_ASSUME_UTF8
835 add_cppflags -DMKSH__NO_SYMLINK
837 add_cppflags -DMKSH_NO_CMDLINE_EDITING
838 add_cppflags -DMKSH_DISABLE_REVOKE_WARNING
839 add_cppflags '-D_PATH_DEFPATH=\"/cmd\"'
840 add_cppflags '-DMKSH_DEFAULT_EXECSHELL=\"/cmd/mksh\"'
841 add_cppflags '-DMKSH_DEFAULT_PROFILEDIR=\"/cfg/mksh\"'
842 add_cppflags '-DMKSH_ENVDIR=\"/env\"'
848 *) add_cppflags -D_GNU_SOURCE ;;
850 add_cppflags -DSETUID_CAN_FAIL_WITH_EAGAIN
857 add_cppflags -D_GNU_SOURCE
863 Minix-vmd)
864 add_cppflags -DMKSH__NO_SETEUGID
865 add_cppflags -DMKSH_UNEMPLOYED
866 add_cppflags -D_MINIX_SOURCE
867 oldish_ed=no-stderr-ed # no /bin/ed, maybe see below
871 add_cppflags -DMKSH_UNEMPLOYED
872 add_cppflags -D_POSIX_SOURCE -D_POSIX_1_SOURCE=2 -D_MINIX
873 oldish_ed=no-stderr-ed # /usr/bin/ed(!) is broken
879 add_cppflags -DMKSH_ASSUME_UTF8=0
890 add_cppflags -D_NEXT_SOURCE
891 add_cppflags -D_POSIX_SOURCE
893 : "${CC=cc -posix}"
894 add_cppflags -DMKSH_NO_SIGSETJMP
896 add_cppflags -DMKSH_UNEMPLOYED
906 add_cppflags -DMKSH_UNEMPLOYED
915 add_cppflags -DMKSH_ASSUME_UTF8=0
924 add_cppflags -DMKSH_UNEMPLOYED
925 add_cppflags -DMKSH_NOPROSPECTOFWORK
926 add_cppflags -DMKSH_DOSPATH
944 the mksh-os2 porter.
951 add_cppflags -DMKSH_ASSUME_UTF8=0
956 add_cppflags -DMKSH_FOR_Z_OS
957 add_cppflags -D_ALL_SOURCE
962 add_cppflags -D_OSF_SOURCE
963 add_cppflags -D_POSIX_C_SOURCE=200112L
964 add_cppflags -D_XOPEN_SOURCE=600
965 add_cppflags -D_XOPEN_SOURCE_EXTENDED
969 add_cppflags -D_POSIX_SOURCE
970 add_cppflags -D_LIMITS_EXTENSION
971 add_cppflags -D_BSD_EXTENSION
972 add_cppflags -D_SUSV2_SOURCE
973 add_cppflags -DMKSH_ASSUME_UTF8
976 add_cppflags -DMKSH__NO_SYMLINK
978 add_cppflags -DMKSH_NO_CMDLINE_EDITING
979 add_cppflags -DMKSH__NO_SETEUGID
981 add_cppflags -DMKSH_UNEMPLOYED
983 add_cppflags -DMKSH_MAYBE_KENCC
991 add_cppflags -D__NO_EXT_QNX
992 add_cppflags -D__EXT_UNIX_MISC
995 oldish_ed=no-stderr-ed # oldish /bin/ed is broken
1004 add_cppflags -DMKSH_UNEMPLOYED
1020 add_cppflags -D_BSD_SOURCE
1021 add_cppflags -D__EXTENSIONS__
1024 add_cppflags -D_GNU_SOURCE
1025 add_cppflags -DMKSH_NO_SIGSUSPEND
1029 : "${CC=cc -YPOSIX}"
1030 add_cppflags -DMKSH_TYPEDEF_SSIZE_T=int
1038 ccpc='-Yc,'
1039 ccpl='-Yl,'
1046 # generic target for SVR4 Unix with uname -s = uname -n
1049 test_n "$TARGET_OSREV" || TARGET_OSREV=`uname -r`
1053 test_n "$TARGET_OSREV" || TARGET_OSREV=`uname -r`
1060 test 0 = $r && echo | $NROFF -v 2>&1 | grep GNU >/dev/null 2>&1 && \
1061 echo | $NROFF -c >/dev/null 2>&1 && NROFF="$NROFF -c"
1067 vv '|' "oslevel >&2"
1068 vv '|' "uname -a >&2"
1071 vv '|' "hwprefs machine_type os_type os_class >&2"
1072 vv '|' "sw_vers >&2"
1073 vv '|' "system_profiler -detailLevel mini SPSoftwareDataType SPHardwareDataType >&2"
1074 vv '|' "/bin/sh --version >&2"
1075 vv '|' "xcodebuild -version >&2"
1076 vv '|' "uname -a >&2"
1077 …vv '|' "sysctl kern.version hw.machine hw.model hw.memsize hw.availcpu hw.ncpu hw.cpufrequency hw.…
1078 vv '|' "sysctl hw.cpufrequency hw.byteorder hw.cpu64bit_capable hw.ncpu >&2"
1081 vv '|' "uname -a >&2"
1082 vv '|' "hinv -v >&2"
1085 vv '|' "uname -a >&2"
1086 vv '|' "/usr/sbin/sizer -v >&2"
1089 vv '|' "uname -a >&2"
1090 vv '|' "uname -X >&2"
1093 vv '|' "uname -a >&2"
1114 # - ICC defines __GNUC__ too
1115 # - GCC defines __hpux too
1116 # - LLVM+clang defines __GNUC__ too
1117 # - nwcc defines __GNUC__ too
1118 CPP="$CC -E"
1197 vv ']' "$CPP $CFLAGS $CPPFLAGS $NOWARN conftest.c | \
1198 sed -n '/^ *[ce]t *= */s/^ *\([ce]t\) *= */\1=/p' | tr -d \\\\015 >x"
1201 rmf x vv.out
1209 CPPFLAGS="-Dconst= $CPPFLAGS"
1224 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN $LIBS -version"
1226 vv '|' "${CLANG-clang} -version"
1227 vv '|' "${CLANG-clang} --version"
1236 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN $LIBS -V"
1237 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN -Wl,-V conftest.c $LIBS"
1246 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN -v conftest.c $LIBS"
1247 vv '|' 'eval echo "\`$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN $LIBS -dumpmachine\`" \
1248 "gcc\`$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN $LIBS -dumpversion\`"'
1252 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN -V conftest.c $LIBS"
1261 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN $LIBS -V"
1264 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN -v conftest.c $LIBS"
1270 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN -v conftest.c $LIBS"
1271 add_cppflags -D__inline__=__inline
1279 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN $LIBS -version"
1288 C89_COMPILER=`ntpath2posix -c "$C89_COMPILER"`
1293 C89_LINKER=`ntpath2posix -c "$C89_LINKER"`
1295 vv '|' "$C89_COMPILER /HELP >&2"
1296 vv '|' "$C89_LINKER /LINK >&2"
1301 add_cppflags -DMKSH_DONT_EMIT_IDSTRING
1302 add_cppflags -DMKSH_NO_SIGSETJMP
1303 add_cppflags -Dsig_atomic_t=int
1304 vv '|' "$CC"
1307 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN $LIBS -version"
1310 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN $LIBS -v"
1324 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN -V conftest.c $LIBS"
1327 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN $LIBS -v"
1330 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN $LIBS -V 2>&1 | \
1331 grep -F -i -e version -e release"
1334 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN $LIBS -V"
1335 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN -Wl,-V conftest.c $LIBS"
1341 CFLAGS="$CFLAGS -g"
1345 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN -V conftest.c $LIBS"
1348 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN -v conftest.c $LIBS"
1351 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN $LIBS -qversion"
1352 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN $LIBS -qversion=verbose"
1353 vv '|' "ld -V"
1358 vv '|' "$CC --version"
1359 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN -v conftest.c $LIBS"
1360 vv '|' "$CC $CFLAGS $CPPFLAGS $LDFLAGS $NOWARN -V conftest.c $LIBS"
1365 vv '|' "llc -version"
1382 rmf conftest.c conftest.o conftest a.out* a.exe* conftest.exe* vv.out
1385 # Compiler: works as-is, with -Wno-error and -Werror
1400 CFLAGS="$CFLAGS ${ccpl}-non_shared"
1401 ac_testn can_delexe compiler_fails 0 'for the -non_shared linker option' <<-'EOF'
1408 ac_testn can_delexe compiler_fails 0 'for the /DELEXECUTABLE linker option' <<-'EOF'
1424 CPP='cpp -D__TINYC__'
1430 save_NOWARN="${ccpc}-w"
1431 DOWARN="${ccpc}-w!"
1434 # -msg_* flags not used yet, or is -w2 correct?
1437 save_NOWARN="${ccpc}-w"
1438 DOWARN="${ccpc}-wx"
1450 DOWARN="-diag_error 1-10000"
1457 test x"$save_NOWARN" = x"" && save_NOWARN='-errwarn=%none'
1460 ac_flags 0 errwarnall "-errwarn=%all"
1461 test 1 = $HAVE_CAN_ERRWARNALL && DOWARN="-errwarn=%all"
1464 save_NOWARN=-w
1468 DOWARN=-w2
1472 DOWARN=-Wc,-we
1477 save_NOWARN=-qflag=e
1478 DOWARN=-qflag=i
1481 save_NOWARN=-qflag=i:e
1482 DOWARN=-qflag=i:i
1487 test x"$save_NOWARN" = x"" && save_NOWARN=-Wno-error
1490 ac_flags 0 werror -Werror
1491 test 1 = $HAVE_CAN_WERROR && DOWARN=-Werror
1492 test $ct = icc && DOWARN="$DOWARN -wd1419"
1498 # Compiler: extra flags (-O2 -f* -W* etc.)
1500 i=`echo :"$orig_CFLAGS" | sed 's/^://' | tr -c -d $alll$allu$alln`
1512 cat >x <<-'EOF'
1519 yes pad | head -n 256 >>x
1520 ac_flags - 1 otwo -xO2 <x
1524 ac_flags 1 othree "-O3 -qstrict"
1525 test 1 = $HAVE_CAN_OTHREE || ac_flags 1 otwo -O2
1528 ac_flags 1 otwo -O2
1529 test 1 = $HAVE_CAN_OTWO || ac_flags 1 optimise -O
1536 ac_flags 1 strpool "${ccpc}-d" 'if string pooling can be enabled'
1542 ac_flags 0 verb -verbose
1543 ac_flags 1 rodata -readonly_strings
1546 ac_flags 1 decl "${ccpc}-r" 'for strict prototype checks'
1547 ac_flags 1 schk "${ccpc}-s" 'for stack overflow checking'
1550 ac_flags 1 fnolto -fno-lto 'whether we can explicitly disable buggy GCC LTO' -fno-lto
1551 # The following tests run with -Werror (gcc only) if possible
1553 ac_flags 1 wnodeprecateddecls -Wno-deprecated-declarations
1555 ac_flags 1 no_eh_frame -fno-asynchronous-unwind-tables
1556 ac_flags 1 fnostrictaliasing -fno-strict-aliasing
1557 ac_flags 1 fstackprotectorstrong -fstack-protector-strong
1559 ac_flags 1 fstackprotectorall -fstack-protector-all
1561 *\ -fplugin=*dragonegg*) ;;
1562 *) ac_flags 1 fplugin_dragonegg -fplugin=dragonegg ;;
1580 1) t_cflags='-flto=jobserver'
1581 t_ldflags='-fuse-linker-plugin'
1583 2) t_cflags='-flto=jobserver' t_ldflags=''
1585 3) t_cflags='-flto=jobserver'
1586 t_ldflags='-fno-use-linker-plugin -fwhole-program'
1588 4) t_cflags='-flto'
1589 t_ldflags='-fuse-linker-plugin'
1591 5) t_cflags='-flto' t_ldflags=''
1593 6) t_cflags='-flto'
1594 t_ldflags='-fno-use-linker-plugin -fwhole-program'
1596 7) t_cflags='-fwhole-program --combine' t_ldflags=''
1604 ac_flags 1 data_abi_align -malign-data=abi
1610 #ac_flags 1 agcc -Agcc 'for support of GCC extensions'
1614 ac_flags 1 fnobuiltinsetmode -fno-builtin-setmode
1615 ac_flags 1 fnostrictaliasing -fno-strict-aliasing
1616 ac_flags 1 fstacksecuritycheck -fstack-security-check
1620 ac_flags 1 fullwarn -fullwarn 'for remark output support'
1625 ac_flags - 1 stackon "${ccpc}/GZ" 'if stack checks can be enabled' <x
1626 ac_flags - 1 stckall "${ccpc}/Ge" 'stack checks for all functions' <x
1627 ac_flags - 1 secuchk "${ccpc}/GS" 'for compiler security checks' <x
1630 ac_flags 1 wp64 "${ccpc}/Wp64" 'to enable 64-bit warnings'
1633 #broken# ac_flags 1 ssp -stackprotect
1637 ac_flags 1 fstackprotectorall -fstack-protector-all
1642 ac_flags 1 v -v
1643 ac_flags 1 ipo -xipo 'for cross-module optimisation'
1647 : #broken# ac_flags 1 boundschk -b
1650 ac_flags 0 ysystem -Ysystem
1651 test 1 = $HAVE_CAN_YSYSTEM && CPPFLAGS="-Ysystem $CPPFLAGS"
1652 ac_flags 1 extansi -Xa
1661 ac_flags 1 halton '-qhaltonmsg=CCN3296 -qhaltonmsg=CCN3944 -qhaltonmsg=CCN3963'
1663 # CCN4108: The use of keyword '__attribute__' is non-portable.
1664 ac_flags 1 supprss '-qsuppress=CCN3290 -qsuppress=CCN4108'
1667 ac_flags 1 rodata '-qro -qroconst -qroptr'
1668 ac_flags 1 rtcheck -qcheck=all
1669 #ac_flags 1 rtchkc -qextchk # reported broken
1670 ac_flags 1 wformat '-qformat=all -qformat=nozln'
1673 #ac_flags 1 wp64 -qwarn64 # too verbose for now
1676 # flags common to a subset of compilers (run with -Werror on gcc)
1678 ac_flags 1 wall -Wall
1679 ac_flags 1 fwrapv -fwrapv
1693 # The following tests run with -Werror or similar (all compilers) if possible
1700 ac_test attribute_bounded '' 'for __attribute__((__bounded__))' <<-'EOF'
1711 int main(int ac, char *av[]) { return (xcopy(av[0], av[--ac], 1)); }
1721 ac_test attribute_format '' 'for __attribute__((__format__))' <<-'EOF'
1736 ac_test attribute_noreturn '' 'for __attribute__((__noreturn__))' <<-'EOF'
1749 ac_test attribute_pure '' 'for __attribute__((__pure__))' <<-'EOF'
1758 int main(int ac, char *av[]) { return (foo(av[ac - 1]) + isatty(0)); }
1762 ac_test attribute_unused '' 'for __attribute__((__unused__))' <<-'EOF'
1774 ac_test attribute_used '' 'for __attribute__((__used__))' <<-'EOF'
1787 # End of tests run with -Werror
1795 "if a reduced-feature mksh is requested"; then
1810 'if the default UTF-8 mode is specified' && : "${HAVE_SETLOCALE_CTYPE=0}"
1813 'if the default UTF-8 mode is disabled' && \
1831 ac_test both_time_h '' 'whether <sys/time.h> and <time.h> can both be included' <<-'EOF'
1864 /* check that off_t can represent 2^63-1 correctly, thx FSF */
1865 #define LARGE_OFF_T ((((off_t)1 << 31) << 31) - 1 + (((off_t)1 << 31) << 31))
1867 LARGE_OFF_T % 2147483647 == 1) ? 1 : -1];
1871 add_cppflags -D_FILE_OFFSET_BITS=64
1872 ac_testn can_lfs_sus '!' can_lfs 0 "... with -D_FILE_OFFSET_BITS=64" <lft.c
1875 add_cppflags -D_LARGE_FILES=1
1876 ac_testn can_lfs_aix '!' can_lfs 0 "... with -D_LARGE_FILES=1" <lft.c
1879 rm -f lft.c
1885 ac_test can_inttypes '!' stdint_h 1 "for standard 32-bit integer types" <<-'EOF'
1890 ac_test can_ucbints '!' can_inttypes 1 "for UCB 32-bit integer types" <<-'EOF'
1895 ac_test can_int8type '!' stdint_h 1 "for standard 8-bit integer type" <<-'EOF'
1900 ac_test can_ucbint8 '!' can_int8type 1 "for UCB 8-bit integer type" <<-'EOF'
1907 ac_testn sig_t <<-'EOF'
1915 ac_testn sighandler_t '!' sig_t 0 <<-'EOF'
1923 add_cppflags -Dsig_t=sighandler_t
1927 ac_testn __sighandler_t '!' sig_t 0 <<-'EOF'
1935 add_cppflags -Dsig_t=__sighandler_t
1939 test 1 = $HAVE_SIG_T || add_cppflags -Dsig_t=nosig_t
1951 cat >conftest.c <<-EOF
1964 v "$CC $CFLAGS $CPPFLAGS $NOWARN -emit-llvm -c conftest.c" || fv=0
1966 test $fv = 0 || v "llvm-link -o - conftest.o | opt $optflags | llc -o $tfn.s" || fv=0
1967 test $fv = 0 || v "$CC $CFLAGS $LDFLAGS -o $tcfn $tfn.s $LIBS $ccpr"
1970 v "$CC $CFLAGS $CPPFLAGS $NOWARN -S -flto conftest.c" || fv=0
1972 test $fv = 0 || v "llvm-as conftest.ll" || fv=0
1974 test $fv = 0 || v "llvm-link -o - conftest.bc | opt $optflags | llc -o $tfn.s" || fv=0
1975 test $fv = 0 || v "$CC $CFLAGS $LDFLAGS -o $tcfn $tfn.s $LIBS $ccpr"
1978 …v "$CC $CFLAGS $CPPFLAGS $LDFLAGS -fwhole-program --combine $NOWARN -o $tcfn conftest.c $LIBS $ccp…
1982 v "$CC $CFLAGS $CPPFLAGS $NOWARN -c conftest.c" || fv=0
1983 test $fv = 0 || v "$CC $CFLAGS $LDFLAGS -o $tcfn conftest.o $LIBS $ccpr"
1986 test -f $tcfn || fv=0
1996 ac_testn sys_errlist '' "the sys_errlist[] array and sys_nerr" <<-'EOF'
2000 int main(void) { return (*sys_errlist[sys_nerr - 1] + isatty(0)); }
2002 ac_testn _sys_errlist '!' sys_errlist 0 "the _sys_errlist[] array and _sys_nerr" <<-'EOF'
2006 int main(void) { return (*_sys_errlist[_sys_nerr - 1] + isatty(0)); }
2009 add_cppflags -Dsys_nerr=_sys_nerr
2010 add_cppflags -Dsys_errlist=_sys_errlist
2017 ac_testn sys_sig$what '' "the sys_sig$what[] array" <<-EOF
2022 ac_testn _sys_sig$what '!' sys_sig$what 0 "the _sys_sig$what[] array" <<-EOF
2029 add_cppflags -Dsys_sig$what=_sys_sig$what
2038 ac_test flock <<-'EOF'
2048 ac_test lock_fcntl '!' flock 1 'whether we can lock files with fcntl' <<-'EOF'
2058 ac_test rlimit '' 'getrlimit and setrlimit' <<-'EOF'
2070 ac_test rlim_t rlimit 0 <<-'EOF'
2087 ac_test getrusage <<-'EOF'
2097 ac_test getsid <<-'EOF'
2102 ac_test gettimeofday <<-'EOF'
2108 ac_test killpg <<-'EOF'
2113 ac_test memmove <<-'EOF'
2125 ac_test mknod '' 'if to use mknod(), makedev() and friends' <<-'EOF'
2136 ac_test mmap lock_fcntl 0 'for mmap and munmap' <<-'EOF'
2151 ac_test ftruncate mmap 0 'for ftruncate' <<-'EOF'
2156 ac_test nice <<-'EOF'
2161 ac_test revoke <<-'EOF'
2170 ac_test setlocale_ctype '' 'setlocale(LC_CTYPE, "")' <<-'EOF'
2176 ac_test langinfo_codeset setlocale_ctype 0 'nl_langinfo(CODESET)' <<-'EOF'
2182 ac_test select <<-'EOF'
2215 ac_test setresugid <<-'EOF'
2221 ac_test setgroups setresugid 0 <<-'EOF'
2232 ac_testn __rt_sigsuspend '' 'whether klibc uses RT signals' <<-'EOF'
2242 'whether sigsuspend is usable (1/2)' <<-'EOF'
2249 'whether sigsuspend is usable (2/2)' <<-'EOF'
2258 add_cppflags -DMKSH_NO_SIGSUSPEND
2262 ac_test strerror '!' sys_errlist 0 <<-'EOF'
2267 ac_test strsignal '!' sys_siglist 0 <<-'EOF'
2273 ac_test strlcpy <<-'EOF'
2282 ac_test flock_decl flock 1 'for declaration of flock()' <<-'EOF'
2290 ac_test revoke_decl revoke 1 'for declaration of revoke()' <<-'EOF'
2295 ac_test sys_errlist_decl sys_errlist 0 "for declaration of sys_errlist[] and sys_nerr" <<-'EOF'
2298 int main(void) { return (*sys_errlist[sys_nerr - 1] + isatty(0)); }
2300 ac_test sys_siglist_decl sys_siglist 0 'for declaration of sys_siglist[]' <<-'EOF'
2306 ac_test st_mtim '' 'for struct stat.st_mtim.tv_nsec' <<-'EOF'
2311 ac_test st_mtimensec '!' st_mtim 0 'for struct stat.st_mtimensec' <<-'EOF'
2324 test 1 = $fv || check_categories="$check_categories no-histfile"
2332 ac_test long_32bit '' 'whether long is 32 bit wide' <<-'EOF'
2339 #define cta(name,assertion) char name[(assertion) ? 1 : -1]
2346 ac_test long_64bit '!' long_32bit 0 'whether long is 64 bit wide' <<-'EOF'
2353 #define cta(name,assertion) char name[(assertion) ? 1 : -1]
2371 'checking if the C Preprocessor supports -dD'; then
2373 vv ']' "$CPP $CFLAGS $CPPFLAGS $NOWARN -dD conftest.c >x"
2375 rmf conftest.c x vv.out
2389 rmf x vv.out
2417 # GNU sed 2.03 segfaults when optimising this to sed -n
2419 grep -v '^#' | \
2425 sed 's/^ *mksh_cfg *=[ ]*\([()0-9x+-][()0-9x+ -]*\).*$/\1/'`
2428 *[\ \(\)+-]*) NSIG=`"$AWK" "BEGIN { print $NSIG }" </dev/null` ;;
2439 test 1 = $HAVE_CPP_DD && test $NSIG -gt 1 && sigs="$sigs "`vq \
2440 "$CPP $CFLAGS $CPPFLAGS $NOWARN -dD conftest.c" | \
2441 grep '[ ]SIG[A-Z0-9][A-Z0-9]*[ ]' | \
2442 sed 's/^.*[ ]SIG\([A-Z0-9][A-Z0-9]*\)[ ].*$/\1/' | sort`
2443 test $NSIG -gt 1 || sigs=
2455 grep -v '^#' | \
2461 sed 's/^ *mksh_cfg *=[ ]*\([0-9][0-9x]*\).*$/:\1 '$name/
2462 done | sed -n '/^:[^ ]/s/^://p' | while read nr name; do
2464 test $nr -gt 0 && test $nr -lt $NSIG || continue
2478 add_cppflags -DMKSH_UNLIMITED
2484 add_cppflags -DMKSH_PRINTF_BUILTIN
2493 test 1 = "$HAVE_CAN_VERB" && CFLAGS="$CFLAGS -verbose"
2494 add_cppflags -DMKSH_BUILD_R=593
2504 add_cppflags -DMKSH_EXE_EXT
2514 cat >test.sh <<-EOF
2521 set -A check_categories -- $check_categories
2544 shift \$((OPTIND - 1))
2545 set -A args -- '$srcdir/check.pl' -p "\$pflag"
2547 args[\${#args[*]}]=-E
2553 if [[ -n \$x ]]; then
2554 args[\${#args[*]}]=-C
2558 args[\${#args[*]}]=-e
2561 (( Pflag )) && args[\${#args[*]}]=-P
2563 args[\${#args[*]}]=-t
2567 args[\${#args[*]}]=-U
2570 (( vflag )) && args[\${#args[*]}]=-v
2571 (( xflag )) && args[\${#args[*]}]=-x # force usage by synerr
2572 if [[ -n \$TMPDIR && -d \$TMPDIR/. ]]; then
2573 args[\${#args[*]}]=-T
2577 grep -F -e 'KSH R' -e Mir''OS: "\$sflag" | sed '/KSH/s/^./& /'
2588 perlos=\$(\$perli -e "\$cstr")
2595 if [[ -n \$perlos ]]; then
2600 (( Sflag )) || echo + \$perli "\${args[@]}" -s "\$sflag" "\$@"
2601 (( Sflag )) || exec \$perli "\${args[@]}" -s "\$sflag" "\$@"$tsts
2602 # use of the -S option for check.t split into multiple chunks
2605 echo + \$perli "\${args[@]}" -s "\$s" "\$@"
2606 \$perli "\${args[@]}" -s "\$s" "\$@"$tsts
2615 emitbc="-S -flto"
2618 emitbc="-emit-llvm -c"
2621 emitbc=-c
2632 echo set -x >>Rebuild.sh
2635 test -f $file || file=$srcdir/$file
2640 echo "llvm-as ${op}ll || exit 1" >>Rebuild.sh
2649 echo "rm -f $tfn.s" >>Rebuild.sh
2650 echo "llvm-link -o - $objs | opt $optflags | llc -o $tfn.s" >>Rebuild.sh
2658 echo "$CC $CFLAGS $LDFLAGS -o \$tcfn $lobjs $LIBS $ccpr" >>Rebuild.sh
2659 echo "test -f \$tcfn || exit 1; $SIZE \$tcfn" >>Rebuild.sh
2693 # \$(CC) \$(CFLAGS) \$(LDFLAGS) -o \$@ \$(OBJS_BP) \$(LIBS)
2696 # \$(CC) \$(CFLAGS) \$(CPPFLAGS) -c \$<
2699 #REGRESS_FLAGS= -f
2717 objs="-o $mkshexe"
2719 test -f $file || file=$srcdir/$file
2722 emitbc="-fwhole-program --combine"
2726 test -f $file || file=$srcdir/$file
2734 test -f $file || file=$srcdir/$file
2738 v "llvm-as ${op}ll" || exit 1
2745 v "llvm-link -o - $objs | opt $optflags | llc -o $tfn.s"
2749 test $cm = combine || v "$CC $CFLAGS $LDFLAGS -o $tcfn $lobjs $LIBS $ccpr"
2750 test -f $tcfn || exit 1
2751 test 1 = $r || v "$NROFF -mdoc <'$srcdir/lksh.1' >lksh.cat1" || rmf lksh.cat1
2752 test 1 = $r || v "$NROFF -mdoc <'$srcdir/mksh.1' >mksh.cat1" || rmf mksh.cat1
2753 test 1 = $r || v "(set -- ''; . '$srcdir/FAQ2HTML.sh')" || rmf FAQ.htm
2756 test -f /usr/ucb/$i && i=/usr/ucb/$i
2760 $e "# $i -c -s -o root -g bin -m 555 $tfn /bin/$tfn"
2762 $e "# grep -x /bin/$tfn /etc/shells >/dev/null || echo /bin/$tfn >>/etc/shells"
2763 $e "# $i -c -o root -g bin -m 444 dot.mkshrc /usr/share/doc/mksh/examples/"
2767 if test -f FAQ.htm; then
2768 $e "# $i -c -o root -g bin -m 444 FAQ.htm /usr/share/doc/mksh/"
2770 if test -f mksh.cat1; then
2771 if test -f FAQ.htm; then
2774 $e "# $i -c -o root -g bin -m 444 lksh.cat1" \
2776 $e "# $i -c -o root -g bin -m 444 mksh.cat1" \
2780 $e "# $i -c -o root -g bin -m 444 lksh.1 mksh.1 /usr/share/man/man1/"
2784 test -f FAQ.htm || \
2795 CFLAGS if empty, defaults to -xO2 or +O2
2796 or -O3 -qstrict or -O2, per compiler
2799 LDSTATIC set this to '-static'; default unset
2801 [Interix] default: -lcrypt (XXX still needed?)
2802 NOWARN -Wno-error or similar
2804 TARGET_OS default: $(uname -s || uname)
2805 TARGET_OSREV [QNX] default: $(uname -r)
2822 MKSH_BINSHPOSIX if */sh or */-sh, enable set -o posix
2823 MKSH_BINSHREDUCED if */sh or */-sh, enable set -o sh
2832 MKSH_EARLY_LOCALE_TRACKING track utf8-mode from POSIX locale, for SuSE
2833 MKSH_MIDNIGHTBSD01ASH_COMPAT set -o sh: additional compatibility quirk
2834 MKSH_NOPROSPECTOFWORK disable jobs, co-processes, etc. (do not use)
2835 MKSH_NOPWNAM skip PAM calls, for -static on glibc or Solaris
2841 MKSH_SMALL_BUT_FAST disable some hard-for-size optim. (modern sys.)
2845 MKSH_UNEMPLOYED disable job control (but not jobs/co-processes)
2850 Set CC and possibly CFLAGS, CPPFLAGS, LDFLAGS, LIBS. If cross-compiling,
2853 MKSH_SMALL but with Vi mode, add -DMKSH_S_NOVI=0 to CPPFLAGS as well.
2856 $ (sh Build.sh -r && ./test.sh -f) 2>&1 | tee log
2859 /bin; install the manpage, if omitting the -r flag a catmanpage is made
2861 https://evolvis.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=alioth/mksh.git;a=blob;f=debian/.mkshrc
2865 $ CPPFLAGS="$CPPFLAGS -DMKSH_BINSHPOSIX" sh Build.sh -L -r