AC_INIT(qt.c)
+AM_INIT_GUILE_MODULE(qt)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
-AC_PROG_INSTALL
AC_PROG_RANLIB
-# Tell configure where to find config.guess
-AC_CONFIG_AUX_DIR(..) #`cd $srcdir; pwd`/..)
-
-builtin(sinclude, ../aclocal.m4)
CY_AC_WITH_THREADS
-target_all=
+threads_enabled=false
if test "$cy_cv_threads_package" = COOP; then
- target_all=libqt.a
+ threads_enabled=true
fi
# Determine the host we are working on
;;
*)
echo "Unknown configuration; threads package disabled"
- target_all=''
+ threads_enabled=false
;;
esac
-AC_SUBST(target_all)
+
+if $threads_enabled; then
+ target_libs=libqt.a
+else
+ target_libs=
+fi
+
+# Give the Makefile the names of the object files that will be
+# generated by compiling $qtmdc_c and $qtmds_s.
+qtmdc_o="`echo ${qtmdc_c} | sed -e 's:^.*/::' | sed -e 's:\.c$:\.o:'`"
+qtmds_o="`echo ${qtmds_s} | sed -e 's:^.*/::' | sed -e 's:\.s$:\.o:'`"
+
+AC_SUBST(target_libs)
AC_SUBST(qtmd_h)
AC_SUBST(qtmdc_c)
+AC_SUBST(qtmdc_o)
AC_SUBST(qtmds_s)
+AC_SUBST(qtmds_o)
AC_SUBST(qtmdb_s)
-AC_OUTPUT(Makefile qt.h)
+AC_OUTPUT(Makefile qt.h md/Makefile time/Makefile)