#### # Basic setup to get simular environment to Python's configure m4_define(PYTHON_VERSION, 3.3) AC_PREREQ(2.65) AC_INIT(python, PYTHON_VERSION, http://bugs.python.org/) AC_CANONICAL_HOST ac_sys_system=`uname -s` ##### # Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2 # when the compiler supports them, but we don't always want -O2, and # we set -g later. if test -z "$CFLAGS"; then CFLAGS= fi case $ac_sys_system in Darwin) if test -z "${CC}" ; then found_gcc= found_clang= as_save_IFS=$IFS; IFS=: for as_dir in $PATH do IFS=$as_save_IFS if test -x $as_dir/gcc; then if test -z "${found_gcc}"; then found_gcc=$as_dir/gcc fi fi if test -x $as_dir/clang; then if test -z "${found_clang}"; then found_clang=$as_dir/clang fi fi done IFS=$as_save_IFS if test -n "$found_gcc" -a -n "$found_clang" then if test -n "`"$found_gcc" --version | grep llvm-gcc`" then AC_MSG_WARN([Detected llvm-gcc, falling back to clang]) CC="$found_clang" fi fi fi ;; esac AC_PROG_CC AC_CONFIG_FILES(Makefile) AC_OUTPUT