| # -*- Autoconf -*- |
| # Process this file with autoconf to produce a configure script. |
| |
| AC_PREREQ([2.68]) |
| AC_INIT(package-unused, version-unused, libasan) |
| AC_CONFIG_SRCDIR([asan_stack.cc]) |
| AC_CONFIG_AUX_DIR(.) |
| AM_INIT_AUTOMAKE(foreign) |
| |
| AC_MSG_CHECKING([for --enable-version-specific-runtime-libs]) |
| AC_ARG_ENABLE(version-specific-runtime-libs, |
| [ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ], |
| [case "$enableval" in |
| yes) version_specific_libs=yes ;; |
| no) version_specific_libs=no ;; |
| *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);; |
| esac], |
| [version_specific_libs=no]) |
| AC_MSG_RESULT($version_specific_libs) |
| |
| # Checks for programs. |
| AC_PROG_CC |
| AC_PROG_CXX |
| |
| AC_LIBTOOL_DLOPEN |
| AM_PROG_LIBTOOL |
| |
| AC_SUBST(enable_shared) |
| AC_SUBST(enable_static) |
| |
| AM_ENABLE_MULTILIB(, ..) |
| target_alias=${target_alias-$host_alias} |
| AC_SUBST(target_alias) |
| |
| # 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_alias)' |
| 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_alias)' |
| toolexeclibdir='$(toolexecdir)/lib' |
| else |
| toolexecdir='$(libdir)/gcc-lib/$(target_alias)' |
| toolexeclibdir='$(libdir)' |
| fi |
| multi_os_directory=`$CC -print-multi-os-directory` |
| case $multi_os_directory in |
| .) ;; # Avoid trailing /. |
| *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; |
| esac |
| ;; |
| esac |
| |
| AC_SUBST(toolexecdir) |
| AC_SUBST(toolexeclibdir) |
| |
| AC_CONFIG_FILES([Makefile]) |
| AC_OUTPUT |