OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / libiberty / configure
index 142c81c..6e98352 100755 (executable)
@@ -3920,8 +3920,14 @@ ac_c_preproc_warn_flag=yes
 
 ac_libiberty_warn_cflags=
 save_CFLAGS="$CFLAGS"
-for option in -W -Wall -Wwrite-strings -Wc++-compat \
+for real_option in -W -Wall -Wwrite-strings -Wc++-compat \
                          -Wstrict-prototypes; do
+  # Do the check with the no- prefix removed since gcc silently
+  # accepts any -Wno-* option on purpose
+  case $real_option in
+    -Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;;
+    *) option=$real_option ;;
+  esac
   as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
@@ -3953,11 +3959,13 @@ eval ac_res=\$$as_acx_Woption
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
   if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
-  ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }$option"
+  ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }$real_option"
 fi
   done
 CFLAGS="$save_CFLAGS"
 
+# Do the check with the no- prefix removed from the warning options
+# since gcc silently accepts any -Wno-* option on purpose
 if test "$GCC" = yes; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pedantic " >&5
 $as_echo_n "checking whether $CC supports -pedantic ... " >&6; }
@@ -4840,6 +4848,83 @@ if [ -n "${frag}" ]; then
   frag=${libiberty_topdir}/libiberty/config/$frag
 fi
 
+
+
+
+
+case "${host}" in
+    # PIC is the default on some targets or must not be used.
+    *-*-darwin*)
+       # PIC is the default on this platform
+       # Common symbols not allowed in MH_DYLIB files
+       PICFLAG=-fno-common
+       ;;
+    alpha*-dec-osf5*)
+       # PIC is the default.
+       ;;
+    hppa*64*-*-hpux*)
+       # PIC is the default for 64-bit PA HP-UX.
+       ;;
+    i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*)
+       ;;
+    i[34567]86-*-interix[3-9]*)
+       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+       # Instead, we relocate shared libraries at runtime.
+       ;;
+    i[34567]86-*-nto-qnx*)
+       # QNX uses GNU C++, but need to define -shared option too, otherwise
+       # it will coredump.
+       PICFLAG='-fPIC -shared'
+       ;;
+    i[34567]86-pc-msdosdjgpp*)
+       # DJGPP does not support shared libraries at all.
+       ;;
+    ia64*-*-hpux*)
+       # On IA64 HP-UX, PIC is the default but the pic flag
+       # sets the default TLS model and affects inlining.
+       PICFLAG=-fPIC
+       ;;
+    mips-sgi-irix6*)
+       # PIC is the default.
+       ;;
+    rs6000-ibm-aix* | powerpc-ibm-aix*)
+       # All AIX code is PIC.
+       ;;
+
+    # Some targets support both -fPIC and -fpic, but prefer the latter.
+    # FIXME: Why?
+    i[34567]86-*-* | x86_64-*-*)
+       PICFLAG=-fpic
+       ;;
+    m68k-*-*)
+       PICFLAG=-fpic
+       ;;
+    # FIXME: Override -fPIC default in libgcc only?
+    sh-*-linux* | sh[2346lbe]*-*-linux*)
+       PICFLAG=-fpic
+       ;;
+    # FIXME: Simplify to sh*-*-netbsd*?
+    sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
+      sh64-*-netbsd* | sh64l*-*-netbsd*)
+       PICFLAG=-fpic
+       ;;
+    # Default to -fPIC unless specified otherwise.
+    *)
+       PICFLAG=-fPIC
+       ;;
+esac
+
+# If the user explicitly uses -fpic/-fPIC, keep that.
+case "${CFLAGS}" in
+    *-fpic*)
+       PICFLAG=-fpic
+       ;;
+    *-fPIC*)
+       PICFLAG=-fPIC
+       ;;
+esac
+
+
 # If they didn't specify --enable-shared, don't generate shared libs.
 case "${enable_shared}" in
   yes) shared=yes ;;
@@ -4847,27 +4932,8 @@ case "${enable_shared}" in
   "") shared=no ;;
   *) shared=yes ;;
 esac
