OSDN Git Service

* libc/Makefile.am (SUBLIBS): Add LIBC_EXTRA_LIB.
[pf3gnuchains/pf3gnuchains4x.git] / newlib / libc / configure.in
1 dnl This is the newlib/libc configure.in file.
2 dnl Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ(2.5)
5 AC_INIT(sys.tex)
6
7 dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake. 
8 AC_CONFIG_AUX_DIR(../..)
9
10 NEWLIB_CONFIGURE(..)
11
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.
15
16 if test "${use_libtool}" = "yes"; then
17 AC_LIBTOOL_WIN32_DLL
18 AM_PROG_LIBTOOL
19 fi
20
21 AC_CONFIG_SUBDIRS(machine sys)
22
23 CRT0=
24 if test -n "${sys_dir}"; then
25   CRT0=crt0.o
26 fi
27 AC_SUBST(CRT0)
28
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.
32
33 LIBC_POSIX_LIB=
34 if test -n "${posix_dir}"; then
35   if test "${use_libtool}" = "yes"; then
36     LIBC_POSIX_LIB=${posix_dir}/lib${posix_dir}.${aext}
37   else
38     LIBC_POSIX_LIB=${posix_dir}/lib.${aext}
39   fi
40 fi
41 AC_SUBST(LIBC_POSIX_LIB)
42 AM_CONDITIONAL(HAVE_POSIX_DIR, test x${posix_dir} != x)
43
44 LIBC_SIGNAL_LIB=
45 LIBC_SIGNAL_DEF=
46 if test -n "${signal_dir}"; then
47   if test "${use_libtool}" = "yes"; then
48     LIBC_SIGNAL_LIB=${signal_dir}/lib${signal_dir}.${aext}
49   else
50     LIBC_SIGNAL_LIB=${signal_dir}/lib.${aext}
51   fi
52   LIBC_SIGNAL_DEF=${signal_dir}/stmp-def
53 fi
54 AC_SUBST(LIBC_SIGNAL_LIB)
55 AC_SUBST(LIBC_SIGNAL_DEF)
56 AM_CONDITIONAL(HAVE_SIGNAL_DIR, test x${signal_dir} != x)
57
58 LIBC_SYSCALL_LIB=
59 if test -n "${syscall_dir}"; then
60   if test "${use_libtool}" = "yes"; then
61     LIBC_SYSCALL_LIB=${syscall_dir}/lib${syscall_dir}.${aext}
62   else
63     LIBC_SYSCALL_LIB=${syscall_dir}/lib.${aext}
64   fi
65 fi
66 AC_SUBST(LIBC_SYSCALL_LIB)
67 AM_CONDITIONAL(HAVE_SYSCALL_DIR, test x${syscall_dir} != x)
68
69 LIBC_UNIX_LIB=
70 if test -n "${unix_dir}"; then
71   if test "${use_libtool}" = "yes"; then
72     LIBC_UNIX_LIB=${unix_dir}/lib${unix_dir}.${aext}
73   else
74     LIBC_UNIX_LIB=${unix_dir}/lib.${aext}
75   fi
76 fi
77 AC_SUBST(LIBC_UNIX_LIB)
78 AM_CONDITIONAL(HAVE_UNIX_DIR, test x${unix_dir} != x)
79
80 LIBC_EXTRA_LIB=
81 LIBC_EXTRA_DEF=
82 extra_dir=
83
84 AC_SUBST(LIBC_EXTRA_LIB)
85 AC_SUBST(LIBC_EXTRA_DEF)
86 AC_SUBST(extra_dir)
87
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.
90
91 LIBC_SYS_LIB=
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}
95   else
96     LIBC_SYS_LIB=sys/lib.${aext}
97   fi
98 fi
99 AC_SUBST(LIBC_SYS_LIB)
100 AC_SUBST(sys_dir)
101
102 LIBC_MACHINE_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}
106   else
107     LIBC_MACHINE_LIB=machine/lib.${aext}
108   fi
109 fi
110 AC_SUBST(LIBC_MACHINE_LIB)
111 AC_SUBST(machine_dir)
112
113 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)