use_union_type="no"
with_dnet=""
pdump="no"
+dnl dragndrop is still experimental. When it is stable, comment out the following line:
+with_dragndrop="no"
dnl ------------------
dnl Options Processing
case "$val" in
lockf ) val=lockf ;;
flock ) val=flock ;;
- file ) val=file ;;
+ file | dot ) val=file ;;
+ locking ) val=locking ;;
* ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
- \`lockf', \`flock', or \`file'."]) ;;
+ \`lockf', \`flock', \`file', \`locking', or \`mmdf'."]) ;;
esac
eval "$opt=\"$val\""
;;
dnl have stuck the source on a read-only partition. Instead we
dnl create it as an actual directory later on if it does not already
dnl exist.
-for dir in lisp etc man info; do
+for dir in lisp etc man info tests; do
if test ! -d "$dir" ; then
echo Making symbolic link to "$srcdir/$dir"
${LN_S} "$srcdir/$dir" "$dir"
if test "${debug:=$beta}" = "yes"; then
use_assertions=yes memory_usage_stats=yes
XE_ADD_OBJS(debug.o)
+ XE_ADD_OBJS(tests.o)
AC_DEFINE(DEBUG_XEMACS)
fi
test "$use_assertions" = "yes" && AC_DEFINE(USE_ASSERTIONS)
alpha*-*-* ) machine=alpha ;;
vax-*-* ) machine=vax ;;
mips-dec-* ) machine=pmax ;;
+ mips-sgi-irix6* ) machine=iris6d ;;
mips-sgi-* ) machine=iris4d ;;
mips*-linux ) machine=mips ;;
romp-ibm-* ) machine=ibmrt ;;
mips-sony-* ) machine=news-risc ;;
clipper-* ) machine=clipper ;;
arm-* ) machine=arm ;;
+ armv[34][lb]-* ) machine=arm ;;
ns32k-* ) machine=ns32000 ;;
esac
CPP_boolean_to_sh(ORDINARY_LINK, ordinary_link)
CPP_boolean_to_sh(SYSTEM_MALLOC, system_malloc)
CPP_boolean_to_sh(TERMINFO, have_terminfo)
+dnl The MAIL_USE_xxx variables come from the s&m headers
CPP_boolean_to_sh(MAIL_USE_FLOCK, mail_use_flock)
CPP_boolean_to_sh(MAIL_USE_LOCKF, mail_use_lockf)
+CPP_boolean_to_sh(MAIL_USE_LOCKING, mail_use_locking)
CPP_boolean_to_sh(HAVE_WIN32_PROCESSES, win32_processes)
EOF
ld lib_gcc ld_text_start_addr start_files ordinary_link
have_terminfo mail_use_flock mail_use_lockf) && echo ""
+dnl Pick up mingw32 include path
+case "$opsys" in mingw*) mingw_include=`eval "gcc -print-file-name=libc.a"` ;
+ mingw_include=`eval "dirname $mingw_include"` ;
+ mingw_include="-I$mingw_include/../include/mingw32" ;
+ XE_APPEND($mingw_include, c_switch_system) ;;
+esac
+
dnl Non-ordinary link usually requires -lc
test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
dnl Following values of CFLAGS are known to work well.
dnl Should we take debugging options into consideration?
if test "$GCC" = "yes"; then
- CFLAGS="-g -O3 -Wall -Wno-switch"
+ CFLAGS="-g -O3 -Wall -Wno-switch -Wpointer-arith -Winline -Wmissing-prototypes -Wshadow"
dnl I'm not convinced this is a good idea any more. -sb
dnl test "$opsys $machine" = "linux intel386" && \
dnl CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2"
dnl Extra system-specific library directories - please add to list
for dir in "/usr/ccs/lib"; do
- test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_site)
+ test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_system)
done
dnl --site-runtime-libraries (multiple dirs)
export LD_RUN_PATH
fi
+dnl Linux systems have dynamic runtime library directories listed in
+dnl /etc/ld.so.conf. Since those are used at run time, it seems pretty
+dnl safe to use them at link time, and less controversial than forcing
+dnl the run-time to use the link-time libraries. This also helps avoid
+dnl mismatches between the link-time and run-time libraries.
+
+dnl #### Unfortunately, there are horrible libc4 and libc5 libraries
+dnl listed in /etc/ld.so.conf on some systems, and including them on
+dnl the link path leads to linking in utterly broken libc's.
+dnl There are many clever ways of approaching this problem,
+dnl but finding out that actually works...
+
+dnl if test -z "$LD_RUN_PATH" -a -r "/etc/ld.so.conf"; then
+dnl for dir in `cat /etc/ld.so.conf`; do
+dnl test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_system)
+dnl done
+dnl add_runtime_path=no
+dnl fi
+
dnl -------------------------------------
dnl Compute runtime library path
dnl -------------------------------------
-if test "$dynamic" = "no"; then add_runtime_path=no
+if test -n "$add_runtime_path"; then :;
+elif test "$dynamic" = "no"; then add_runtime_path=no
elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
else case "$opsys" in
sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
dnl Determine type of mail locking from configure args and s&m headers
AC_CHECKING(type of mail spool file locking)
+AC_CHECK_FUNCS(lockf flock)
+dnl The mail_use_xxx variables are set according to the s&m headers.
test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
-if test "$mail_locking" = "lockf"; then AC_DEFINE(REAL_MAIL_USE_LOCKF)
-elif test "$mail_locking" = "flock"; then AC_DEFINE(REAL_MAIL_USE_FLOCK)
-else mail_locking="dot-locking"
+test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
+if test "$mail_locking" = "lockf"; then AC_DEFINE(MAIL_LOCK_LOCKF)
+elif test "$mail_locking" = "flock"; then AC_DEFINE(MAIL_LOCK_FLOCK)
+elif test "$mail_locking" = "locking"; then AC_DEFINE(MAIL_LOCK_LOCKING)
+else mail_locking="dot-locking"; AC_DEFINE(MAIL_LOCK_DOT)
fi
+test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
+ XE_DIE("lockf mail locking requested but not available.")
+test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
+ XE_DIE("flock mail locking requested but not available.")
+test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
+ XE_DIE("locking mail locking requested but not available.")
case "$opsys" in decosf*)
AC_CHECK_LIB(pthreads, cma_open)
if test "$with_msw" = "yes"; then
AC_DEFINE(HAVE_MS_WINDOWS)
install_pp="$blddir/lib-src/installexe.sh"
- XE_APPEND(-lshell32 -lgdi32 -luser32 -lcomctl32, libs_system)
+ XE_APPEND(-lshell32 -lgdi32 -luser32 -lcomctl32 -lwinspool, libs_system)
test "$with_dragndrop" != no && XE_APPEND(msw, dragndrop_proto)
if test "$window_system" != x11; then
window_system=msw
dnl What in heck did the user actually want?
case "$with_athena" in
- dnl This is the default, old fashioned flat Athena.
+ dnl This is the default, old fashioned flat Athena.
"xaw" | "") athena_variant=Xaw athena_3d=no ;;
"3d") athena_variant=Xaw3d athena_3d=yes ;;
"next") athena_variant=neXtaw athena_3d=yes ;;
dnl Search for the Athena library...
if test "$athena_3d" = "no"; then
- AC_CHECK_LIB($athena_variant, XawScrollbarSetThumb,
+ AC_CHECK_LIB($athena_variant, XawScrollbarSetThumb,
[
dnl Must not be a 3d library...
- AC_CHECK_LIB($athena_variant, threeDClassRec,
+ AC_CHECK_LIB($athena_variant, threeDClassRec,
AC_MSG_WARN("Could not find a non-3d Athena widget library."),
athena_lib=$athena_variant)
- ],
+ ],
AC_MSG_WARN("Could not find an Athena widget library."))
else
dnl The real configuration, need 3d library
AC_CHECK_LIB($athena_variant, threeDClassRec, athena_lib=$athena_variant,
dnl OK, couldn't find it with a proper name, try the standard Athena lib
dnl If that is 3d, presume the user asked for what they have installed.
- AC_CHECK_LIB(Xaw, threeDClassRec,
+ AC_CHECK_LIB(Xaw, threeDClassRec,
[
- athena_lib=Xaw;
+ athena_lib=Xaw;
AC_MSG_WARN("Assuming that libXaw is actually $athena_variant.");
],
AC_MSG_WARN("Could not find a 3d Athena widget library that looked like $athena_variant.")))
AC_CHECK_HEADER(X11/$athena_variant/ThreeD.h,
athena_h_path=X11/$athena_variant,))
+ dnl Is the variant specific header directory directly under include?
+ if test -z "$athena_h_path"; then
+ AC_CHECK_HEADER($athena_variant/XawInit.h,
+ AC_CHECK_HEADER($athena_variant/ThreeD.h,
+ athena_h_path=$athena_variant,))
+ fi
+
dnl If we couldn't find the specific variant, try the generic Athena 3d headers
if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
AC_CHECK_HEADER(X11/Xaw3d/XawInit.h,
],))
fi
+ dnl Also generic 3d headers directly under include dir
+ if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
+ AC_CHECK_HEADER(Xaw3d/XawInit.h,
+ AC_CHECK_HEADER(Xaw3d/ThreeD.h,
+ [
+ AC_MSG_WARN("Assuming that Xaw3d headers are suitable for $athena_variant.")
+ athena_h_path=Xaw3d
+ ],))
+ fi
+
dnl If nothing yet found, see if Xaw is a 3d header set...
dnl We AC_MSG_WARN if we fail because I am all out of ideas...
if test -z "$athena_h_path"; then
test "$with_scrollbars" != "no" && AC_DEFINE(HAVE_SCROLLBARS)
test "$with_dialogs" != "no" && AC_DEFINE(HAVE_DIALOGS)
test "$with_toolbars" != "no" && AC_DEFINE(HAVE_TOOLBARS)
-test "$with_widgets" != "no" && AC_DEFINE(HAVE_WIDGETS)
+test "$with_widgets" != "no" && AC_DEFINE(HAVE_WIDGETS)
test "$with_menubars" = "lucid" && AC_DEFINE(LWLIB_MENUBARS_LUCID)
test "$with_scrollbars" = "lucid" && AC_DEFINE(LWLIB_SCROLLBARS_LUCID)
test "$with_dialogs" = "motif" && AC_DEFINE(LWLIB_DIALOGS_MOTIF)
test "$with_widgets" = "motif" && AC_DEFINE(LWLIB_WIDGETS_MOTIF)
-test "$with_menubars" != "no" && XE_ADD_OBJS(menubar.o)
-test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar.o)
-test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog.o)
-test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar.o)
+test "$with_menubars" != "no" && XE_ADD_OBJS(menubar.o)
+test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar.o)
+test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog.o)
+test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar.o)
if test "$with_x11" = "yes"; then
- test "$with_menubars" != "no" && XE_ADD_OBJS(menubar-x.o)
- test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar-x.o)
- test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog-x.o)
- test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar-x.o)
+ test "$with_menubars" != "no" && XE_ADD_OBJS(menubar-x.o)
+ test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar-x.o)
+ test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog-x.o)
+ test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar-x.o)
test "$all_widgets" != "no no no no no" && XE_ADD_OBJS(gui-x.o)
fi
XE_COMPUTE_RUNPATH()
fi
-AC_CHECK_FUNCS(cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf)
+AC_CHECK_FUNCS(cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask)
-dnl realpath is buggy on linux, decosf and aix4
-
-dnl The realpath() in linux libc (4.6.27) sometimes fails with ELOOP.
-dnl The realpath in ELF linux libc's is O.K.
-dnl For example, call realpath on a file thirty-five or so directories deep
-dnl and you get ELOOP even if no symlinks at all are involved.
-dnl Reports as of 11/1997 indicate BSDi has problems too.
-dnl The realpath() in UnixWare2.1.3 could not get any pathname fragment in error condition.
-case "$opsys" in
- linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) XE_ADD_OBJS(realpath.o) ;;
- * )
- case "$canonical" in
- *-*-sysv4.2uw2* ) XE_ADD_OBJS(realpath.o) ;;
- * ) AC_CHECK_FUNCS(realpath)
- test "$ac_cv_func_realpath" != "yes" && XE_ADD_OBJS(realpath.o) ;;
- esac ;;
-esac
+dnl Use our own realpath always.
+XE_ADD_OBJS(realpath.o)
dnl Check whether the system provides getloadavg (Solaris 7 has it)
AC_CHECK_FUNCS(getloadavg)
echo ""
fi
-dnl Create some auxiliary files
-if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then
- echo "creating src/gdbinit"; echo ""
- echo "source $srcdir/src/gdbinit" > src/gdbinit
+dnl ----------------------------------------------
+dnl Create some auxiliary files for developers.
+dnl ----------------------------------------------
+
+dnl Create a .gdbinit useful for debugging XEmacs
+if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
+ test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
+ echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
+fi
+
+dnl Create a .dbxrc useful for debugging XEmacs
+if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
+ test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
+ echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
+fi
+
+dnl Create a useful TAGS file
+if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
+ test "$extra_verbose" = "yes" && echo "creating TAGS"
+ echo "\f
+$srcdir/TAGS,include" > "TAGS"
fi
dnl Create top level .sbinit for Sun compilers
if test "$__SUNPRO_C" = "yes"; then
- echo "creating .sbinit"; echo ""
+ test "$extra_verbose" = "yes" && echo "creating .sbinit"
( echo "# For use with Sun WorkShop's Source browser."
echo "# See sbquery(1) and sbinit(4) for more information"
for dir in $MAKE_SUBDIR; do echo "import $dir"; done
if test -n "$runpath"; then
echo " Runtime library search path: $runpath"
fi
+if test "$have_xaw" = "yes"; then
+ echo " Athena library to link: $athena_lib"
+ echo " Athena header include path: $athena_h_path"
+fi
test "$with_dnet" = yes && echo " Compiling in support for DNET."
test "$with_socks" = yes && echo " Compiling in support for SOCKS."
test "$with_xauth" = yes && echo " Compiling in support for XAUTH."
lucid ) echo " Using Lucid scrollbars." ;;
motif ) echo " Using Motif scrollbars." ;;
athena ) echo " Using Athena scrollbars." ;;
- athena3d ) echo " Using Athena-3d scrollbars." ;;
msw ) echo " Using MS-Windows scrollbars." ;;
esac
case "$with_widgets" in
motif ) echo " Using Motif native widgets." ;;
athena ) echo " Using Athena native widgets." ;;
- athena3d ) echo " Using Athena-3d native widgets." ;;
msw ) echo " Using MS-Windows native widgets." ;;
esac
case "$with_dialogs" in
fi; fi
;;
athena ) echo " Using Athena dialog boxes." ;;
- athena3d ) echo " Using Athena-3d dialog boxes." ;;
msw ) echo " Using MS-Windows dialog boxes." ;;
esac
test "$with_modules" = "yes" && echo " Compiling in dynamic shared object module support."