* mdemo/Makefile.am: Likewise.
+2000-09-04 Alexandre Oliva <aoliva@redhat.com>
+
+ * mdemo/configure.in: Don't use -static on AIX4.1.
+ * mdemo/Makefile.am: Likewise.
+
2000-09-03 Alexandre Oliva <aoliva@redhat.com>
* ltconfig.in: Get rid of hardcode_into_libs=all; use
# Create a statically linked version of mdemo.
mdemo_static_SOURCES = $(mdemo_SOURCES)
-mdemo_static_LDFLAGS = $(mdemo_LDFLAGS) -static
+mdemo_static_LDFLAGS = $(STATIC) $(mdemo_LDFLAGS)
mdemo_static_LDADD = $(mdemo_LDADD)
mdemo_static_DEPENDENCIES = $(mdemo_DEPENDENCIES)
AM_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
+if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then
+ STATIC=-static
+else
+ STATIC=
+fi
+AC_SUBST(STATIC)
+
+case $host_os in
+dnl aix 4.1 provides dlopen() through -lsvld, but this library can't
+dnl be linked statically.
+aix4.[[01]]*)
+ STATIC= ;;
+esac
+
AC_CHECK_HEADERS(math.h)
AC_CHECK_LIBM