Changes for NeXT. Some improvements to long lines.
This commit is contained in:
parent
94d46d52ad
commit
b418f89bcd
88
configure.in
88
configure.in
|
@ -4,6 +4,44 @@ AC_PREREQ(2.0)
|
|||
AC_INIT(Include/object.h)
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
# NEXTSTEP stuff
|
||||
AC_MSG_CHECKING(for --with-next-archs)
|
||||
AC_ARG_WITH(next-archs,
|
||||
[--with-next-archs='arch1 arch2 ..' build MAB binary], [
|
||||
if test -n "$withval"; then
|
||||
ac_sys_cpu=_`/usr/lib/arch_tool -choose_obj_dir $withval`
|
||||
ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
|
||||
else
|
||||
ac_sys_cpu=_`arch`
|
||||
fi
|
||||
], [])
|
||||
AC_MSG_RESULT($with_next_archs)
|
||||
|
||||
# Set name for machine-dependent library files
|
||||
AC_SUBST(MACHDEP)
|
||||
AC_MSG_CHECKING(MACHDEP)
|
||||
if test -z "$MACHDEP"
|
||||
then
|
||||
if test -f /usr/lib/NextStep/software_version; then
|
||||
set X `hostinfo | grep 'NeXT Mach.*:' | \
|
||||
sed -e 's/://' -e 's/\./_/'` && \
|
||||
ac_sys_system=next && ac_sys_release=$4
|
||||
MACHDEP="$ac_sys_system$ac_sys_release$ac_sys_cpu"
|
||||
else
|
||||
ac_sys_system=`uname -s`
|
||||
ac_sys_release=`uname -r`
|
||||
ac_md_system=`echo $ac_sys_system |
|
||||
tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
|
||||
ac_md_release=`echo $ac_sys_release |
|
||||
tr -d '[/ ]' | sed 's/\..*//'`
|
||||
MACHDEP="$ac_md_system$ac_md_release"
|
||||
fi
|
||||
case MACHDEP in
|
||||
'') MACHDEP=unknown;;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT($MACHDEP)
|
||||
|
||||
# checks for alternative programs
|
||||
AC_MSG_CHECKING(for --without-gcc)
|
||||
AC_ARG_WITH(gcc, [--without-gcc never use gcc], [
|
||||
|
@ -15,7 +53,7 @@ AC_ARG_WITH(gcc, [--without-gcc never use gcc], [
|
|||
*) CC=$withval
|
||||
without_gcc=$withval;;
|
||||
esac], [
|
||||
case `uname -s` in
|
||||
case $ac_sys_system in
|
||||
OSF1) CC=cc
|
||||
without_gcc=;;
|
||||
*) without_gcc=no;;
|
||||
|
@ -46,10 +84,20 @@ else
|
|||
INSTALL_PROGRAM="$INSTALL"
|
||||
INSTALL_DATA="$INSTALL -m 644"
|
||||
fi
|
||||
AC_SUBST(OPT)
|
||||
|
||||
# Optimizer/debugger flags passed between Makefiles
|
||||
AC_SUBST(OPT)
|
||||
if test -z "$OPT"
|
||||
then OPT=-O
|
||||
then
|
||||
case $ac_sys_system in
|
||||
NeXT|next) \
|
||||
if test -n "$ac_arch_flags"; then
|
||||
OPT="-g -Wall -O3 -fomit-frame-pointer $ac_arch_flags";
|
||||
else
|
||||
OPT="-g -Wall -O3 -fomit-frame-pointer";
|
||||
fi;;
|
||||
*) OPT="-O";;
|
||||
esac
|
||||
fi
|
||||
|
||||
# checks for UNIX variants that set C preprocessor variables
|
||||
|
@ -77,31 +125,12 @@ AC_TYPE_SIGNAL
|
|||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_UID_T
|
||||
|
||||
# Set name for machine-dependent library files
|
||||
AC_SUBST(MACHDEP)
|
||||
AC_MSG_CHECKING(MACHDEP)
|
||||
if test -z "$MACHDEP"
|
||||
then
|
||||
ac_sys_system=`uname -s | tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
|
||||
ac_sys_release=`uname -r | tr -d '[/ ]' | sed 's/\..*//'`
|
||||
ac_sys_cpu=`(uname -p 2>/dev/null || uname -m) |
|
||||
tr '[[A-Z]]' '[[a-z]]'`
|
||||
## MACHDEP="$ac_sys_system$ac_sys_release$ac_sys_cpu"
|
||||
MACHDEP="$ac_sys_system$ac_sys_release"
|
||||
case MACHDEP in
|
||||
'') MACHDEP=unknown;;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT($MACHDEP)
|
||||
|
||||
# Set info about shared libraries.
|
||||
# XXX This should try things out instead of testing uname!
|
||||
AC_SUBST(SO)
|
||||
AC_SUBST(LDSHARED)
|
||||
AC_SUBST(CCSHARED)
|
||||
AC_SUBST(LINKFORSHARED)
|
||||
ac_sys_system=`uname -s`
|
||||
ac_sys_release=`uname -r`
|
||||
# SO is the extension of shared libraries `(including the dot!)
|
||||
# -- usually .so, .sl on HP-UX
|
||||
AC_MSG_CHECKING(SO)
|
||||
|
@ -109,6 +138,7 @@ if test -z "$SO"
|
|||
then
|
||||
case $ac_sys_system in
|
||||
hp*|HP*) SO=.sl;;
|
||||
NeXT|next) SO=.a;; # no shared libs on NeXT 3.3 and less
|
||||
*) SO=.so;;
|
||||
esac
|
||||
fi
|
||||
|
@ -127,6 +157,7 @@ then
|
|||
DYNIX/ptx*) LDSHARED="ld -G";;
|
||||
Linux*) LDSHARED="gcc -shared";;
|
||||
FreeBSD*) LDSHARED="ld -Bshareable";;
|
||||
NeXT|next/3*) LDSHARED="ld -u libsys_s";;
|
||||
*) LDSHARED="ld";;
|
||||
esac
|
||||
fi
|
||||
|
@ -206,6 +237,9 @@ AC_MSG_RESULT($withval)
|
|||
if test -d "$withval"
|
||||
then LIBS="$LIBS -L$withval"
|
||||
fi
|
||||
AC_CHECK_HEADER(mach/cthreads.h, [AC_DEFINE(WITH_THREAD)
|
||||
AC_DEFINE(C_THREADS)
|
||||
LIBOBJS="$LIBOBJS thread.o"],[
|
||||
AC_CHECK_LIB(pthreads, pthread_create, [AC_DEFINE(WITH_THREAD)
|
||||
AC_DEFINE(_POSIX_THREADS)
|
||||
LIBS="$LIBS -lpthreads"
|
||||
|
@ -214,7 +248,7 @@ AC_CHECK_LIB(pthread, pthread_create, [AC_DEFINE(WITH_THREAD)
|
|||
AC_DEFINE(_POSIX_THREADS)
|
||||
LIBS="$LIBS -lpthread"
|
||||
LIBOBJS="$LIBOBJS thread.o"])
|
||||
])
|
||||
])])
|
||||
AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD)
|
||||
LIBS="$LIBS -lmpc"
|
||||
LIBOBJS="$LIBOBJS thread.o"])
|
||||
|
@ -258,7 +292,7 @@ AC_CHECK_FUNCS(chown clock dlopen flock ftime ftruncate \
|
|||
link lstat mkfifo nice plock putenv readlink \
|
||||
select setgid setuid setsid setpgid setpgrp setvbuf \
|
||||
sigaction siginterrupt sigrelse strftime symlink \
|
||||
tcgetpgrp tcsetpgrp times truncate uname waitpid) \
|
||||
tcgetpgrp tcsetpgrp times truncate uname waitpid)
|
||||
AC_REPLACE_FUNCS(dup2 getcwd strerror memmove)
|
||||
AC_CHECK_FUNC(getpgrp, AC_TRY_COMPILE([#include <unistd.h>], [getpgrp(0);], AC_DEFINE(GETPGRP_HAVE_ARG)))
|
||||
AC_CHECK_FUNC(setpgrp, AC_TRY_COMPILE([#include <unistd.h>], [setpgrp(0,0);], AC_DEFINE(SETPGRP_HAVE_ARG)))
|
||||
|
@ -402,4 +436,8 @@ test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
|
|||
AC_SUBST(LIBOBJS)dnl
|
||||
|
||||
# generate output files
|
||||
AC_OUTPUT(Makefile Objects/Makefile Parser/Makefile Python/Makefile Modules/Makefile.pre)
|
||||
AC_OUTPUT(Makefile \
|
||||
Objects/Makefile \
|
||||
Parser/Makefile \
|
||||
Python/Makefile \
|
||||
Modules/Makefile.pre)
|
||||
|
|
Loading…
Reference in New Issue