X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/374f6a5f34a83d3e4c518f0726558642293fdd71..a18baf565e872759de9281c3488c3981d19a15e1:/configure.ac diff --git a/configure.ac b/configure.ac index 22ec494214..aaddfcd738 100644 --- a/configure.ac +++ b/configure.ac @@ -967,6 +967,11 @@ AS_IF([test $gl_gcc_warnings = no], nw="$nw -Wcast-align" fi + # This causes too much noise in the MinGW build + if test $opsys = mingw32; then + nw="$nw -Wpointer-sign" + fi + gl_MANYWARN_ALL_GCC([ws]) gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw]) for w in $ws; do @@ -981,13 +986,16 @@ AS_IF([test $gl_gcc_warnings = no], # More things that clang is unduly picky about. if test $emacs_cv_clang = yes; then - gl_WARN_ADD([-Wno-format-extra-args]) + gl_WARN_ADD([-Wno-tautological-compare]) gl_WARN_ADD([-Wno-tautological-constant-out-of-range-compare]) - gl_WARN_ADD([-Wno-unused-command-line-argument]) - gl_WARN_ADD([-Wno-unused-value]) fi - AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.]) + # This causes too much noise in the MinGW build + if test $opsys = mingw32; then + gl_WARN_ADD([-Wno-pointer-sign]) + fi + + AC_DEFINE([GCC_LINT], [1], [Define to 1 if --enable-gcc-warnings.]) AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks]) AH_VERBATIM([GNULIB_PORTCHECK_FORTIFY_SOURCE], [/* Enable compile-time and run-time bounds-checking, and some warnings, @@ -3237,34 +3245,29 @@ fi ### Use -lXpm if available, unless '--with-xpm=no'. ### mingw32 doesn't use -lXpm, since it loads the library dynamically. -### In the Cygwin-w32 build, we need to use /usr/include/noX/X11/xpm.h -### rather than /usr/include/X11/xpm.h, so we set CPPFLAGS (and -### LDFLAGS) accordingly. +### The Cygwin-w32 build uses instead of , so +### we need to set LDFLAGS accordingly. HAVE_XPM=no LIBXPM= if test "${HAVE_W32}" = "yes" && test "${opsys}" = "cygwin"; then if test "${with_xpm}" != "no"; then - SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" - CPPFLAGS="$CPPFLAGS -I/usr/include/noX" LDFLAGS="$LDFLAGS -L/usr/lib/noX" - AC_CHECK_HEADER(X11/xpm.h, + AC_CHECK_HEADER(noX/xpm.h, [AC_CHECK_LIB(Xpm, XpmReadFileToImage, HAVE_XPM=yes)]) if test "${HAVE_XPM}" = "yes"; then AC_MSG_CHECKING(for XpmReturnAllocPixels preprocessor define) AC_EGREP_CPP(no_return_alloc_pixels, - [#include "X11/xpm.h" + [#include "noX/xpm.h" #ifndef XpmReturnAllocPixels no_return_alloc_pixels #endif ], HAVE_XPM=no, HAVE_XPM=yes) if test "${HAVE_XPM}" = "yes"; then - REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX" AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) - CPPFLAGS="$SAVE_CPPFLAGS" LDFLAGS="$SAVE_LDFLAGS" fi fi @@ -3840,7 +3843,7 @@ lrand48 random rint \ select getpagesize setlocale newlocale \ getrlimit setrlimit shutdown \ pthread_sigmask strsignal setitimer \ -sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \ +sendto recvfrom getsockname getifaddrs freeifaddrs \ gai_strerror sync \ getpwent endpwent getgrent endgrent \ cfmakeraw cfsetspeed copysign __executable_start log2) @@ -4284,23 +4287,32 @@ else [Returns true if character is any form of separator.]) fi -AH_TEMPLATE(NO_EDITRES, [Define if XEditRes should not be used.]) - -case $opsys in - aix4-2) - dnl Unfortunately without libXmu we cannot support EditRes. - if test "x$ac_cv_search_XmuConvertStandardSelection" = xno; then - AC_DEFINE(NO_EDITRES, 1) - fi - ;; - - hpux*) - dnl Assar Westerlund says this is necessary for - dnl HP-UX 10.20, and that it works for HP-UX 0 as well. - AC_DEFINE(NO_EDITRES, 1) +if test "$USE_X_TOOLKIT" != "none"; then + have_editres=yes + case $opsys in + hpux*) + dnl Assar Westerlund says this is necessary + dnl for HP-UX 10.20, and that it works for HP-UX 0 as well. + have_editres=no ;; -esac - + esac + if test "$have_editres" != no && test ! -z "$LIBXMU"; then + OLDLIBS="$LIBS" + dnl See libXmu.a check above. + if test x$HAVE_X11XTR6 = xyes; then + LIBS="-lXt -lSM -lICE $LIBXMU" + else + OTHERLIBS="-lXt -$LIBXMU" + fi + AC_TRY_LINK( + [#include + #include ], + [_XEditResCheckMessages (0, 0, 0, 0);], + [AC_DEFINE([X_TOOLKIT_EDITRES], 1, + [Define to 1 if we should use XEditRes.])]) + LIBS=$OLDLIBS + fi +fi case $opsys in sol2* | unixware ) @@ -5228,9 +5240,10 @@ emacs_config_features= for opt in XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO IMAGEMAGICK SOUND GPM DBUS \ GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT \ LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS X_TOOLKIT X11 NS MODULES \ - XWIDGETS LIBSYSTEMD; do + XWIDGETS LIBSYSTEMD CANNOT_DUMP; do case $opt in + CANNOT_DUMP) eval val=\${$opt} ;; NOTIFY|ACL) eval val=\${${opt}_SUMMARY} ;; TOOLKIT_SCROLL_BARS|X_TOOLKIT) eval val=\${USE_$opt} ;; *) eval val=\${HAVE_$opt} ;;