aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/configure.ac
diff options
context:
space:
mode:
authorsje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>2013-06-24 15:24:19 +0000
committersje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>2013-06-24 15:24:19 +0000
commite4812daac49ef178604424347851231c04e28ab7 (patch)
treece8a2880dadfd053f24a7ad1570e1d7d20d95f40 /libgfortran/configure.ac
parent524f76d3c571a569e164c5c6da545295591180cf (diff)
2013-06-24 Steve Ellcey <sellcey@mips.com>
* configure.ac (AC_CHECK_FUNCS_ONCE): Put into if statement. * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200374 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/configure.ac')
-rw-r--r--libgfortran/configure.ac28
1 files changed, 21 insertions, 7 deletions
diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
index 1cf06978eb9..1021eea2671 100644
--- a/libgfortran/configure.ac
+++ b/libgfortran/configure.ac
@@ -261,13 +261,27 @@ GCC_HEADER_STDINT(gstdint.h)
AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_blocks, struct stat.st_rdev])
# Check for library functions.
-AC_CHECK_FUNCS_ONCE(getrusage times mkstemp strtof strtold snprintf \
-ftruncate chsize chdir getlogin gethostname kill link symlink sleep ttyname \
-alarm access fork execl wait setmode execve pipe dup2 close \
-strcasestr getrlimit gettimeofday stat fstat lstat getpwuid vsnprintf dup \
-getcwd localtime_r gmtime_r getpwuid_r ttyname_r clock_gettime \
-readlink getgid getpid getppid getuid geteuid umask getegid \
-secure_getenv __secure_getenv)
+if test "x${with_newlib}" = "xyes"; then
+ # We are being configured with a cross compiler. AC_REPLACE_FUNCS
+ # may not work correctly, because the compiler may not be able to
+ # link executables.
+ AC_DEFINE(HAVE_MKSTEMP, 1, [Define if you have mkstemp.])
+ AC_DEFINE(HAVE_STRTOF, 1, [Define if you have strtof.])
+ AC_DEFINE(HAVE_STRTOLD, 1, [Define if you have strtold.])
+ AC_DEFINE(HAVE_SNPRINTF, 1, [Define if you have snprintf.])
+ AC_DEFINE(HAVE_STRCASESTR, 1, [Define if you have strcasestr.])
+ AC_DEFINE(HAVE_VSNPRINTF, 1, [Define if you have vsnprintf.])
+ AC_DEFINE(HAVE_LOCALTIME_R, 1, [Define if you have localtime_r.])
+ AC_DEFINE(HAVE_GMTIME_R, 1, [Define if you have gmtime_r.])
+else
+ AC_CHECK_FUNCS_ONCE(getrusage times mkstemp strtof strtold snprintf \
+ ftruncate chsize chdir getlogin gethostname kill link symlink sleep ttyname \
+ alarm access fork execl wait setmode execve pipe dup2 close \
+ strcasestr getrlimit gettimeofday stat fstat lstat getpwuid vsnprintf dup \
+ getcwd localtime_r gmtime_r getpwuid_r ttyname_r clock_gettime \
+ readlink getgid getpid getppid getuid geteuid umask getegid \
+ secure_getenv __secure_getenv)
+fi
# Check strerror_r, cannot be above as versions with two and three arguments exist
LIBGFOR_CHECK_STRERROR_R