Mercurial > hg > xemacs-beta
diff configure.in @ 1111:184461bc8de4
[xemacs-hg @ 2002-11-18 06:52:23 by ben]
warning fixes, etc.
* s/cygwin32.h:
-fvtable-thunks is obsolete in GCC 3 and generates warnings.
* s/mingw32.h:
* s/windowsnt.h:
Comment fixes.
* emodules.h:
Fix warnings from redefining symbols.
* eval.c:
Fix C++ errors -- no automatic casting between function pointers
and void *, function declarations inside of functions not allowed.
* event-Xt.c (emacs_Xt_enqueue_focus_event):
Warning fixes.
* fileio.c (Ffile_truename):
Warning fixes.
Use LOCAL_TO_WIN32_FILE_FORMAT rather than duplicating it.
* glyphs-x.c:
Fix style.
* intl-auto-encap-win32.c:
* intl-auto-encap-win32.h:
* intl-encap-win32.c:
* intl-encap-win32.c (qxeRegConnectRegistry):
* syswindows.h (RegConnectRegistry):
DdeCreateStringHandle needs to be manual due to new Cygwin bug.
* intl-win32.c:
wcslen/wcscmp don't seem to exist under G++ 3, Cygwin.
* lisp.h:
* lisp-union.h:
* lisp-disunion.h:
* process-unix.c (unix_send_process):
Ugh, C needs volatile and C++ must not have volatile. Remove
previous volatile hacks, which don't seem to be working any more.
* sheap.c (STATIC_HEAP_SLOP):
Try to get a working Cygwin build with old unexec.
* sheap.c (more_static_core):
No NL's in literals allowed.
* symbols.c (Fset):
Fix C++ errors.
* syswindows.h:
Fix Cygwin complaints now that some missing structs have been added.
aclocal.m4: Disable shared library modules under Cygwin for the moment,
since we need some more tricky coding done and I don't have the
time right now.
configure.in, configure.usage:
code-files.el, loadhist.el: Fix warnings.
package-get.el: Fix warnings.
NOTE: This was already fixed awhile ago, but reverted by Steve Y.
Please be careful.
postgresql/Makefile.in.in: Removed.
Move common stuff into modues/common/Makefile.common. (Also
add extraclean target and a couple of other fixes in that file.)
postgresql/configure.ac: Extract out common configure stuff into
modules/common/configure-{pre,post}.ac.
postgresql/postgresql.c: Fix warning.
ldap/Makefile.in.in: Removed.
Move common stuff into modues/common/Makefile.common. (Also
add extraclean target and a couple of other fixes in that file.)
ldap/configure.ac: Extract out common configure stuff into
modules/common/configure-{pre,post}.ac.
common/Makefile.common: Common stuff is here.
author | ben |
---|---|
date | Mon, 18 Nov 2002 06:53:08 +0000 |
parents | 989ddde6705d |
children | b3fcaf7cb856 |
line wrap: on
line diff
--- a/configure.in Sun Nov 17 22:53:08 2002 +0000 +++ b/configure.in Mon Nov 18 06:53:08 2002 +0000 @@ -53,6 +53,14 @@ dnl autoconf system), so quote them like this: [[foo]] AC_PREREQ(2.13)dnl + +dnl #### Doesn't work currently. it would be really nice if we could +dnl get this working, because many autoconfs v2.5 come with support for +dnl v2.1 source files but get snafued by our nasty configure.ac kludge. +dnl +dnl m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]), 2.5), -1, +dnl [m4_fatal([Autoconf version 2.5 or higher not supported])]) + dnl Redefine some standard autoconf macros dnl here is how XEmacs is different: dnl - no cache file @@ -346,6 +354,7 @@ with_prefix='yes' with_site_lisp='no' with_site_modules='yes' +need_modules_common='' with_menubars='' with_scrollbars='' with_widgets='' @@ -533,6 +542,7 @@ compiler | \ xemacs_compiler | \ cflags | \ + cflags_warning | \ cpp | \ cppflags | \ libs | \ @@ -1646,6 +1656,11 @@ else cflags_specified=no; fi +if test "${cflags_warning-unset}" != unset + then cflags_warning_specified=yes; + else cflags_warning_specified=no; +fi + xe_save_CFLAGS="$CFLAGS" AC_PROG_CC dnl Autoconf has its own magic for compiler autodetection @@ -1931,37 +1946,67 @@ 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 -Winline -Wmissing-prototypes" + CFLAGS="-g -O3" + 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" + elif test "$__SUNPRO_C" = "yes"; then + case "$opsys" in + sol2 ) CFLAGS="-xO4" ;; + sunos4* ) CFLAGS="-xO2" ;; + esac + elif test "$__DECC" = "yes"; then + CFLAGS="-O3" + elif test "$CC" = "xlc"; then + CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qro -qmaxmem=20000" + dnl ### Add optimal CFLAGS support for other compilers HERE! + else + CFLAGS="-O" ;dnl The only POSIX-approved flag + fi +fi + +dnl Calculate warning flags. We now separate the flags for warnings from +dnl the other flags because we really really want the warnings to be seen +dnl by everyone. + +if test "$cflags_warning_specified" = "no"; then + dnl Following warning flags are known to work well. + if test "$GCC" = "yes"; then + cflags_warning="-Wall -Wno-switch -Winline -Wmissing-prototypes" dnl Yuck, bad compares have been worth at least 3 crashes! - CFLAGS="$CFLAGS -Wsign-compare" + cflags_warning="$cflags_warning -Wsign-compare" + dnl NOTE: The following three, as well as -Wmissing-declarations and + dnl -Weffc++ below, have been recently added. If you are getting + dnl grief from them, please notify ben@xemacs.org! + cflags_warning="$cflags_warning -Wundef -Wstrict-prototypes -Wpacked" dnl With g++, -Wshadow produces five zillion utterly random warnings -- dnl a local var named `buffer' conflicts with `struct buffer' for dnl example. Even with gcc, -Wshadow is questionable because of its dnl complaints about parameters with the same names as global functions. if test "$xemacs_compiler" != "g++"; then - CFLAGS="$CFLAGS -Wshadow" + dnl no -Wmissing-declarations under g++. + cflags_warning="$cflags_warning -Wshadow -Wmissing-declarations" + else + cflags_warning="$cflags_warning -Weffc++" fi dnl glibc is intentionally not `-Wpointer-arith'-clean. dnl Ulrich Drepper has rejected patches to fix the glibc header files. - test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith" - 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" + test "$have_glibc" != "yes" && \ + cflags_warning="$cflags_warning -Wpointer-arith" elif test "$__SUNPRO_C" = "yes"; then case "$opsys" in - sol2 ) CFLAGS="-v -xO4" ;; - sunos4* ) CFLAGS="-xO2";; + sol2 ) cflags_warning="-v" ;; esac - elif test "$__DECC" = "yes"; then - CFLAGS="-O3" elif test "$CC" = "xlc"; then - CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000" - dnl ### Add optimal CFLAGS support for other compilers HERE! - else - CFLAGS="-O" ;dnl The only POSIX-approved flag + cflags_warning="-qinfo" + dnl ### Add optimal cflags_warning support for other compilers HERE! fi fi +dnl Now combine all C flags. Put the warning flags first so that +dnl user-specified flags will override. +CFLAGS="$cflags_warning $CFLAGS" + dnl Search for GCC specific build problems we know about if test "$GCC" = "yes"; then AC_MSG_CHECKING(for buggy gcc versions) @@ -3065,6 +3110,19 @@ dnl offix.c, so that the thing is dumped after lastfile.o AC_SUBST(dnd_objs) +dnl Support for using a different compiler for xemacs itself. +dnl Useful for building XEmacs with a C++ compiler. +dnl For example, `configure --compiler=gcc --xemacs-compiler=g++ + +dnl The compiler used to build xemacs, as opposed to the compiler +dnl used by configure and lib-src, is determined from the following +dnl sources, in order of priority: +dnl o --xemacs-compiler configure flag +dnl o XEMACS_CC environment variable +dnl o same as the regular compiler, (determined previously) +test -n "$xemacs_compiler" && XEMACS_CC="$xemacs_compiler" +: ${XEMACS_CC:="$CC"} + dnl Autodetect dll support dnl This must come before the detection code for anything that is in a module if test "$with_modules" != "no"; then @@ -3121,7 +3179,7 @@ echo " No module support." fi with_modules=no - MOD_CC=${CC} + MOD_CC="$XEMACS_CC" MODCFLAGS="\$(CFLAGS) -I../../src -I\$(srcdir)/../../src" INSTALLPATH="" MOD_INSTALL_PROGRAM="true" @@ -3270,6 +3328,7 @@ AC_CHECK_FUNCS(ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result) LIBS="$save_LIBS" XE_APPEND(modules/ldap, MAKE_SUBDIR) + need_modules_common=yes if test "$with_modules" = "yes"; then XE_APPEND(modules/ldap, INSTALL_ARCH_DEP_SUBDIR) fi @@ -3304,6 +3363,7 @@ AC_DEFINE_UNQUOTED(LIBPQ_FE_H_FILE, "$libpq_fe_h_file") XE_PREPEND(-lpq, postgresql_libs) XE_APPEND(modules/postgresql, MAKE_SUBDIR) + need_modules_common=yes if test "$with_modules" = "yes"; then XE_APPEND(modules/postgresql, INSTALL_ARCH_DEP_SUBDIR) fi @@ -3888,7 +3948,7 @@ dnl Check for POSIX functions. dnl ---------------------------------------------------------------- -AC_CHECK_FUNCS(cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getwd link logb lrand48 matherr mkdir mktime perror poll random readlink rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strerror symlink tzset ulimit usleep waitpid vsnprintf fsync ftruncate umask) +AC_CHECK_FUNCS(cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getwd link logb lrand48 matherr mkdir mktime perror poll random readlink rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strerror symlink tzset ulimit usleep waitpid vsnprintf fsync ftruncate umask wcslen wcscmp) dnl getaddrinfo() is borked under hpux11 if test "$ac_cv_func_getaddrinfo" != "no" ; then @@ -4568,7 +4628,7 @@ AC_SUBST(MAKE_SUBDIR) AC_SUBST(SUBDIR_MAKEFILES) -dnl Make s&m symlinks in the src directory, for config.h +dnl Make s&m symlinks in the src directory, for config.h. for dir in src/s src/m; do if test ! -d "$dir" ; then echo Making symbolic link to "$srcdir/$dir" @@ -4576,6 +4636,16 @@ fi done +dnl Also make modules/common link if needed for the module Makefiles. +if test "$need_modules_common" = "yes"; then + for dir in modules/common; do + if test ! -d "$dir" ; then + echo Making symbolic link to "$srcdir/$dir" + ${LN_S} "$srcdir/$dir" "$dir" + fi + done +fi + if test "$extra_verbose" = "yes"; then echo "" PRINT_VAR(extra_objs @@ -4806,18 +4876,6 @@ AC_SUBST(RANLIB) AC_SUBST(dynodump_arch) -dnl Support for using a different compiler for xemacs itself. -dnl Useful for building XEmacs with a C++ compiler. -dnl For example, `configure --compiler=gcc --xemacs-compiler=g++ - -dnl The compiler used to build xemacs, as opposed to the compiler -dnl used by configure and lib-src, is determined from the following -dnl sources, in order of priority: -dnl o --xemacs-compiler configure flag -dnl o XEMACS_CC environment variable -dnl o same as the regular compiler, (determined previously) -test -n "$xemacs_compiler" && XEMACS_CC="$xemacs_compiler" -: ${XEMACS_CC:="$CC"} AC_SUBST(XEMACS_CC) dnl The default is yes @@ -4928,7 +4986,7 @@ else echo " Not using any machine description file" fi -echo " Compiler: $CC $CFLAGS" +echo " Compiler: $XEMACS_CC $CFLAGS" echo " Relocating allocator for buffers: $rel_alloc" echo " GNU version of malloc: ${GNU_MALLOC}${GNU_MALLOC_reason}" case "$ld_switch_site" in @@ -5115,10 +5173,15 @@ dnl Build Makefile.in's from Makefile.in.in's dnl except ./Makefile from $srcdir/Makefile.in +dnl src/Makefile.in will have src/depend appended to it; +dnl module Makefiles will have the common text in +dnl modules/common/Makefile.common appended. for file in $internal_makefile_list; do - test "$file" = src/Makefile.in && \ - file="src/Makefile.in:src/Makefile.in.in:src/depend" + case $file in + src/Makefile.in ) file="src/Makefile.in:src/Makefile.in.in:src/depend" ;; + modules/* ) file="${file}:${file}.in:modules/common/Makefile.common" ;; + esac XE_APPEND($file, ac_output_files) done ac_output_files="$ac_output_files src/paths.h lib-src/config.values"