diff options
author | J.T. Conklin <jtc@acorntoolworks.com> | 1995-05-16 00:18:43 +0000 |
---|---|---|
committer | J.T. Conklin <jtc@acorntoolworks.com> | 1995-05-16 00:18:43 +0000 |
commit | 5436fc6578fb8f0b84e2e2658cc20022dc607d8e (patch) | |
tree | dfa917cc33bf5c81490de2b22cb17c050c32b2df /gdb/aclocal.m4 | |
parent | c812c3087af2fe5a8e7863ad3edf42bdefb989c7 (diff) | |
download | gdb-5436fc6578fb8f0b84e2e2658cc20022dc607d8e.zip gdb-5436fc6578fb8f0b84e2e2658cc20022dc607d8e.tar.gz gdb-5436fc6578fb8f0b84e2e2658cc20022dc607d8e.tar.bz2 |
* config/i386/{i386sol2.mh, i386v4.mh, ncr3000.mh},
config/m68k/m68kv4.mh, config/mips/{irix4.mh, irix5.mh,
mipsv4.mh}, config/sparc/sun4so2.mh (INSTALL): Removed, figured
out by autoconf.
* config/apollo68v.mh (RANLIB): Removed, figured out by autoconf.
* Makefile.in, configure.in: Converted to use autoconf
* aclocal.m4: New file, local autoconf macro definitions.
* configure: New file, generated with autoconf 2.3.
Diffstat (limited to 'gdb/aclocal.m4')
-rw-r--r-- | gdb/aclocal.m4 | 147 |
1 files changed, 147 insertions, 0 deletions
diff --git a/gdb/aclocal.m4 b/gdb/aclocal.m4 new file mode 100644 index 0000000..19ba7ed --- /dev/null +++ b/gdb/aclocal.m4 @@ -0,0 +1,147 @@ +AC_DEFUN(CYGNUS_PATH_TK, [ +# +# Ok, lets find the tk source trees so we can use the headers +# If the directory (presumably symlink) named "tk" exists, use that one +# in preference to any others. Same logic is used when choosing library +# and again with Tcl. +# +AC_CHECKING(for Tk source directory) +TKHDIR="" +for i in `ls -d ${srcdir}/../tk* 2>/dev/null` ${srcdir}/../tk ; do + if test -f $i/tk.h ; then + TKHDIR="-I$i" + fi +done +# if we can't find it, see if one is installed +if test x"$TKHDIR" = x ; then + installed=0 + if test -f $prefix/include/tk.h; then + installed=1 TKHDIR="-I$prefix/include" + else + AC_HEADER_CHECK(tk.h, installed=1) + fi + if test $installed -eq 0 ; then + TKHDIR="# no Tk directory found" + AC_MSG_WARN(Can't find Tk directory) + fi +fi +if test x"$TKHDIR" != x ; then + AC_MSG_RESULT(Setting TKHDIR to be $i) +fi + +# +# Ok, lets find the tk library +# First, look for one uninstalled. +# +TKLIB="" +AC_CHECKING(for Tk library) +for i in `ls -d ../tk* 2>/dev/null` ../tk ; do + if test -f "$i/Makefile" ; then + TKLIB=$i/libtk.a + fi +done +# If not found, look for installed version +if test x"$TKLIB" = x ; then +dnl This doesn't work because of unresolved symbols. +dnl AC_HAVE_LIBRARY(libtk.a, installed=1, installed=0) + if test -f $prefix/lib/libtk.a; then + installed=1 + else + installed=0 + fi + if test $installed -eq 1 ; then + TKLIB="-ltk" + fi +fi + +# If still not found, assume Tk simply hasn't been built yet +if test x"$TKLIB" = x ; then + for i in `ls -d ../tk* 2>/dev/null` ../tk ; do + if test -f "$i/tk.h" ; then + TKLIB=$i/libtk.a + fi + done +fi + +if test x"$TKLIB" = x ; then + TKLIB="# no Tk library found" + AC_MSG_WARN(Can't find Tk library) +else + AC_MSG_RESULT(setting TKLIB to be $TKLIB) + no_tk= +fi + +AC_SUBST(TKHDIR) +AC_SUBST(TKLIB) +]) + + +AC_DEFUN(CYGNUS_PATH_TCL, [ +# +# Ok, lets find the tcl source trees so we can use the headers +# +# Warning: transition of version 9 to 10 will break this algorithm +# because 10 sorts before 9. +# +AC_CHECKING(for Tcl source directory) +TCLHDIR="" +for i in `ls -d ${srcdir}/../tcl* 2>/dev/null` ${srcdir}/../tcl ; do + if test -f $i/tclInt.h ; then + TCLHDIR="-I$i" + fi +done +# if we can't find it, see if one is installed +if test x"$TCLHDIR" = x ; then + installed=0 + if test -f $prefix/include/tclInt.h; then + installed=1 TCLHDIR="-I$prefix/include" + else + AC_HEADER_CHECK(tclInt.h, installed=1) + fi + if test $installed -eq 0 ; then + TCLHDIR="# no Tcl directory found" + AC_MSG_WARN(Can't find Tcl directory) + fi +else + AC_MSG_RESULT(setting TCLHDIR to be $i) +fi + +# +# Ok, lets find the tcl library +# First, look for the latest uninstalled +# +TCLLIB="" +AC_CHECKING(for Tcl library) +for i in `ls -d ../tcl* 2>/dev/null` ../tcl ; do + if test -f "$i/Makefile" ; then + TCLLIB=$i/libtcl.a + fi +done +# If not found, look for installed version +if test x"$TCLLIB" = x ; then +dnl Don't use this, since we can't use it for libtk.a. +dnl AC_HAVE_LIBRARY(libtcl.a, installed=1, installed=0) + if test -f $prefix/lib/libtcl.a; then installed=1; else installed=0; fi + if test $installed -eq 1 ; then + TCLLIB="-ltcl" + fi +fi +# If still not found, assume Tcl simply hasn't been built yet +if test x"$TCLLIB" = x ; then + for i in `ls -d ../tcl* 2>/dev/null` ../tcl ; do + if test -f "$i/tcl.h" ; then + TCLLIB=$i/libtcl.a + fi + done +fi + +if test x"$TCLLIB" = x ; then + TCLLIB="# no Tcl library found" + AC_MSG_WARN(Can't find Tcl library) +else + AC_MSG_RESULT(setting TCLLIB to be $TCLLIB) +fi + +AC_SUBST(TCLHDIR) +AC_SUBST(TCLLIB) +])
\ No newline at end of file |