OSDN Git Service

Initial revision
[pf3gnuchains/gcc-fork.git] / libiberty / configure.in
1 # This file is a shell script fragment that supplies the information
2 # necessary for a configure script to process the program in
3 # this directory.  For more information, look at ../configure.
4
5 configdirs=
6 srctrigger=getopt1.c
7 srcname="-liberty library"
8
9 # per-host:
10
11 files="alloca-norm.h"
12 links="alloca-conf.h"
13
14 . ${srcdir}/config.table
15 host_makefile_frag=${frag}
16
17 # per-target:
18
19 # post-target:
20
21 # If this is the target libiberty, check at compile time whether we are using
22 # newlib.  If we are, we already know the files we need, since the linker
23 # will fail when run on some of the newlib targets.
24 if [ -n "${with_target_subdir}" ] ; then
25   cat > Makefile.tem <<'!EOF!'
26 CONFIG_H = xconfig.h
27 NEEDED_LIST = xneeded-list
28
29 xconfig.h: Makefile
30         if [ -f ../newlib/Makefile ]; then \
31           echo "#define NEED_sys_nerr 1" >xconfig.h; \
32           echo "#define NEED_sys_errlist 1" >>xconfig.h; \
33           echo "#define NEED_sys_siglist 1" >>xconfig.h; \
34           echo "#define NEED_strsignal 1" >>xconfig.h; \
35           echo "#define NEED_psignal 1" >>xconfig.h; \
36         else \
37           $(MAKE) $(FLAGS_TO_PASS) lconfig.h; \
38           cp lconfig.h xconfig.h; \
39         fi
40
41 xneeded-list: Makefile
42         if [ -f ../newlib/Makefile ]; then \
43           echo insque.o random.o strdup.o alloca.o vasprintf.o >xneeded-list; \
44         else \
45           $(MAKE) $(FLAGS_TO_PASS) lneeded-list; \
46           cp lneeded-list xneeded-list; \
47         fi
48 !EOF!
49 sed -e "/^####/  r Makefile.tem" \
50   -e '/INSTALL_DEST =/s/libdir/tooldir/' ${Makefile} > Makefile.tem3
51 mv Makefile.tem3 ${Makefile}
52 rm -f Makefile.tem
53 fi
54
55 # We need multilib support, but only if configuring for the target.
56 if [ -n "${with_target_subdir}" ] ; then
57   if [ "${srcdir}" = "." ] ; then
58     if [ "${with_target_subdir}" != "." ] ; then
59       . ${with_multisrctop}../../config-ml.in
60     else
61       . ${with_multisrctop}../config-ml.in
62     fi
63   else
64     . ${srcdir}/../config-ml.in
65   fi
66 fi