-if [ "${shared}" = "yes" ]; then
-  case "${host}" in
-    *-*-cygwin*)       ;;
-    alpha*-*-linux*)   PICFLAG=-fPIC ;;
-    arm*-*-*)          PICFLAG=-fPIC ;;
-    hppa*-*-*)         PICFLAG=-fPIC ;;
-    i370-*-*)          PICFLAG=-fPIC ;;
-    ia64-*-*)          PICFLAG=-fpic ;;
-    i[34567]86-*-* | x86_64-*-*)
-                       PICFLAG=-fpic ;;
-    m68k-*-*)          PICFLAG=-fpic ;;
-    mips*-*-linux*)    PICFLAG=-fPIC ;;
-    powerpc*-*-aix*)   ;;
-    powerpc*-*-*)      PICFLAG=-fPIC ;;
-    sparc*-*-*)                case "${CFLAGS}" in
-                         *-fpic* ) PICFLAG=-fpic ;;
-                         * ) PICFLAG=-fPIC ;;
-                       esac ;;
-    s390*-*-*)         PICFLAG=-fpic ;;
-    sh*-*-*)           PICFLAG=-fPIC ;;
-  esac
+if [ "${shared}" != "yes" ]; then
+  PICFLAG=
 fi
 
 
@@ -4895,7 +4961,7 @@ host_makefile_frag=${frag}
 # It's OK to check for header files.  Although the compiler may not be
 # able to link anything, it had better be able to at least compile
 # something.
-for ac_header in sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h stdio_ext.h
+for ac_header in sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h stdio_ext.h process.h sys/prctl.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header"
@@ -5203,6 +5269,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
 
+ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
+if test "x$ac_cv_type_ssize_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define ssize_t int
+_ACEOF
+
+fi
+
 
 # Given the above check, we always have uintptr_t or a fallback
 # definition.  So define HAVE_UINTPTR_T in case any imported code
@@ -5282,9 +5359,10 @@ funcs="$funcs setproctitle"
 
 vars="sys_errlist sys_nerr sys_siglist"
 
-checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
-checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp"
-checkfuncs="$checkfuncs getsysinfo table sysctl wait3 wait4 __fsetlocking"
+checkfuncs="__fsetlocking canonicalize_file_name dup3 getrlimit getrusage \
+ getsysinfo gettimeofday on_exit psignal pstat_getdynamic pstat_getstatic \
+ realpath setrlimit sbrk spawnve spawnvpe strerror strsignal sysconf sysctl \
+ sysmp table times wait3 wait4"
 
 # These are neither executed nor required, but they help keep
 # autoheader happy without adding a bunch of text to acconfig.h.
@@ -5292,15 +5370,16 @@ if test "x" = "y"; then
   for ac_func in asprintf atexit \
     basename bcmp bcopy bsearch bzero \
     calloc canonicalize_file_name clock \
+    dup3 \
     ffs __fsetlocking \
-    getcwd getpagesize getrusage getsysinfo gettimeofday \
+    getcwd getpagesize getrlimit getrusage getsysinfo gettimeofday \
     index insque \
     memchr memcmp memcpy memmem memmove memset mkstemps \
     on_exit \
     psignal pstat_getdynamic pstat_getstatic putenv \
     random realpath rename rindex \
-    sbrk setenv setproctitle sigsetmask snprintf stpcpy stpncpy strcasecmp strchr \
-    strdup \
+    sbrk setenv setproctitle setrlimit sigsetmask snprintf spawnve spawnvpe \
+     stpcpy stpncpy strcasecmp strchr strdup \
      strerror strncasecmp strndup strrchr strsignal strstr strtod strtol \
      strtoul strverscmp sysconf sysctl sysmp \
     table times tmpnam \
@@ -5706,28 +5785,6 @@ fi
 
 
 
-# check for prctl PR_SET_NAME
-if test x$gcc_no_link = xyes; then
-  as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
-fi
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <sys/prctl.h>
-int main()
-{
-  return (prctl(PR_SET_NAME, "foo") == 0) ? 0 : 1;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-$as_echo "#define HAVE_PRCTL_SET_NAME 1" >>confdefs.h
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
 case "${host}" in
   *-*-cygwin* | *-*-mingw*)
     $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
@@ -6764,7 +6821,7 @@ if test "${ac_cv_func_strncmp_works+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   if test "$cross_compiling" = yes; then :
-  ac_cv_func_strncmp_works=no
+  ac_cv_func_strncmp_works=yes
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */