OSDN Git Service

* mf-runtime.c (__mf_state_1): Initialize to reentrant.
[pf3gnuchains/gcc-fork.git] / libmudflap / configure.ac
index 3e33db6..58a7c73 100644 (file)
@@ -8,10 +8,6 @@ AC_CANONICAL_SYSTEM
 
 AM_INIT_AUTOMAKE
 
-# For libtool versioning info, format is CURRENT:REVISION:AGE
-libtool_VERSION=1:0:0
-AC_SUBST(libtool_VERSION)
-
 AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
 AC_ARG_ENABLE(version-specific-runtime-libs,
 [  --enable-version-specific-runtime-libs    Specify that runtime libraries should be installed in a compiler-specific directory ],
@@ -28,7 +24,7 @@ AC_EXEEXT
 
 AM_ENABLE_MULTILIB(, ..)
 
-target_alias=${target_alias-$target}
+target_alias=${target_alias-$host_alias}
 AC_SUBST(target_alias)
 
 AC_CONFIG_HEADERS(config.h)
@@ -63,18 +59,21 @@ AC_TRY_COMPILE([
 [AC_MSG_RESULT(no)
 enable_shared=no])
 
-AC_CHECK_HEADERS(stdint.h execinfo.h signal.h dlfcn.h \
-  netdb.h sys/ipc.h sys/sem.h sys/shm.h sys/wait.h sys/socket.h ctype.h)
-AC_CHECK_FUNCS(backtrace backtrace_symbols gettimeofday signal)
-
-dnl Check for 64-bit stdio calls related to Large File Support
-AC_CHECK_FUNCS(fopen64 fseeko64 ftello64 stat64)
+AC_CHECK_HEADERS(stdint.h execinfo.h signal.h dlfcn.h dirent.h pwd.h grp.h \
+  netdb.h sys/ipc.h sys/sem.h sys/shm.h sys/wait.h ctype.h mntent.h \
+  sys/socket.h netinet/in.h arpa/inet.h dlfcn.h sys/mman.h)
 
-dnl Check for nonstandard functions
+AC_CHECK_FUNCS(backtrace backtrace_symbols gettimeofday signal)
+AC_CHECK_FUNCS(fopen64 fseeko64 ftello64 stat64 freopen64)
+AC_CHECK_FUNCS(setbuf setbuffer setlinebuf setvbuf)
 AC_CHECK_FUNCS(strnlen memrchr strncpy memmem sethostname)
-
-dnl Check for glibc ctype functions
 AC_CHECK_FUNCS(__ctype_b_loc __ctype_tolower_loc __ctype_toupper_loc)
+AC_CHECK_FUNCS(getlogin cuserid getpwnam getpwuid getpwent getgrnam getgrgid getgrent)
+AC_CHECK_FUNCS(getlogin_r getpwnam_r getpwuid_r getgrnam_r getgrgid_r)
+AC_CHECK_FUNCS(getservent getservbyname getservbyport getaddrinfo gai_strerror)
+AC_CHECK_FUNCS(getprotoent getprotobyname getprotobynumber)
+AC_CHECK_FUNCS(getmntent setmntent addmntent)
+AC_CHECK_FUNCS(inet_ntoa mmap munmap)
 
 AC_TRY_COMPILE([#include <sys/types.h>
 #include <sys/ipc.h>
@@ -133,12 +132,6 @@ AC_SUBST(build_libmudflapth)
 
 AC_CHECK_LIB(dl, dlsym)
 
-# Process the option "--enable-version-specific-runtime-libs"
-gcc_version_trigger=${srcdir}/../gcc/version.c
-gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
-gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
-AC_SUBST(gcc_version)
-
 # Calculate toolexeclibdir
 # Also toolexecdir, though it's only used in toolexeclibdir
 case ${version_specific_libs} in
@@ -147,7 +140,7 @@ case ${version_specific_libs} in
     # and header files if --enable-version-specific-runtime-libs option
     # is selected.
     toolexecdir='$(libdir)/gcc/$(target_alias)'
-    toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)'
+    toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
     ;;
   no)
     if test -n "$with_cross_host" &&
@@ -236,5 +229,8 @@ else
   multilib_arg=
 fi
 
-AC_CONFIG_FILES([Makefile testsuite/Makefile testsuite/mfconfig.exp mf-runtime.h])
+# See if we support thread-local storage.
+LIBMUDFLAP_CHECK_TLS
+
+AC_CONFIG_FILES([Makefile testsuite/Makefile testsuite/mfconfig.exp])
 AC_OUTPUT