]>
Commit | Line | Data |
---|---|---|
119a5f4e | 1 | dnl Process this file with autoconf to produce a configure script. |
5d8b7982 | 2 | AC_PREREQ(2.5)dnl |
119a5f4e | 3 | AC_INIT(gdbserve.c) |
27847c6f | 4 | |
119a5f4e C |
5 | AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../..) |
6 | AC_CANONICAL_SYSTEM | |
7 | AC_ARG_PROGRAM | |
27847c6f | 8 | |
119a5f4e | 9 | AC_PROG_INSTALL |
27847c6f SG |
10 | |
11 | # Map target cpu into the config cpu subdirectory name. | |
12 | # The default is $target_cpu. | |
119a5f4e | 13 | changequote(,)dnl |
27847c6f | 14 | case "${target_cpu}" in |
27847c6f SG |
15 | alpha) gdb_target_cpu=alpha ;; |
16 | c[12]) gdb_target_cpu=convex ;; | |
17 | hppa*) gdb_target_cpu=pa ;; | |
26c543ea | 18 | i[3456]86) gdb_target_cpu=i386 ;; |
27847c6f SG |
19 | m68*) gdb_target_cpu=m68k ;; |
20 | np1) gdb_target_cpu=gould ;; | |
21 | pn) gdb_target_cpu=gould ;; | |
22 | pyramid) gdb_target_cpu=pyr ;; | |
23 | sparc*) gdb_target_cpu=sparc ;; | |
24 | *) gdb_target_cpu=$target_cpu ;; | |
27847c6f | 25 | esac |
119a5f4e | 26 | changequote([,])dnl |
27847c6f | 27 | |
3be5f039 C |
28 | target_makefile_frag=${srcdir}/../config/${gdb_target_cpu}/gdbserve.mt |
29 | if [ ! -f ${target_makefile_frag} ]; then | |
119a5f4e | 30 | AC_MSG_ERROR("*** GDBSERVE does not support target ${target}") |
27847c6f SG |
31 | fi |
32 | ||
119a5f4e C |
33 | dnl We have to assign the same value to other variables because autoconf |
34 | dnl doesn't provide a mechanism to substitute a replacement keyword with | |
35 | dnl arbitrary data or pathnames. | |
36 | dnl | |
37 | target_makefile_frag_path=$target_makefile_frag | |
38 | AC_SUBST(target_makefile_frag_path) | |
39 | AC_SUBST_FILE(target_makefile_frag) | |
40 | ||
3be5f039 C |
41 | cpufile=`sed -n ' |
42 | s/CPU_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
43 | ' ${target_makefile_frag} | |
27847c6f | 44 | |
27847c6f SG |
45 | files= |
46 | links= | |
dd55ca70 | 47 | rm -f cpu.h |
b7da2494 | 48 | if [ "${cpufile}" != "" ]; then |
dd55ca70 SG |
49 | files="${files} ${cpufile}.h" |
50 | links="${links} cpu.h" | |
27847c6f | 51 | fi |
119a5f4e C |
52 | |
53 | AC_LINK_FILES($files, $links) | |
54 | AC_OUTPUT(Makefile) | |
55 |