Просмотр исходного кода

* configure.in: Define SLANG_POSIX_SIGNALS if all 4 required
functions are present. Remove references to extraconf.h.
* extraconf.h: Eliminate.
* Makefile.am: Remove extraconf.h.

Pavel Roskin 21 лет назад
Родитель
Сommit
afbc365860
4 измененных файлов с 15 добавлено и 39 удалено
  1. 5 0
      ChangeLog
  2. 1 1
      Makefile.am
  3. 9 12
      configure.in
  4. 0 26
      extraconf.h

+ 5 - 0
ChangeLog

@@ -1,5 +1,10 @@
 2003-10-29  Pavel Roskin  <proski@gnu.org>
 
+	* configure.in: Define SLANG_POSIX_SIGNALS if all 4 required
+	functions are present.  Remove references to extraconf.h.
+	* extraconf.h: Eliminate.
+	* Makefile.am: Remove extraconf.h.
+
 	* configure.in: Move ext2fs undelete support ...
 	* acinclude.m4 (MC_WITH_VFS): ... here.
 	* extraconf.h: Remove VFS logic, it's enforced in configure now.

+ 1 - 1
Makefile.am

@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = 1.5
 
 SUBDIRS = intl po m4 vfs slang edit src lib doc syntax
 
-EXTRA_DIST =	FAQ INSTALL.FAST MAINTAINERS README.QNX extraconf.h
+EXTRA_DIST = FAQ INSTALL.FAST MAINTAINERS README.QNX
 
 noinst_DATA = mc.spec
 

+ 9 - 12
configure.in

@@ -137,11 +137,6 @@ for h_lang in $ALL_DOC_LINGUAS; do
 done
 AC_SUBST(DOC_LINGUAS)
 
-dnl
-dnl Hack to make extraconf.h visible even if compiling outside srcdir.
-dnl
-CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)"
-
 dnl
 dnl Enforce coding standards
 dnl
@@ -180,11 +175,15 @@ dnl
 dnl Check availability of some functions 
 dnl 
 
-AC_CHECK_FUNCS([strerror statfs strftime getsid \
-		memmove truncate initgroups putenv \
-		memset memcpy tcsetattr tcgetattr cfgetospeed \
-		sigaction sigemptyset sigprocmask sigaddset \
-		sysconf setuid setreuid])
+AC_CHECK_FUNCS([cfgetospeed getsid initgroups memcpy memmove memset \
+		putenv setreuid setuid statfs strerror strftime \
+		sysconf tcgetattr tcsetattr truncate])
+
+dnl S-Lang needs all four functions to be defined to use POSIX signal API
+AC_CHECK_FUNCS([sigaction sigemptyset sigprocmask sigaddset], , [slang_signals=no])
+if test x$slang_signals != xno; then
+    AC_DEFINE(SLANG_POSIX_SIGNALS, 1, [Define to use POSIX signal API in S-Lang])
+fi
 
 dnl
 dnl getpt is a GNU Extension (glibc 2.1.x)
@@ -581,8 +580,6 @@ AM_CONDITIONAL(INCLUDED_SLANG, [test "x$with_screen" = xmcslang])
 AM_CONDITIONAL(CHARSET, [test -n "$have_charset"])
 AM_CONDITIONAL(CONS_SAVER, [test -n "$cons_saver"])
 
-AH_BOTTOM([#include <extraconf.h>])
-
 AC_CONFIG_FILES([
 Makefile 
 mc.spec

+ 0 - 26
extraconf.h

@@ -1,26 +0,0 @@
-/*
-This file is included directly from config.h.
-Don't include it from any other files.
-
-The only code that belongs here is preprocessor directives that:
-
-1) change the configuration setting defined in config.h if there is a
-conflict between them.
-
-2) define symbols that fully depend on those in config.h to eliminate
-the need to embed this logic into configure.in.
-*/
-
-#if defined(HAVE_SIGADDSET) && defined(HAVE_SIGEMPTYSET)
-# if defined(HAVE_SIGACTION) && defined(HAVE_SIGPROCMASK)
-#  define SLANG_POSIX_SIGNALS
-# endif
-#endif
-
-#if defined (__QNX__) && !defined(__QNXNTO__) && !defined (HAVE_INFOMOUNT_LIST)
-#    define HAVE_INFOMOUNT_QNX
-#endif
-
-#if defined(HAVE_INFOMOUNT_LIST) || defined(HAVE_INFOMOUNT_QNX)
-#    define HAVE_INFOMOUNT
-#endif