Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/configure.in')
-rw-r--r--newlib/libc/configure.in47
1 files changed, 41 insertions, 6 deletions
diff --git a/newlib/libc/configure.in b/newlib/libc/configure.in
index 19d0f2196..eeb5286bd 100644
--- a/newlib/libc/configure.in
+++ b/newlib/libc/configure.in
@@ -9,6 +9,15 @@ AC_CONFIG_AUX_DIR(../..)
NEWLIB_CONFIGURE(..)
+dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try and
+dnl add it into NEWLIB_CONFIGURE, executable tests are made before the first
+dnl line of the macro which fail because appropriate LDFLAGS are not set.
+
+if test "${use_libtool}" = "yes"; then
+AC_LIBTOOL_WIN32_DLL
+AM_PROG_LIBTOOL
+fi
+
AC_CONFIG_SUBDIRS(machine sys)
CRT0=
@@ -23,7 +32,11 @@ dnl build the library.
LIBC_POSIX_LIB=
if test -n "${posix_dir}"; then
- LIBC_POSIX_LIB=${posix_dir}/lib.a
+ if test "${use_libtool}" = "yes"; then
+ LIBC_POSIX_LIB=${posix_dir}/lib${posix_dir}.${aext}
+ else
+ LIBC_POSIX_LIB=${posix_dir}/lib.${aext}
+ fi
fi
AC_SUBST(LIBC_POSIX_LIB)
AM_CONDITIONAL(HAVE_POSIX_DIR, test x${posix_dir} != x)
@@ -31,7 +44,11 @@ AM_CONDITIONAL(HAVE_POSIX_DIR, test x${posix_dir} != x)
LIBC_SIGNAL_LIB=
LIBC_SIGNAL_DEF=
if test -n "${signal_dir}"; then
- LIBC_SIGNAL_LIB=${signal_dir}/lib.a
+ if test "${use_libtool}" = "yes"; then
+ LIBC_SIGNAL_LIB=${signal_dir}/lib${signal_dir}.${aext}
+ else
+ LIBC_SIGNAL_LIB=${signal_dir}/lib.${aext}
+ fi
LIBC_SIGNAL_DEF=${signal_dir}/stmp-def
fi
AC_SUBST(LIBC_SIGNAL_LIB)
@@ -40,14 +57,22 @@ AM_CONDITIONAL(HAVE_SIGNAL_DIR, test x${signal_dir} != x)
LIBC_SYSCALL_LIB=
if test -n "${syscall_dir}"; then
- LIBC_SYSCALL_LIB=${syscall_dir}/lib.a
+ if test "${use_libtool}" = "yes"; then
+ LIBC_SYSCALL_LIB=${syscall_dir}/lib${syscall_dir}.${aext}
+ else
+ LIBC_SYSCALL_LIB=${syscall_dir}/lib.${aext}
+ fi
fi
AC_SUBST(LIBC_SYSCALL_LIB)
AM_CONDITIONAL(HAVE_SYSCALL_DIR, test x${syscall_dir} != x)
LIBC_UNIX_LIB=
if test -n "${unix_dir}"; then
- LIBC_UNIX_LIB=${unix_dir}/lib.a
+ if test "${use_libtool}" = "yes"; then
+ LIBC_UNIX_LIB=${unix_dir}/lib${unix_dir}.${aext}
+ else
+ LIBC_UNIX_LIB=${unix_dir}/lib.${aext}
+ fi
fi
AC_SUBST(LIBC_UNIX_LIB)
AM_CONDITIONAL(HAVE_UNIX_DIR, test x${unix_dir} != x)
@@ -57,14 +82,24 @@ dnl do. However, we do need to know whether they will produce a library.
LIBC_SYS_LIB=
if test -n "${sys_dir}"; then
- LIBC_SYS_LIB=sys/lib.a
+ if test "${use_libtool}" = "yes"; then
+ LIBC_SYS_LIB=sys/${sys_dir}/lib${sys_dir}.${aext}
+ else
+ LIBC_SYS_LIB=sys/lib.${aext}
+ fi
fi
AC_SUBST(LIBC_SYS_LIB)
+AC_SUBST(sys_dir)
LIBC_MACHINE_LIB=
if test -n "${machine_dir}"; then
- LIBC_MACHINE_LIB=machine/lib.a
+ if test "${use_libtool}" = "yes"; then
+ LIBC_MACHINE_LIB=machine/${machine_dir}/lib${machine_dir}.${aext}
+ else
+ LIBC_MACHINE_LIB=machine/lib.${aext}
+ fi
fi
AC_SUBST(LIBC_MACHINE_LIB)
+AC_SUBST(machine_dir)
AC_OUTPUT(Makefile ctype/Makefile errno/Makefile locale/Makefile misc/Makefile reent/Makefile stdio/Makefile stdlib/Makefile string/Makefile time/Makefile posix/Makefile signal/Makefile syscalls/Makefile unix/Makefile)