]> code.delx.au - gnu-emacs/blobdiff - configure.in
Coding system fix for tar-untar-buffer (Bug#8870).
[gnu-emacs] / configure.in
index 60b4d55be512ad334ae5aad6adfb7e21e815005a..0e9f031c1645d164ca264ff410c469b9f19fb06a 100644 (file)
@@ -988,21 +988,6 @@ dnl Do this early because it can frob feature test macros for Unix-98 &c.
 AC_SYS_LARGEFILE
 
 
-## If we're using gcc, and the user hasn't specified a crt-dir, try to
-## determine it automatically by asking gcc.  [If this doesn't work,
-## CRT_DIR will remain empty and system-dependent code will be used
-## below.]
-##
-if test "x${GCC}z$CRT_DIR" = xyesz; then
-   crt_file=`$CC 2>/dev/null --print-file-name=crt1.o`
-   case "$crt_file" in
-     */*)
-       CRT_DIR=`AS_DIRNAME(["$crt_file"])`
-       ;;
-   esac
-fi
-
-
 ## If user specified a crt-dir, use that unconditionally.
 if test "X$CRT_DIR" = "X"; then
 
@@ -1028,6 +1013,18 @@ if test "X$CRT_DIR" = "X"; then
   ## Default is /usr/lib.
   test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib
 
+  ## If we're using gcc, try to determine it automatically by asking
+  ## gcc.  [If this doesn't work, CRT_DIR will remain at the
+  ## system-dependent default from above.]
+  if test "x${GCC}" = xyes; then
+     crt_file=`$CC --print-file-name=crt1.o 2>/dev/null`
+     case "$crt_file" in
+       */*)
+         CRT_DIR=`AS_DIRNAME(["$crt_file"])`
+         ;;
+     esac
+  fi
+
 else
 
   ## Some platforms don't use any of these files, so it is not
@@ -2568,15 +2565,6 @@ if test $emacs_cv_netdb_declares_h_errno = yes; then
   AC_DEFINE(HAVE_H_ERRNO, 1, [Define to 1 if netdb.h declares h_errno.])
 fi
 
-AC_FUNC_ALLOCA
-
-dnl src/alloca.c has been removed.  Could also check if $ALLOCA is set?
-dnl FIXME is there an autoconf test that does the right thing, without
-dnl needing to call A_M_E afterwards?
-if test x"$ac_cv_func_alloca_works" != xyes; then
-   AC_MSG_ERROR( [a system implementation of alloca is required] )
-fi
-
 # fmod, logb, and frexp are found in -lm on most systems.
 # On HPUX 9.01, -lm does not contain logb, so check for sqrt.
 AC_CHECK_LIB(m, sqrt)
@@ -2657,7 +2645,7 @@ esac
 AC_SUBST(BLESSMAIL_TARGET)
 
 
-AC_CHECK_FUNCS(gethostname getdomainname dup2 \
+AC_CHECK_FUNCS(gethostname getdomainname \
 rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
 random lrand48 logb frexp fmod rint cbrt ftime setsid \
 strerror fpathconf select euidaccess getpagesize tzset setlocale \
@@ -3462,6 +3450,12 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 ])dnl
 
 AH_BOTTOM([
+/* On AIX 3 this must be included before any other include file.  */
+#include <alloca.h>
+#if ! HAVE_ALLOCA
+# error "alloca not available on this machine"
+#endif
+
 /* Define AMPERSAND_FULL_NAME if you use the convention
    that & in the full name stands for the login id.  */
 /* Turned on June 1996 supposing nobody will mind it.  */
@@ -3538,20 +3532,6 @@ AH_BOTTOM([
 #include <string.h>
 #include <stdlib.h>
 
-#ifdef HAVE_ALLOCA_H
-# include <alloca.h>
-#elif defined __GNUC__
-# define alloca __builtin_alloca
-#elif defined _AIX
-# define alloca __alloca
-#else
-# include <stddef.h>
-# ifdef  __cplusplus
-extern "C"
-# endif
-void *alloca (size_t);
-#endif
-
 #ifndef HAVE_STRCHR
 #define strchr(a, b) index (a, b)
 #endif