Commit b9256371 by Manfred Hollstein

configure.in: Check for unistd.h as well.

0
	* configure.in: Check for unistd.h as well.
	* configure: Rebuild.
	* config.in: Rebuild.
	* getpagesize.c (GNU_OUR_PAGESIZE): Use sysconf only if _SC_PAGESIZE
	is defined in unistd.h. Reformat conditional block for easier reading.
	* config.table (shared): Default to no if ${enable_shared}
	is unset or empty; this logic is used by the toplevel
	configure scripts, too.

From-SVN: r19924
parent 3fe97d74
...@@ -186,3 +186,6 @@ ...@@ -186,3 +186,6 @@
/* Define if you have the <sys/param.h> header file. */ /* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H #undef HAVE_SYS_PARAM_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
...@@ -1019,7 +1019,7 @@ else ...@@ -1019,7 +1019,7 @@ else
fi fi
echo "$ac_t""$CPP" 1>&6 echo "$ac_t""$CPP" 1>&6
for ac_hdr in sys/file.h sys/param.h stdlib.h string.h for ac_hdr in sys/file.h sys/param.h stdlib.h string.h unistd.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
......
...@@ -35,31 +35,36 @@ BUGS ...@@ -35,31 +35,36 @@ BUGS
#include <sys/param.h> #include <sys/param.h>
#endif #endif
#ifdef HAVE_SYSCONF #undef GNU_OUR_PAGESIZE
#if defined (HAVE_SYSCONF) && defined (HAVE_UNISTD_H)
#include <unistd.h> #include <unistd.h>
#ifdef _SC_PAGESIZE
#define GNU_OUR_PAGESIZE sysconf(_SC_PAGESIZE) #define GNU_OUR_PAGESIZE sysconf(_SC_PAGESIZE)
#else #endif
#ifdef PAGESIZE #endif
#define GNU_OUR_PAGESIZE PAGESIZE
#else /* no PAGESIZE */ #ifndef GNU_OUR_PAGESIZE
#ifdef EXEC_PAGESIZE # ifdef PAGESIZE
#define GNU_OUR_PAGESIZE EXEC_PAGESIZE # define GNU_OUR_PAGESIZE PAGESIZE
#else /* no EXEC_PAGESIZE */ # else /* no PAGESIZE */
#ifdef NBPG # ifdef EXEC_PAGESIZE
#define GNU_OUR_PAGESIZE (NBPG * CLSIZE) # define GNU_OUR_PAGESIZE EXEC_PAGESIZE
#ifndef CLSIZE # else /* no EXEC_PAGESIZE */
#define CLSIZE 1 # ifdef NBPG
#endif /* CLSIZE */ # define GNU_OUR_PAGESIZE (NBPG * CLSIZE)
#else /* no NBPG */ # ifndef CLSIZE
#ifdef NBPC # define CLSIZE 1
#define GNU_OUR_PAGESIZE NBPC # endif /* CLSIZE */
#else /* no NBPC */ # else /* no NBPG */
#define GNU_OUR_PAGESIZE 4096 /* Just punt and use reasonable value */ # ifdef NBPC
#endif /* NBPC */ # define GNU_OUR_PAGESIZE NBPC
#endif /* NBPG */ # else /* no NBPC */
#endif /* EXEC_PAGESIZE */ # define GNU_OUR_PAGESIZE 4096 /* Just punt and use reasonable value */
#endif /* PAGESIZE */ # endif /* NBPC */
#endif /* HAVE_SYSCONF */ # endif /* NBPG */
# endif /* EXEC_PAGESIZE */
# endif /* PAGESIZE */
#endif /* GNU_OUR_PAGESIZE */
int int
getpagesize () getpagesize ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment