summaryrefslogtreecommitdiff
path: root/gdb/gdbtk/plugins/configure.in
blob: 58a54808124338f435660da632aa65eff0d86817 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
AC_INIT(Make-rules)
AC_CONFIG_AUX_DIR(../../..)
AM_INIT_AUTOMAKE(insight, 1.0)
AM_MAINTAINER_MODE
AC_PROG_MAKE_SET
AC_CANONICAL_HOST
AC_PROG_CC
AC_OBJEXT
AC_EXEEXT

# Find Tcl, Tk, etc
CYG_AC_PATH_TCLCONFIG
CYG_AC_LOAD_TCLCONFIG
CYG_AC_PATH_TKCONFIG
CYG_AC_LOAD_TKCONFIG
CYG_AC_PATH_TCLH
CYG_AC_PATH_TKH
AC_SUBST(TCL_DBGX)

# Make sure TCL_SHLIB_SUFFIX is set
if test x$TCL_SHLIB_SUFFIX = x ; then
  case "${host}" in
    *cygwin*) TCL_SHLIB_SUFFIX=".dll" ;;
    *) TCL_SHILB_SUFFIX=".so" ;;
  esac
fi
AC_SUBST(TCL_SHLIB_SUFFIX)

# Since we're not using autoconf > 2.1x, we cannot use AC_CONFIG_FILES.
make_subdirs=""

# See if -mwin32 works for cygwin
case "${host}" in
  *cygwin*)
    ocflags=${CFLAGS}
    CFLAGS="${CFLAGS} -mwin32"
    AC_TRY_COMPILE(,,,CFLAGS="${ocflags}")
    ;;
  *) ;;
esac

# note toplevel plugin build directory
plugin_builddir=`pwd`

#
# Plugins
#

# Supported hosts

# Only supported/tested on linux, solaris, cygwin
supported=yes
case "${host}" in
  *cygwin*) ;;
  *solaris*) ;;
  *linux*) ;;
  *) supported=no ;;
esac

# Host-specific configury
case "${host}" in
  *cygwin*)
    AC_CHECK_TOOL(NM, nm, nm)
    AC_CHECK_TOOL(AS, as, as)
    AC_CHECK_TOOL(LD, ld, ld)
    AC_MSG_CHECKING("for libcygwin.a")
    LIBCYGWIN_A=`$CC -print-file-name=libcygwin.a`
    AC_MSG_RESULT($LIBCYGWIN_A)
    AC_SUBST(LIBCYGWIN_A)
    AC_CHECK_TOOL(DLLTOOL, dlltool)
    ;;
esac

# Plugins supported by this configuration
if test x${supported} = xyes; then
  plugins="rhabout"
  case "${target}" in
    *cygwin*) ;;
    *linux*) ;;
    *i?86*)
      plugins="${plugins} intel-pentium"
      ;;
  esac

  for i in $plugins ; do
    make_subdirs="${make_subdirs} $i"
  done
fi

AC_SUBST(make_subdirs)
AC_SUBST(plugin_builddir)

AC_OUTPUT(Makefile rhabout/Makefile:rhabout/Makefile.in:Make-rules rhabout/rhabout.tcl intel-pentium/Makefile:intel-pentium/Makefile.in:Make-rules intel-pentium/intel-pentium.tcl)