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