Move libgen.h out of IPC conditional code since it is not related directly to IPC; adjust IPC configuration so that IPC support is auto-disabled if the relevant header files or library functions are missing.
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = subdir-objects no-dependencies
|
||||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
|
||||
SUBDIRS = po
|
||||
|
||||
|
||||
+11
-1
@@ -24,6 +24,7 @@ AC_CHECK_FUNCS([fpathconf sysconf posix_memalign posix_fadvise])
|
||||
AC_CHECK_HEADERS([limits.h])
|
||||
AC_CHECK_HEADERS([wctype.h])
|
||||
AC_CHECK_HEADERS([termios.h])
|
||||
AC_CHECK_HEADERS([libgen.h])
|
||||
AC_CHECK_HEADERS([sys/ioctl.h])
|
||||
AC_CHECK_HEADERS([libintl.h locale.h])
|
||||
AH_BOTTOM([#include "config-aux.h"])
|
||||
@@ -78,7 +79,16 @@ yes
|
||||
], [LIBS="$LIBS -lc128"])
|
||||
|
||||
if test "$IPC_SUPPORT" = "yes"; then
|
||||
AC_CHECK_HEADERS([sys/ipc.h sys/param.h libgen.h])
|
||||
AC_CHECK_HEADERS([sys/ipc.h], [], [IPC_SUPPORT=no])
|
||||
AC_CHECK_HEADERS([sys/msg.h], [], [IPC_SUPPORT=no])
|
||||
AC_CHECK_HEADERS([sys/param.h])
|
||||
if test "$IPC_SUPPORT" = "yes"; then
|
||||
AC_CHECK_FUNCS([msgget], [], [IPC_SUPPORT=no])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$IPC_SUPPORT" = "yes"; then
|
||||
AC_DEFINE([HAVE_IPC], [1], [IPC support enabled])
|
||||
fi
|
||||
|
||||
if test "$SPLICE_SUPPORT" = "yes"; then
|
||||
|
||||
@@ -22,11 +22,6 @@
|
||||
# define N_(String) (String)
|
||||
#endif
|
||||
|
||||
#undef HAVE_IPC
|
||||
#ifdef HAVE_SYS_IPC_H
|
||||
#define HAVE_IPC 1
|
||||
#endif
|
||||
|
||||
#undef CURSOR_ANSWERBACK_BYTE_BY_BYTE
|
||||
#ifndef _AIX
|
||||
#define CURSOR_ANSWERBACK_BYTE_BY_BYTE 1
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* IPC support enabled */
|
||||
#undef HAVE_IPC
|
||||
|
||||
/* Define to 1 if you have the <libgen.h> header file. */
|
||||
#undef HAVE_LIBGEN_H
|
||||
|
||||
@@ -61,6 +64,9 @@
|
||||
/* Define to 1 if you have the <minix/config.h> header file. */
|
||||
#undef HAVE_MINIX_CONFIG_H
|
||||
|
||||
/* Define to 1 if you have the `msgget' function. */
|
||||
#undef HAVE_MSGGET
|
||||
|
||||
/* Define to 1 if you have the `posix_fadvise' function. */
|
||||
#undef HAVE_POSIX_FADVISE
|
||||
|
||||
@@ -100,6 +106,9 @@
|
||||
/* Define to 1 if you have the <sys/ipc.h> header file. */
|
||||
#undef HAVE_SYS_IPC_H
|
||||
|
||||
/* Define to 1 if you have the <sys/msg.h> header file. */
|
||||
#undef HAVE_SYS_MSG_H
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
||||
|
||||
+3
-1
@@ -35,10 +35,12 @@
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#endif /* HAVE_IPC */
|
||||
|
||||
/* for basename() */
|
||||
#ifdef HAVE_LIBGEN_H
|
||||
#include <libgen.h>
|
||||
#endif
|
||||
#endif /* HAVE_IPC */
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user