OSDN Git Service

Don't make gperf depend upon libg++.
[pf3gnuchains/gcc-fork.git] / libio / stdio / 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=stdio.h
7 srcname="libio/stdio"
8 package_makefile_frag=../Make.pack
9
10 # per-host:
11
12 # per-target:
13
14 LIBDIR=yes
15 TO_TOPDIR=../../
16 ALL=nothing
17 MOSTLYCLEAN='*.o pic stamp-picdir core stdio.list'
18 (. ${srcdir}/../config.shared) >${package_makefile_frag}
19
20 # post-target:
21
22 # Certain files that are used to build a C library (such as fprintf.o)
23 # are compled from the same sources as the ioXXX versions (such as ioprintf.c).
24 # These lines add the appropriate rules.
25 # NOTE: We assume a C compiler that where -o with -c works.
26 # But these files are not built by default anyway ...
27
28 # TODO: remove rename tmpfile tmpnam
29
30 stdio_renames="fclose fflush fgetpos fgets fopen fprintf fputs fread \
31   fscanf fsetpos ftell fwrite getdelim gets perror printf puts \
32   scanf setbuffer setvbuf sprintf sscanf ungetc vsprintf vsscanf"
33 stdio_objects=""
34
35 for file in $stdio_renames ; do
36   cat >>Makefile <<EOF
37 $file.o: \$(srcdir)/../io$file.c
38         if [ -n "\$(PICFLAG)" ]; then \\
39           \$(CC_FOR_STDIO) \$(CFLAGS) \$(CINCLUDES) \$(PICFLAG) -c \\
40           \$(srcdir)/../io$file.c -D_IO_$file=$file -o pic/$file.o; \\
41         fi
42         \$(CC_FOR_STDIO) \$(CFLAGS) \$(CINCLUDES) -c \\
43           \$(srcdir)/../io$file.c -D_IO_$file=$file -o $file.o
44 EOF
45   stdio_objects="$stdio_objects $file.o"
46 done
47 sed -e "/STDIO_RENAMED_OBJECTS =/s/=.*/=${stdio_objects}/" <Makefile >tmp
48 mv -f tmp Makefile