dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.5) AC_INIT(rx.c) # If the language specific compiler does not exist, but the "gcc" directory does, # we do not build anything. Note, $r is set by the top-level Makefile. compiler_name=cc1plus AC_MSG_CHECKING(if compiler $compiler_name has been built) AC_CACHE_VAL(gxx_cv_compiler_exists, [gxx_cv_compiler_exists=yes if test -n "$r"; then if test -d "$r"/gcc; then if test -f "$r"/gcc/$compiler_name; then true else gxx_cv_compiler_exists=no echo "rm -f config.cache config.log multilib.out" > skip-this-dir fi fi fi ]) AC_MSG_RESULT($gxx_cv_compiler_exists) if test x$gxx_cv_compiler_exists = xno then rm -f Makefile conftest* confdefs* core exit 0 fi AC_ARG_ENABLE(shared, [ --enable-shared build shared BFD library], [case "${enableval}" in yes) shared=yes ;; no) shared=no ;; *librx*) shared=yes ;; *) shared=no ;; esac])dnl if test "${srcdir}" = "." ; then if test "${with_target_subdir}" != "." ; then librx_topdir="${srcdir}/${with_multisrctop}../.." else librx_topdir="${srcdir}/${with_multisrctop}.." fi else librx_topdir="${srcdir}/.." fi AC_CONFIG_AUX_DIR($librx_topdir) AC_PROG_CC AC_PROG_CPP AC_PROG_RANLIB AC_PROG_INSTALL dnl Check for gcc explicitly in case the linker does not work when dnl using a cross compiler. if test "${GCC}" = "yes"; then AC_DEFINE(HAVE_ALLOCA) else AC_FUNC_ALLOCA fi AC_STDC_HEADERS AC_HAVE_HEADERS(string.h) AC_CANONICAL_SYSTEM AC_MSG_CHECKING([for target makefile fragment]) target_frag= if test "${shared}" = "yes" ; then case "${target}" in hppa*-*-*) target_frag=../config/mh-papic ;; i[[3456]]86-*-*) target_frag=../config/mh-x86pic ;; *-*-*) target_frag=../config/mh-${target_cpu}pic ;; esac case ${target_frag} in ../* ) if test ${srcdir} = . ; then test -n "${with_target_subdir}" && target_frag=../${target_frag} test -n "${with_multisrctop}" && target_frag=${with_multisrctop}${target_frag} fi ;; esac target_frag=${srcdir}/${target_frag} fi if test ! -f "${target_frag}"; then target_frag=/dev/null AC_MSG_RESULT(none) else AC_MSG_RESULT(${target_frag}) fi AC_SUBST_FILE(target_frag) AC_SUBST(shared) AC_OUTPUT(Makefile, . ${librx_topdir}/config-ml.in, srcdir=${srcdir} target=${target} ac_configure_args="${ac_configure_args}" CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} librx_topdir=${librx_topdir} shared=${shared} )