* build patch
[deliverable/binutils-gdb.git] / sim / erc32 / configure.in
index ea61c92d924f8097ce64fd6cfdffad5907a84519..cef343daf8bb9e55185fdaee339ec622b2e28adf 100644 (file)
@@ -1,18 +1,24 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.3)dnl
+sinclude(../common/aclocal.m4)
+AC_PREREQ(2.5)dnl
 AC_INIT(Makefile.in)
 
-AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../..)
-AC_CANONICAL_SYSTEM
-AC_ARG_PROGRAM
-AC_PROG_CC
+SIM_AC_COMMON
 
-. ${srcdir}/../../bfd/configure.host
+AC_CHECK_HEADERS(stdlib.h)
 
-AC_SUBST(CFLAGS)
-AC_SUBST(HDEFINES)
-AR=${AR-ar}
-AC_SUBST(AR)
-AC_PROG_RANLIB
+# In the Cygwin environment, we need some additional flags.
+AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin,
+[AC_EGREP_CPP(lose, [
+#ifdef __CYGWIN__
+lose
+#endif],[sim_cv_os_cygwin=yes],[sim_cv_os_cygwin=no])])
 
-AC_OUTPUT(Makefile)
+if test x$sim_cv_os_cygwin = xyes; then
+  TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32'
+else
+  AC_CHECK_LIB(termcap, main, TERMCAP=-ltermcap, TERMCAP="")
+fi
+AC_SUBST(TERMCAP)
+
+SIM_AC_OUTPUT
This page took 0.022662 seconds and 4 git commands to generate.