#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(gcc_version)
# Calculate toolexeclibdir
+# Also toolexecdir, though it's only used in toolexeclibdir
case ${version_specific_libs} in
yes)
# Need the gcc compiler version to know where to install libraries
# and header files if --enable-version-specific-runtime-libs option
# is selected.
+ toolexecdir='$(libdir)/gcc/$(target_noncanonical)'
toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)'
;;
no)
if test -n "$with_cross_host" &&
test x"$with_cross_host" != x"no"; then
# Install a library built with a cross compiler in tooldir, not libdir.
+ toolexecdir='$(exec_prefix)/$(target_noncanonical)'
toolexeclibdir='$(toolexecdir)/lib'
else
+ toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)'
toolexeclibdir='$(libdir)'
fi
multi_os_directory=`$CC -print-multi-os-directory`
esac
;;
esac
+AC_SUBST(toolexecdir)
AC_SUBST(toolexeclibdir)
-glibcpp_prefixdir=${prefix}
-AC_SUBST(glibcpp_prefixdir)
+# 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