1 dnl This is the newlib/libc configure.in file.
2 dnl Process this file with autoconf to produce a configure script.
7 dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
8 AC_CONFIG_AUX_DIR(../..)
12 dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try and
13 dnl add it into NEWLIB_CONFIGURE, executable tests are made before the first
14 dnl line of the macro which fail because appropriate LDFLAGS are not set.
16 if test "${use_libtool}" = "yes"; then
21 AC_CONFIG_SUBDIRS(machine sys)
24 if test -n "${sys_dir}"; then
29 dnl For each directory which we may or may not want, we define a name
30 dnl for the library and an automake conditional for whether we should
31 dnl build the library.
34 if test -n "${posix_dir}"; then
35 if test "${use_libtool}" = "yes"; then
36 LIBC_POSIX_LIB=${posix_dir}/lib${posix_dir}.${aext}
38 LIBC_POSIX_LIB=${posix_dir}/lib.${aext}
41 AC_SUBST(LIBC_POSIX_LIB)
42 AM_CONDITIONAL(HAVE_POSIX_DIR, test x${posix_dir} != x)
46 if test -n "${signal_dir}"; then
47 if test "${use_libtool}" = "yes"; then
48 LIBC_SIGNAL_LIB=${signal_dir}/lib${signal_dir}.${aext}
50 LIBC_SIGNAL_LIB=${signal_dir}/lib.${aext}
52 LIBC_SIGNAL_DEF=${signal_dir}/stmp-def
54 AC_SUBST(LIBC_SIGNAL_LIB)
55 AC_SUBST(LIBC_SIGNAL_DEF)
56 AM_CONDITIONAL(HAVE_SIGNAL_DIR, test x${signal_dir} != x)
59 if test -n "${syscall_dir}"; then
60 if test "${use_libtool}" = "yes"; then
61 LIBC_SYSCALL_LIB=${syscall_dir}/lib${syscall_dir}.${aext}
63 LIBC_SYSCALL_LIB=${syscall_dir}/lib.${aext}
66 AC_SUBST(LIBC_SYSCALL_LIB)
67 AM_CONDITIONAL(HAVE_SYSCALL_DIR, test x${syscall_dir} != x)
70 if test -n "${unix_dir}"; then
71 if test "${use_libtool}" = "yes"; then
72 LIBC_UNIX_LIB=${unix_dir}/lib${unix_dir}.${aext}
74 LIBC_UNIX_LIB=${unix_dir}/lib.${aext}
77 AC_SUBST(LIBC_UNIX_LIB)
78 AM_CONDITIONAL(HAVE_UNIX_DIR, test x${unix_dir} != x)
84 AC_SUBST(LIBC_EXTRA_LIB)
85 AC_SUBST(LIBC_EXTRA_DEF)
88 dnl We always recur into sys and machine, and let them decide what to
89 dnl do. However, we do need to know whether they will produce a library.
92 if test -n "${sys_dir}"; then
93 if test "${use_libtool}" = "yes"; then
94 LIBC_SYS_LIB=sys/${sys_dir}/lib${sys_dir}.${aext}
96 LIBC_SYS_LIB=sys/lib.${aext}
99 AC_SUBST(LIBC_SYS_LIB)
103 if test -n "${machine_dir}"; then
104 if test "${use_libtool}" = "yes"; then
105 LIBC_MACHINE_LIB=machine/${machine_dir}/lib${machine_dir}.${aext}
107 LIBC_MACHINE_LIB=machine/lib.${aext}
110 AC_SUBST(LIBC_MACHINE_LIB)
111 AC_SUBST(machine_dir)
113 AC_OUTPUT(Makefile argz/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)