1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21: sinclude(config/acx.m4)
22:
23: AC_INIT(move-if-change)
24: AC_PREREQ(2.59)
25:
26:
27: ACX_NONCANONICAL_BUILD
28: ACX_NONCANONICAL_HOST
29: ACX_NONCANONICAL_TARGET
30:
31: dnl Autoconf 2.5x and later will set a default program prefix if
32: dnl --target was used, even if it was the same as --host. Disable
33: dnl that behavior. This must be done before AC_CANONICAL_SYSTEM
34: dnl to take effect.
35: test "$host_noncanonical" = "$target_noncanonical" &&
36: test "$program_prefix$program_suffix$program_transform_name" = \
37: NONENONEs,x,x, &&
38: program_transform_name=s,y,y,
39:
40: AC_CANONICAL_SYSTEM
41: AC_ARG_PROGRAM
42:
43: m4_pattern_allow([^AS_FOR_TARGET$])dnl
44:
45:
46: AC_PROG_INSTALL
47: ACX_PROG_LN
48: AC_PROG_LN_S
49:
50:
51:
52:
53:
54:
55: case "${OSTYPE}" in
56: *win32*)
57: if test x${CONFIG_SHELL} = x ; then
58: if test ! -f /bin/sh ; then
59: if test x${SHELL} != x && test -f ${SHELL} ; then
60: CONFIG_SHELL=${SHELL}
61: export CONFIG_SHELL
62: else
63: for prog in sh sh.exe bash bash.exe; do
64: IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
65: for dir in $PATH; do
66: test -z "$dir" && dir=.
67: if test -f $dir/$prog; then
68: CONFIG_SHELL=$dir/$prog
69: export CONFIG_SHELL
70: break
71: fi
72: done
73: IFS="$save_ifs"
74: test -n "${CONFIG_SHELL}" && break
75: done
76: fi
77: fi
78: fi
79: ;;
80: esac
81:
82: config_shell=${CONFIG_SHELL-/bin/sh}
83:
84: progname=$0
85:
86: if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
87:
88:
89:
90: TOPLEVEL_CONFIGURE_ARGUMENTS=
91: set -- "$progname" "$@"
92: for ac_arg
93: do
94: case "$ac_arg" in
95: *" "*|*" "*|*[[\[\]\~\
96: ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
97:
98: ac_arg=`echo "'$ac_arg'" | sed "s/^'\([[-a-zA-Z0-9]]*=\)/\\1'/"` ;;
99: *) ;;
100: esac
101:
102: TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS $ac_arg"
103: done
104:
105:
106: TOPLEVEL_CONFIGURE_ARGUMENTS=`echo "x$TOPLEVEL_CONFIGURE_ARGUMENTS" | sed -e 's/^x *//' -e 's,\\$,$$,g'`
107: AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS)
108:
109: moveifchange=${srcdir}/move-if-change
110:
111: srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
112:
113:
114:
115: if test "$INSTALL" = "${srcdir}/install-sh -c"; then
116: INSTALL="${srcpwd}/install-sh -c"
117: fi
118:
119:
120:
121: pwd=`${PWDCMD-pwd}`
122: if test "${pwd}" = "${srcpwd}" ; then
123: srcdir=.
124: fi
125:
126: topsrcdir=$srcpwd
127:
128: extra_host_args=
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147: build_libs="build-libiberty"
148:
149:
150: build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes"
151:
152:
153:
154: host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr"
155:
156:
157:
158:
159:
160:
161: host_tools="byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
162:
163:
164: libgcj="target-libffi \
165: target-zlib \
166: target-qthreads \
167: target-libjava"
168:
169:
170:
171:
172: target_libraries="target-libgcc \
173: target-libiberty \
174: target-libgloss \
175: target-newlib \
176: target-libstdc++-v3 \
177: target-libmudflap \
178: target-libssp \
179: target-libgfortran \
180: target-boehm-gc \
181: ${libgcj} \
182: target-libobjc \
183: target-libada \
184: target-libgomp"
185:
186:
187:
188:
189:
190:
191:
192:
193: target_tools="target-examples target-groff target-gperf target-rda"
194:
195:
196:
197:
198:
199:
200:
201:
202: configdirs=`echo ${host_libs} ${host_tools}`
203: target_configdirs=`echo ${target_libraries} ${target_tools}`
204: build_configdirs=`echo ${build_libs} ${build_tools}`
205:
206:
207:
208: srcname="gnu development package"
209:
210:
211: appdirs=""
212:
213:
214: is_cross_compiler=
215: if test x"${host}" = x"${target}" ; then
216: is_cross_compiler=no
217: else
218: is_cross_compiler=yes
219: fi
220:
221:
222: GCC_TOPLEV_SUBDIRS
223:
224:
225: skipdirs=
226:
227: noconfigdirs=""
228:
229: use_gnu_ld=
230:
231: if test x$with_gnu_ld = xno ; then
232: use_gnu_ld=no
233: noconfigdirs="$noconfigdirs ld"
234: fi
235:
236: use_gnu_as=
237:
238: if test x$with_gnu_as = xno ; then
239: use_gnu_as=no
240: noconfigdirs="$noconfigdirs gas"
241: fi
242:
243:
244:
245:
246: case ${with_x} in
247: yes | "") ;;
248: no)
249: skipdirs="${skipdirs} tk itcl libgui"
250:
251: enable_gdbtk=no
252: ;;
253: *) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
254: esac
255:
256:
257:
258: native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
259:
260:
261:
262: cross_only="target-libgloss target-newlib target-opcodes"
263:
264: case $is_cross_compiler in
265: no) skipdirs="${skipdirs} ${cross_only}" ;;
266: yes) skipdirs="${skipdirs} ${native_only}" ;;
267: esac
268:
269:
270:
271: if test x"${with_headers}" != x && test x"${with_headers}" != xno \
272: && test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
273: if test x"${with_newlib}" = x ; then
274: with_newlib=no
275: fi
276: fi
277:
278:
279: case ${with_newlib} in
280: no) skipdirs="${skipdirs} target-newlib" ;;
281: yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
282: esac
283:
284:
285:
286: case "${host}" in
287: *-cygwin*)
288: configdirs="$configdirs libtermcap" ;;
289: esac
290:
291:
292:
293: unsupported_languages=
294:
295:
296:
297:
298:
299: case "${host}" in
300: hppa*64*-*-*)
301: noconfigdirs="$noconfigdirs byacc"
302: ;;
303: i[[3456789]]86-*-vsta)
304: noconfigdirs="$noconfigdirs tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl gnuserv gettext"
305: ;;
306: i[[3456789]]86-*-go32* | i[[3456789]]86-*-msdosdjgpp*)
307: noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile itcl gnuserv libffi"
308: ;;
309: x86_64-*-mingw*)
310: noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool newlib"
311: ;;
312: i[[3456789]]86-*-mingw32*)
313:
314: noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool newlib"
315: ;;
316: i[[3456789]]86-*-beos*)
317: noconfigdirs="$noconfigdirs tk itcl libgui gdb"
318: ;;
319: *-*-cygwin*)
320: noconfigdirs="$noconfigdirs autoconf automake send-pr rcs guile perl"
321: ;;
322: *-*-netbsd*)
323: noconfigdirs="$noconfigdirs rcs"
324: ;;
325: ppc*-*-pe)
326: noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
327: ;;
328: powerpc-*-beos*)
329: noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu readline"
330: ;;
331: esac
332:
333:
334: AC_ARG_ENABLE(libada,
335: [ --enable-libada build libada directory],
336: ENABLE_LIBADA=$enableval,
337: ENABLE_LIBADA=yes)
338: if test "${ENABLE_LIBADA}" != "yes" ; then
339: noconfigdirs="$noconfigdirs gnattools"
340: fi
341:
342: AC_ARG_ENABLE(libssp,
343: [ --enable-libssp build libssp directory],
344: ENABLE_LIBSSP=$enableval,
345: ENABLE_LIBSSP=yes)
346:
347:
348:
349: libgcj_saved=$libgcj
350: case $enable_libgcj in
351: yes)
352:
353:
354:
355: libgcj=
356: ;;
357: no)
358:
359: noconfigdirs="$noconfigdirs ${libgcj}"
360: ;;
361: esac
362:
363:
364:
365: if test x$enable_libmudflap = x ; then
366: case "${target}" in
367: *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | bfin*-*-uclinux*)
368:
369: ;;
370: *-*-freebsd*)
371:
372: ;;
373: *)
374:
375: noconfigdirs="$noconfigdirs target-libmudflap"
376: ;;
377: esac
378: fi
379:
380:
381: if test x$enable_libgomp = x ; then
382:
383: case "${target}" in
384: *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
385: ;;
386: *-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
387: ;;
388: *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11*)
389: ;;
390: *-*-darwin* | *-*-aix*)
391: ;;
392: *)
393: noconfigdirs="$noconfigdirs target-libgomp"
394: ;;
395: esac
396: fi
397:
398:
399: case "${target}" in
400: *-*-chorusos)
401: noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
402: ;;
403: powerpc-*-darwin* | i[[3456789]]86-*-darwin*)
404: noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
405: noconfigdirs="$noconfigdirs sim target-rda"
406: ;;
407: *-*-darwin*)
408: noconfigdirs="$noconfigdirs ld gas gdb gprof"
409: noconfigdirs="$noconfigdirs sim target-rda"
410: noconfigdirs="$noconfigdirs ${libgcj}"
411: ;;
412: *-*-freebsd[[12]] | *-*-freebsd[[12]].* | *-*-freebsd*aout*)
413: noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
414: ;;
415: *-*-freebsd*)
416: noconfigdirs="$noconfigdirs target-newlib target-libgloss"
417: if test "x$with_gmp" = x && test "x$with_gmp_dir" = x \
418: && test -f /usr/local/include/gmp.h; then
419: with_gmp=/usr/local
420: fi
421:
422:
423: case "${target}" in
424: i*86-*-*) ;;
425: alpha*-*-*) ;;
426: *)
427: noconfigdirs="$noconfigdirs ${libgcj}"
428: ;;
429: esac
430: ;;
431: *-*-kaos*)
432:
433: skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-librx"
434: skipdirs="$skipdirs target-libobjc target-examples target-groff target-gperf"
435: skipdirs="$skipdirs zlib fastjar target-libjava target-boehm-gc target-zlib"
436: noconfigdirs="$noconfigdirs target-libgloss"
437: ;;
438: *-*-netbsd*)
439:
440: noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
441:
442:
443: case "${target}" in
444: i*86-*-netbsdelf*) ;;
445: arm*-*-netbsdelf*) ;;
446: *)
447: noconfigdirs="$noconfigdirs ${libgcj}"
448: ;;
449: esac
450: ;;
451: *-*-netware*)
452: noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
453: ;;
454: *-*-rtems*)
455: noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
456: ;;
457:
458: *-*-tpf*)
459: noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty ${libgcj} target-libmudflap gdb tcl tk libgui itcl"
460: ;;
461: *-*-uclinux*)
462: noconfigdirs="$noconfigdirs target-newlib target-libgloss target-rda ${libgcj}"
463: ;;
464: *-*-vxworks*)
465: noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty target-libstdc++-v3 ${libgcj}"
466: ;;
467: alpha*-dec-osf*)
468:
469:
470:
471: noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss"
472: ;;
473: alpha*-*-*vms*)
474: noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}"
475: ;;
476: alpha*-*-linux*)
477:
478: noconfigdirs="$noconfigdirs target-newlib target-libgloss"
479: ;;
480: alpha*-*-*)
481:
482: noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
483: ;;
484: am33_2.0-*-linux*)
485: noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
486: ;;
487: sh-*-linux*)
488: noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
489: ;;
490: sh*-*-pe|mips*-*-pe|*arm-wince-pe)
491: noconfigdirs="$noconfigdirs ${libgcj}"
492: noconfigdirs="$noconfigdirs target-examples"
493: noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
494: noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
495: noconfigdirs="$noconfigdirs expect dejagnu"
496:
497: noconfigdirs="$noconfigdirs target-libstdc++-v3"
498: noconfigdirs="$noconfigdirs target-newlib"
499: case "${host}" in
500: *-*-cygwin*) ;;
501: *) noconfigdirs="$noconfigdirs gdb readline"
502: ;;
503: esac
504: ;;
505: arc-*-*)
506: noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
507: ;;
508: arm-semi-aof )
509: ;;
510: arm-*-coff | strongarm-*-coff | xscale-*-coff)
511: noconfigdirs="$noconfigdirs ${libgcj}"
512: ;;
513: arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
514: noconfigdirs="$noconfigdirs target-libffi target-qthreads"
515: ;;
516: arm*-*-linux-gnueabi)
517: noconfigdirs="$noconfigdirs target-libffi target-qthreads"
518: noconfigdirs="$noconfigdirs target-libjava target-libobjc"
519: case ${with_newlib} in
520: no) noconfigdirs="$noconfigdirs target-newlib target-libgloss"
521: esac
522: ;;
523: arm*-*-symbianelf*)
524: noconfigdirs="$noconfigdirs ${libgcj} target-libiberty"
525: ;;
526: arm-*-pe*)
527: noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
528: ;;
529: thumb-*-coff)
530: noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
531: ;;
532: thumb-*-elf)
533: noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
534: ;;
535: thumb-*-pe)
536: noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
537: ;;
538: arm-*-riscix*)
539: noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
540: ;;
541: avr-*-*)
542: noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
543: ;;
544: bfin-*-*)
545: noconfigdirs="$noconfigdirs gdb"
546: if test x${is_cross_compiler} != xno ; then
547: target_configdirs="${target_configdirs} target-bsp target-cygmon"
548: fi
549: ;;
550: c4x-*-* | tic4x-*-*)
551: noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
552: ;;
553: c54x*-*-* | tic54x-*-*)
554: noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib"
555: ;;
556: cris-*-* | crisv32-*-*)
557: unsupported_languages="$unsupported_languages java"
558: case "${target}" in
559: *-*-aout)
560: unsupported_languages="$unsupported_languages fortran"
561: noconfigdirs="$noconfigdirs target-libffi target-boehm-gc";;
562: *-*-elf)
563: unsupported_languages="$unsupported_languages fortran"
564: noconfigdirs="$noconfigdirs target-boehm-gc";;
565: *-*-linux*)
566: noconfigdirs="$noconfigdirs target-newlib target-libgloss";;
567: *)
568: unsupported_languages="$unsupported_languages fortran"
569: noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss";;
570: esac
571: ;;
572: crx-*-*)
573: noconfigdirs="$noconfigdirs target-libstdc++-v3 target-mudflap ${libgcj}"
574: ;;
575: d10v-*-*)
576: noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
577: ;;
578: d30v-*-*)
579: noconfigdirs="$noconfigdirs ${libgcj} gdb"
580: ;;
581: fr30-*-elf*)
582: noconfigdirs="$noconfigdirs ${libgcj} gdb"
583: ;;
584: frv-*-*)
585: noconfigdirs="$noconfigdirs ${libgcj}"
586: ;;
587: h8300*-*-*)
588: noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
589: ;;
590: h8500-*-*)
591: noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
592: ;;
593: hppa1.1-*-osf* | hppa1.1-*-bsd* )
594: ;;
595: hppa*64*-*-linux* | parisc*64*-*-linux*)
596:
597:
598:
599: noconfigdirs="$noconfigdirs target-zlib"
600: ;;
601: parisc*-*-linux* | hppa*-*-linux*)
602: ;;
603: hppa*-*-*elf* | \
604: hppa*-*-lites* | \
605: hppa*-*-openbsd* | \
606: hppa*64*-*-*)
607: noconfigdirs="$noconfigdirs ${libgcj}"
608: ;;
609: hppa*-hp-hpux11*)
610: noconfigdirs="$noconfigdirs ld shellutils"
611: ;;
612: hppa*-*-*)
613:
614:
615: noconfigdirs="$noconfigdirs ld shellutils ${libgcj}"
616: ;;