#02111-1307, USA.
AC_PREREQ(2.59)
-AC_INIT
+AC_INIT(package-unused, version-unused,, libobjc)
AC_CONFIG_SRCDIR([objc/objc.h])
# We need the following definitions because AC_PROG_LIBTOOL relies on them
AC_SUBST(toolexecdir)
AC_SUBST(toolexeclibdir)
+# Figure out if we want to name the include directory and the
+# library name changes differently.
+includedirname=include
+libext=
+case "${host}" in
+ *-darwin*)
+ # Darwin is the only target so far that needs a different include directory.
+ includedirname=include-gnu-runtime
+ libext=-gnu
+ ;;
+esac
+AC_SUBST(includedirname)
+AC_SUBST(libext)
+
# --------
# Programs
# --------
GCC_NO_EXECUTABLES
+
+# We must force CC to /not/ be a precious variable; otherwise
+# the wrong, non-multilib-adjusted value will be used in multilibs.
+# As a side effect, we have to subst CFLAGS ourselves.
+m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
+m4_define([_AC_ARG_VAR_PRECIOUS],[])
AC_PROG_CC
+m4_rename([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
+
+AC_SUBST(CFLAGS)
AC_CHECK_TOOL(AS, as)
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_PROG_INSTALL
-# Disable shared libs by default
-AC_DISABLE_SHARED
# Enable Win32 DLL on MS Windows - FIXME
AC_LIBTOOL_WIN32_DLL