]> code.delx.au - gnu-emacs/blobdiff - configure.ac
* etc/NEWS: Move entry on pcase to correct section
[gnu-emacs] / configure.ac
index ec1f35391f59ac8ccefde16fe6621ab200091a34..14a142805d9f7733b14aacd866c6927e6b2537a1 100644 (file)
@@ -2192,9 +2192,6 @@ LIBS="$LIBS_SYSTEM $LIBS"
 dnl FIXME replace main with a function we actually want from this library.
 AC_CHECK_LIB(Xbsd, main, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd")
 
-dnl Check for C11 threads.
-AC_CHECK_HEADERS_ONCE(threads.h)
-
 dnl Check for the POSIX thread library.
 LIB_PTHREAD=
 AC_CHECK_HEADERS_ONCE(pthread.h)
@@ -2202,7 +2199,6 @@ if test "$ac_cv_header_pthread_h" && test "$opsys" != "mingw32"; then
   AC_CACHE_CHECK([for pthread library],
     [emacs_cv_pthread_lib],
     [emacs_cv_pthread_lib=no
-     OLD_CPPFLAGS=$CPPFLAGS
      OLD_LIBS=$LIBS
      for emacs_pthread_lib in 'none needed' -lpthread; do
        case $emacs_pthread_lib in
@@ -2231,8 +2227,7 @@ if test "$ac_cv_header_pthread_h" && test "$opsys" != "mingw32"; then
        if test "$emacs_cv_pthread_lib" != no; then
         break
        fi
-     done
-     CPPFLAGS=$OLD_CPPFLAGS])
+     done])
   if test "$emacs_cv_pthread_lib" != no; then
     AC_DEFINE([HAVE_PTHREAD], 1, [Define to 1 if you have POSIX threads.])
     case $emacs_cv_pthread_lib in
@@ -3300,8 +3295,6 @@ if test "${with_modules}" != "no"; then
     MODULES_SUFFIX=".so"
     HAVE_MODULES=yes
   elif test "$opsys" = "cygwin"; then
-    # XXX: not tested
-    LIBMODULES="-lcygwin"
     MODULES_SUFFIX=".dll"
     HAVE_MODULES=yes
   elif test "$opsys" = "darwin"; then
@@ -3318,13 +3311,19 @@ if test "${with_modules}" != "no"; then
 
   if test "${HAVE_MODULES}" = no; then
     AC_MSG_ERROR([Dynamic modules are not supported on your system])
+  else
+    SAVE_LIBS=$LIBS
+    LIBS="$LIBS $LIBMODULES"
+    AC_CHECK_FUNCS([dlfunc])
+    LIBS=$SAVE_LIBS
   fi
 fi
 
 if test "${HAVE_MODULES}" = yes; then
-   MODULES_OBJ="dynlib.o module.o"
+   MODULES_OBJ="dynlib.o emacs-module.o"
    AC_DEFINE(HAVE_MODULES, 1, [Define to 1 if dynamic modules are enabled])
-   AC_DEFINE_UNQUOTED(MODULES_SUFFIX, "$MODULES_SUFFIX", [System extension for dynamic libraries])
+   AC_DEFINE_UNQUOTED(MODULES_SUFFIX, "$MODULES_SUFFIX",
+     [System extension for dynamic libraries])
 fi
 AC_SUBST(MODULES_OBJ)
 AC_SUBST(LIBMODULES)
@@ -5269,7 +5268,7 @@ AS_ECHO(["  Does Emacs use -lXaw3d?                                 ${HAVE_XAW3D
   Does Emacs use -lotf?                                   ${HAVE_LIBOTF}
   Does Emacs use -lxft?                                   ${HAVE_XFT}
   Does Emacs directly use zlib?                           ${HAVE_ZLIB}
-  Does Emacs has dynamic modules support?                 ${HAVE_MODULES}
+  Does Emacs have dynamic modules support?                ${HAVE_MODULES}
   Does Emacs use toolkit scroll bars?                     ${USE_TOOLKIT_SCROLL_BARS}
 "])