1dnl Process this file file with autoconf to produce a configure script.
2dnl This file is a shell script fragment that supplies the information
3dnl necessary to tailor a template configure script into the configure
4dnl script appropriate for this directory.  For more information, check
5dnl any existing configure script.
6
7AC_PREREQ(2.5)
8AC_INIT(gdb.base)
9
10CC=${CC-cc}
11AC_SUBST(CC)
12AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../..)
13AC_CANONICAL_SYSTEM
14
15# Directories to use in all configurations.
16configdirs="gdb.base gdb.c++ gdb.disasm gdb.chill gdb.threads"
17
18# Directories to use for a configuration which uses stabs.
19stabsdirs="gdb.stabs"
20
21	# this section is for targets that use stabs
22# add stabs tests for appropriate targets
23case "${target}" in
24	powerpc-*-aix*)	configdirs="${configdirs} ${stabsdirs}" ;;
25	rs6000-*-aix*)	configdirs="${configdirs} ${stabsdirs}" ;;
26	*-*-bsd*)	configdirs="${configdirs} ${stabsdirs}" ;;
27	*-*-go32*)	configdirs="${configdirs} ${stabsdirs}" ;;
28	*-*-linux*)	configdirs="${configdirs} ${stabsdirs}" ;;
29	*-*-lynxos*)	configdirs="${configdirs} ${stabsdirs}" ;;
30	*-sun-*)	configdirs="${configdirs} ${stabsdirs}" ;;
31	hppa*-*-*)	configdirs="${configdirs} ${stabsdirs}" ;;
32	*)		if test "x${with_stabs}" = x"yes" ; then
33			  configdirs="${configdirs} ${stabsdirs}"
34			fi ;;
35esac
36
37# Begin stuff to support --enable-shared
38AC_ARG_ENABLE(shared,
39[  --enable-shared         use shared libraries],
40[case "${enableval}" in
41  yes) shared=true ;;
42  no)  shared=false ;;
43  *) shared=true ;;
44esac])dnl
45RPATH_ENVVAR=LD_LIBRARY_PATH
46# If we have shared libraries, try to set RPATH_ENVVAR reasonably.
47if test "${shared}" = "true"; then
48  case "${host}" in
49  *-*-hpux*)
50    RPATH_ENVVAR=SHLIB_PATH
51    ;;
52  esac
53fi
54AC_SUBST(RPATH_ENVVAR)
55# End stuff to support --enable-shared
56
57# configure the subdirectories too
58AC_CONFIG_SUBDIRS($configdirs)
59
60dnl AC_SUBST(gdb_target_cpu)
61AC_OUTPUT(Makefile)
62