further simplification; for mirbsdksh, GNU autoconf is
only a portability, no Makefile-generating, tool
This commit is contained in:
parent
916f673e8a
commit
d2da772b39
47
aclocal.m4
vendored
47
aclocal.m4
vendored
@ -5,7 +5,7 @@ dnl
|
|||||||
dnl This file is covered by the GPL 'cause it contains some modified versions
|
dnl This file is covered by the GPL 'cause it contains some modified versions
|
||||||
dnl of autoconf's macros, in particular:
|
dnl of autoconf's macros, in particular:
|
||||||
dnl AC_FUNC_MMAP AC_LANG_C AC_LANG_CPLUXPLUS KSH_HEADER_SYS_WAIT
|
dnl AC_FUNC_MMAP AC_LANG_C AC_LANG_CPLUXPLUS KSH_HEADER_SYS_WAIT
|
||||||
dnl AC_HEADER_STAT AC_PROG_CC
|
dnl AC_HEADER_STAT
|
||||||
dnl
|
dnl
|
||||||
dnl
|
dnl
|
||||||
dnl Like AC_CHECK_TYPE(), only
|
dnl Like AC_CHECK_TYPE(), only
|
||||||
@ -1274,51 +1274,6 @@ fi
|
|||||||
])
|
])
|
||||||
dnl
|
dnl
|
||||||
dnl
|
dnl
|
||||||
dnl Need to change the "accepts -g" test - some broken systems
|
|
||||||
dnl allow "cc -c -g ..." but fail on the link (missing -lg).
|
|
||||||
dnl LaserMoon's linux/FT is such a broken system...
|
|
||||||
undefine([AC_PROG_CC])dnl
|
|
||||||
AC_DEFUN(AC_PROG_CC,
|
|
||||||
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
|
|
||||||
AC_CHECK_PROG(CC, gcc, gcc, cc)
|
|
||||||
|
|
||||||
AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
|
|
||||||
[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
|
|
||||||
cat > conftest.c <<EOF
|
|
||||||
#ifdef __GNUC__
|
|
||||||
yes;
|
|
||||||
#endif
|
|
||||||
EOF
|
|
||||||
if ${CC-cc} -E conftest.c 2>&AC_FD_CC | egrep yes >/dev/null 2>&1; then
|
|
||||||
ac_cv_prog_gcc=yes
|
|
||||||
else
|
|
||||||
ac_cv_prog_gcc=no
|
|
||||||
fi])
|
|
||||||
if test $ac_cv_prog_gcc = yes; then
|
|
||||||
GCC=yes
|
|
||||||
if test "${CFLAGS+set}" != set; then
|
|
||||||
AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_gcc_g,
|
|
||||||
[echo 'int main(){ return 0; }' > conftest.c
|
|
||||||
if test -z "$(${CC-cc} -g conftest.c 2>&1)"; then
|
|
||||||
ac_cv_prog_gcc_g=yes
|
|
||||||
else
|
|
||||||
ac_cv_prog_gcc_g=no
|
|
||||||
fi
|
|
||||||
rm -f conftest*
|
|
||||||
])
|
|
||||||
if test $ac_cv_prog_gcc_g = yes; then
|
|
||||||
CFLAGS="-g -O"
|
|
||||||
else
|
|
||||||
CFLAGS="-O"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
GCC=
|
|
||||||
test "${CFLAGS+set}" = set || CFLAGS="-g"
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
dnl
|
|
||||||
dnl
|
|
||||||
dnl Need to change to check for ndir
|
dnl Need to change to check for ndir
|
||||||
dnl
|
dnl
|
||||||
undefine([AC_HEADER_DIRENT])dnl
|
undefine([AC_HEADER_DIRENT])dnl
|
||||||
|
37
conf-end.h
37
conf-end.h
@ -1,7 +1,42 @@
|
|||||||
/* $MirBSD: conf-end.h,v 1.2 2004/03/21 01:25:04 tg Exp $ */
|
/* $MirBSD: conf-end.h,v 1.3 2004/05/24 16:35:08 tg Exp $ */
|
||||||
/* $OpenBSD: conf-end.h,v 1.2 1996/08/25 12:37:58 downsj Exp $ */
|
/* $OpenBSD: conf-end.h,v 1.2 1996/08/25 12:37:58 downsj Exp $ */
|
||||||
|
|
||||||
|
/* Include ksh features? */
|
||||||
|
/* #define KSH 1 */
|
||||||
|
|
||||||
|
/* Include emacs editing? */
|
||||||
|
#define EMACS 1
|
||||||
|
|
||||||
|
/* Include vi editing? */
|
||||||
|
#define VI 1
|
||||||
|
|
||||||
|
/* Include job control? */
|
||||||
|
#define JOBS 1
|
||||||
|
|
||||||
|
/* Include brace-expansion? */
|
||||||
|
#define BRACE_EXPAND 1
|
||||||
|
|
||||||
|
/* Include any history? */
|
||||||
|
#define HISTORY 1
|
||||||
|
|
||||||
|
/* Include complex history? */
|
||||||
|
#define COMPLEX_HISTORY
|
||||||
|
|
||||||
|
/* Strict POSIX behaviour? */
|
||||||
|
/* #undef POSIXLY_CORRECT */
|
||||||
|
|
||||||
|
/* Specify default $ENV? */
|
||||||
|
/* #undef DEFAULT_ENV */
|
||||||
|
|
||||||
|
/* Include shl(1) support? */
|
||||||
|
/* #undef SWTCH */
|
||||||
|
|
||||||
|
/* Include game-of-life? */
|
||||||
|
/* #undef SILLY */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* The above are defined for mirbsdksh via external
|
||||||
|
* means, such as this header ;-)
|
||||||
* End of configuration stuff for PD ksh.
|
* End of configuration stuff for PD ksh.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
35
config.h
35
config.h
@ -1,4 +1,4 @@
|
|||||||
/* $MirBSD: config.h,v 1.6 2004/04/27 19:30:39 tg Exp $ */
|
/* $MirBSD: config.h,v 1.7 2004/05/24 16:35:08 tg Exp $ */
|
||||||
/* $OpenBSD: config.h,v 1.9 2003/10/22 07:40:38 jmc Exp $ */
|
/* $OpenBSD: config.h,v 1.9 2003/10/22 07:40:38 jmc Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -197,39 +197,6 @@
|
|||||||
* directories. */
|
* directories. */
|
||||||
/* #undef HPUX_GETWD_BUG */
|
/* #undef HPUX_GETWD_BUG */
|
||||||
|
|
||||||
/* Include ksh features? */
|
|
||||||
/* #define KSH 1 */
|
|
||||||
|
|
||||||
/* Include emacs editing? */
|
|
||||||
#define EMACS 1
|
|
||||||
|
|
||||||
/* Include vi editing? */
|
|
||||||
#define VI 1
|
|
||||||
|
|
||||||
/* Include job control? */
|
|
||||||
#define JOBS 1
|
|
||||||
|
|
||||||
/* Include brace-expansion? */
|
|
||||||
#define BRACE_EXPAND 1
|
|
||||||
|
|
||||||
/* Include any history? */
|
|
||||||
#define HISTORY 1
|
|
||||||
|
|
||||||
/* Include complex history? */
|
|
||||||
#define COMPLEX_HISTORY
|
|
||||||
|
|
||||||
/* Strict POSIX behaviour? */
|
|
||||||
/* #undef POSIXLY_CORRECT */
|
|
||||||
|
|
||||||
/* Specify default $ENV? */
|
|
||||||
/* #undef DEFAULT_ENV */
|
|
||||||
|
|
||||||
/* Include shl(1) support? */
|
|
||||||
/* #undef SWTCH */
|
|
||||||
|
|
||||||
/* Include game-of-life? */
|
|
||||||
/* #undef SILLY */
|
|
||||||
|
|
||||||
/* The number of bytes in a int. */
|
/* The number of bytes in a int. */
|
||||||
#define SIZEOF_INT 4
|
#define SIZEOF_INT 4
|
||||||
|
|
||||||
|
203
configure.in
203
configure.in
@ -1,4 +1,4 @@
|
|||||||
dnl $MirBSD: configure.in,v 1.4 2004/05/24 16:26:27 tg Exp $
|
dnl $MirBSD: configure.in,v 1.5 2004/05/24 16:35:08 tg Exp $
|
||||||
dnl
|
dnl
|
||||||
dnl Process this file with autoconf to produce a configure script
|
dnl Process this file with autoconf to produce a configure script
|
||||||
dnl
|
dnl
|
||||||
@ -8,213 +8,12 @@ test -s config.h.in || sed -e 's!^/\* #undef \(.*\) \*/!#undef \1!' \
|
|||||||
AC_CONFIG_HEADER(config.h)
|
AC_CONFIG_HEADER(config.h)
|
||||||
dnl
|
dnl
|
||||||
dnl
|
dnl
|
||||||
dnl
|
|
||||||
dnl Set up command line options (--enable/--disable)
|
|
||||||
dnl
|
|
||||||
def_path_unix="/bin:/usr/bin:/sbin:/usr/sbin"
|
|
||||||
def_path_os2="c:/usr/bin;c:/os2;/os2"
|
|
||||||
AC_ARG_ENABLE(path,
|
|
||||||
[ --enable-path=PaTh (NOTE: this value isn't used if confstr() and _CS_PATH
|
|
||||||
are available, or if <paths.h> defines _PATH_DEFPATH)
|
|
||||||
Use PaTh if PATH isn't specified in the environment
|
|
||||||
when the shell starts. A value without . in it is
|
|
||||||
safest.
|
|
||||||
The default value is \"/bin:/usr/bin:/sbin:/usr/sbin\".],,
|
|
||||||
enable_path=default)
|
|
||||||
case $enable_path:$ksh_cv_os_type in
|
|
||||||
default:OS2_EMX) enable_path="$def_path_os2" ;;
|
|
||||||
default:*) enable_path="$def_path_unix" ;;
|
|
||||||
esac
|
|
||||||
case $enable_path in
|
|
||||||
\"*\") ;;
|
|
||||||
*)
|
|
||||||
enable_path="\"$enable_path\""
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
AC_DEFINE_UNQUOTED(DEFAULT_PATH, $enable_path)
|
|
||||||
dnl
|
|
||||||
dnl
|
|
||||||
dnl
|
|
||||||
dnl Specify what kind of shell we are to build. Options are ksh and sh.
|
|
||||||
dnl This must be before most other options, as it controls their default
|
|
||||||
dnl behaviour.
|
|
||||||
dnl
|
|
||||||
AC_ARG_ENABLE(shell,
|
|
||||||
[ --enable-shell={sh,ksh} Specify the kind of shell that is to be built (the
|
|
||||||
default is sh). Specifiying sh compiles out:
|
|
||||||
command line editing (emacs/vi), history,
|
|
||||||
a bunch of aliases, [[ .. ]], select, let,
|
|
||||||
brace-expansion, extended globing (*(..|..), etc.),
|
|
||||||
co-processes, some special environment variables
|
|
||||||
(ie, MAIL, MAILCHECK, MAILPATH, RANDOM, SECONDS,
|
|
||||||
TMOUT).],,
|
|
||||||
enable_shell=mirbsdksh)
|
|
||||||
case $enable_shell in
|
|
||||||
mirbsdksh) enable_shell=ksh ;;
|
|
||||||
ksh) AC_DEFINE(KSH) ;;
|
|
||||||
sh) ;;
|
|
||||||
*)
|
|
||||||
AC_MSG_ERROR(bad --enable-shell: must be one of sh or ksh)
|
|
||||||
esac
|
|
||||||
SHELL_PROG=$enable_shell
|
|
||||||
AC_SUBST(SHELL_PROG)
|
|
||||||
dnl
|
|
||||||
dnl
|
|
||||||
dnl
|
|
||||||
AC_ARG_ENABLE(emacs,
|
|
||||||
[ --disable-emacs Compile out emacs command line editing (by default,
|
|
||||||
this is compiled in for ksh, compiled out for sh).])
|
|
||||||
case $enable_emacs:$enable_shell in
|
|
||||||
yes:*|:ksh) enable_emacs=yes; AC_DEFINE(EMACS) ;;
|
|
||||||
no:*|:sh) enable_emacs=no;;
|
|
||||||
*) AC_MSG_ERROR(bad --enable-emacs argument)
|
|
||||||
esac
|
|
||||||
dnl
|
|
||||||
dnl
|
|
||||||
AC_ARG_ENABLE(vi,
|
|
||||||
[ --disable-vi Compile out vi command line editing (by default,
|
|
||||||
this is compiled in for ksh, compiled out for sh).])
|
|
||||||
case $enable_vi:$enable_shell in
|
|
||||||
yes:*|:ksh) enable_vi=yes; AC_DEFINE(VI) ;;
|
|
||||||
no:*|:sh) enable_vi=no;;
|
|
||||||
*) AC_MSG_ERROR(bad --enable-vi argument)
|
|
||||||
esac
|
|
||||||
dnl
|
|
||||||
dnl
|
|
||||||
AC_ARG_ENABLE(jobs,
|
|
||||||
[ --disable-jobs Compile out job control support. If your system
|
|
||||||
doesn't support job control, this will automatically
|
|
||||||
be compiled out.])
|
|
||||||
case $enable_jobs in
|
|
||||||
yes|'') enable_jobs=yes; AC_DEFINE(JOBS) ;;
|
|
||||||
no) enable_jobs=no;;
|
|
||||||
*) AC_MSG_ERROR(bad --enable-jobs argument)
|
|
||||||
esac
|
|
||||||
dnl
|
|
||||||
dnl
|
|
||||||
AC_ARG_ENABLE(brace-expand,
|
|
||||||
[ --disable-brace-expand Compile out brace expansion code (a{b,c} -> ab ac)
|
|
||||||
(by default, this is compiled in for ksh, compiled
|
|
||||||
out for sh). Brace expansion can also be disabled
|
|
||||||
at run time (see set +o braceexpand).])
|
|
||||||
case $enable_brace_expand:$enable_shell in
|
|
||||||
yes:*|:ksh) enable_brace_expand=yes; AC_DEFINE(BRACE_EXPAND) ;;
|
|
||||||
no:*|:sh) enable_brace_expand=no;;
|
|
||||||
*) AC_MSG_ERROR(bad --enable-brace-expand argument)
|
|
||||||
esac
|
|
||||||
dnl
|
|
||||||
dnl
|
|
||||||
AC_ARG_ENABLE(history,
|
|
||||||
[ --enable-history={no,simple,complex} By default, simple history is used for
|
|
||||||
ksh, no history is used for sh. 'simple' means
|
|
||||||
history file is read on start-up, written when shell
|
|
||||||
exists. 'complex' means history files are updated
|
|
||||||
after each command so concurrent shells read each
|
|
||||||
other's commands. Note: 'complex' history doesn't
|
|
||||||
work well across NFS; also, it requires the mmap()
|
|
||||||
and flock() functions - if these aren't available,
|
|
||||||
'simple' history is automatically used.])
|
|
||||||
case $enable_history:$enable_shell in
|
|
||||||
simple:*|:ksh) enable_history=simple; ;;
|
|
||||||
complex:*) enable_history=complex; AC_DEFINE(COMPLEX_HISTORY) ;;
|
|
||||||
no:*|:sh)
|
|
||||||
case $enable_history:$enable_vi:$enable_emacs in
|
|
||||||
no:yes:*|no:*:yes)
|
|
||||||
AC_MSG_ERROR(can't disable history when vi or emacs is enabled) ;;
|
|
||||||
:yes:*|:*:yes)
|
|
||||||
enable_history=yes;;
|
|
||||||
*)
|
|
||||||
enable_history=no;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*) AC_MSG_ERROR(bad --enable-history argument)
|
|
||||||
esac
|
|
||||||
test X"$enable_history" != Xno && AC_DEFINE(HISTORY)
|
|
||||||
dnl
|
|
||||||
dnl
|
|
||||||
AC_ARG_ENABLE(posixly_correct,
|
|
||||||
[ --enable-posixly-correct Enable if you want POSIX behavior by default
|
|
||||||
(otherwise, posix behavior is only turned on if the
|
|
||||||
environment variable POSIXLY_CORRECT is present or by
|
|
||||||
using \"set -o posix\"; it can be turned off with
|
|
||||||
\"set +o posix\"). See the POSIX Mode section in the
|
|
||||||
man page for details on what this option affects.
|
|
||||||
NOTE: posix mode is not compatable with some bourne
|
|
||||||
sh/at&t ksh scripts.])
|
|
||||||
case $enable_posixly_correct:$enable_shell in
|
|
||||||
yes:*) enable_posixly_correct=yes; AC_DEFINE(POSIXLY_CORRECT) ;;
|
|
||||||
no:*|:*) enable_posixly_correct=no;;
|
|
||||||
*) AC_MSG_ERROR(bad --enable-posixly_correct argument)
|
|
||||||
esac
|
|
||||||
dnl
|
|
||||||
dnl
|
|
||||||
AC_ARG_ENABLE(default-env,
|
|
||||||
[ --enable-default-env=FILE Include FILE if ENV parameter is not set when
|
|
||||||
the shell starts. This can be useful when used with
|
|
||||||
rsh(1), which creates a non-login shell (ie, profile
|
|
||||||
isn't read, so there is no opertunity to set ENV).
|
|
||||||
Setting ENV to null disables the inclusion of
|
|
||||||
DEFAULT_ENV. NOTE: This is a non-standard feature
|
|
||||||
(ie, at&t ksh has no default environment).],,
|
|
||||||
enable_default_env=no)
|
|
||||||
if test X"$enable_default_env" != Xno; then
|
|
||||||
# The [a-zA-Z]:/ is for os2 types...
|
|
||||||
case $enable_default_env in
|
|
||||||
/*|[[a-zA-Z]]:/*)
|
|
||||||
enable_default_env="\"$enable_default_env\""
|
|
||||||
;;
|
|
||||||
\"/*\"|\"[[a-zA-Z]]:/*\")
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
AC_MSG_ERROR(--enable-default-env argument must be an absolute path (was $enable_default_env))
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
AC_DEFINE_UNQUOTED(DEFAULT_ENV, $enable_default_env)
|
|
||||||
fi
|
|
||||||
dnl
|
|
||||||
dnl
|
|
||||||
dnl Don't want silly documented - its silly
|
|
||||||
AC_ARG_ENABLE(silly,[ --enable-silly [A silly option]])
|
|
||||||
case $enable_silly:$enable_shell in
|
|
||||||
yes:*) enable_silly=yes; AC_DEFINE(SILLY) ;;
|
|
||||||
no:*|:*) enable_silly=no;;
|
|
||||||
*) AC_MSG_ERROR(bad --enable-silly argument)
|
|
||||||
esac
|
|
||||||
dnl
|
|
||||||
dnl
|
|
||||||
dnl don't want swtch documented - its ancient and probably doesn't work
|
|
||||||
AC_ARG_ENABLE(swtch,
|
|
||||||
[ --enable-swtch For use with shell layers (shl(1)). This has not
|
|
||||||
been tested for some time.])
|
|
||||||
case $enable_swtch:$enable_shell in
|
|
||||||
yes:*) enable_swtch=yes; AC_DEFINE(SWTCH) ;;
|
|
||||||
no:*|:*) enable_swtch=no;;
|
|
||||||
*) AC_MSG_ERROR(bad --enable-swtch argument)
|
|
||||||
esac
|
|
||||||
dnl
|
|
||||||
dnl
|
|
||||||
dnl Start of auto-configuration stuff...
|
dnl Start of auto-configuration stuff...
|
||||||
dnl
|
dnl
|
||||||
dnl
|
dnl
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_CPP
|
AC_PROG_CPP
|
||||||
AC_PROG_GCC_TRADITIONAL
|
AC_PROG_GCC_TRADITIONAL
|
||||||
dnl A hack to turn on warning messages for gcc - Warn-flags is not in
|
|
||||||
dnl the distribution since not everyone wants to see this stuff.
|
|
||||||
dnl (Warn-flags contains: -Wall)
|
|
||||||
if test X"$GCC" = Xyes && test -f $srcdir/Warn-flags; then
|
|
||||||
CFLAGS="${CFLAGS+$CFLAGS }$(cat $srcdir/Warn-flags)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl
|
|
||||||
dnl If LDSTATIC set in environment, pass it on to the Makefile and use it when
|
|
||||||
dnl doing compile checks to ensure we are checking the right thing.
|
|
||||||
AC_SUBST(LDSTATIC)LDSTATIC=${LDSTATIC-}
|
|
||||||
test X"$LDSTATIC" != X && LDFLAGS="${LDFLAGS+$LDFLAGS }$LDSTATIC"
|
|
||||||
dnl
|
|
||||||
dnl Executable suffix - normally empty; .exe on os2.
|
|
||||||
AC_SUBST(ac_exe_suffix)dnl
|
|
||||||
|
|
||||||
dnl this incorperates AC_AIX, AC_ISC_POSIX and AC_MINIX tests and does others
|
dnl this incorperates AC_AIX, AC_ISC_POSIX and AC_MINIX tests and does others
|
||||||
KSH_OS_TYPE
|
KSH_OS_TYPE
|
||||||
dnl
|
dnl
|
||||||
|
Loading…
x
Reference in New Issue
Block a user