dnl Initialize autoconf
-AC_INIT([[LLVM]],[[1.4]],[llvmbugs@cs.uiuc.edu])
+AC_INIT([[llvm]],[[1.4]],[llvmbugs@cs.uiuc.edu])
dnl Place all of the extra autoconf files into the config subdirectory
dnl Tell various tools where the m4 autoconf macros are
"Java") AC_CONFIG_SUBDIRS([projects/Java]) ;;
"llvm-tv") AC_CONFIG_SUBDIRS([projects/llvm-tv]) ;;
"llvm-fefw") AC_CONFIG_SUBDIRS([projects/llvm-fefw]) ;;
+ "poolalloc") AC_CONFIG_SUBDIRS([projects/poolalloc]) ;;
*)
- AC_MSG_WARN([Unknown projects (${i})won't be configured automatically])
+ AC_MSG_WARN([Unknown project (${i}) won't be configured automatically])
;;
esac
fi
AC_CONFIG_MAKEFILE(test/QMTest/llvm.py)
AC_CONFIG_MAKEFILE(test/QMTest/llvmdb.py)
AC_CONFIG_MAKEFILE(tools/Makefile)
+AC_CONFIG_MAKEFILE(tools/Makefile.JIT)
AC_CONFIG_MAKEFILE(utils/Makefile)
AC_CONFIG_MAKEFILE(projects/Makefile)
AC_PROG_FLEX
AC_PROG_BISON
AC_PROG_LIBTOOL
+AC_PATH_PROG(TAR,[tar],[gtar])
dnl Checks for tools we can get away with not having:
AC_PATH_PROG(DOT,[dot],[true dot])
esac
AC_SUBST(ETAGSFLAGS,$ETAGSFLAGS)
AC_PATH_PROG(PYTHON,[python],[true python])
-if test "$PYTHON" = "false"
-then
+if test "$PYTHON" = "false" ; then
AC_MSG_WARN([Python is required for the test suite, but it was not found])
fi
AC_PATH_PROG(QMTEST,[qmtest],[true qmtest])
-if test "$QMTEST" = "false"
-then
+if test "$QMTEST" = "false" ; then
AC_MSG_WARN([QMTest is required for the test suite, but it was not found])
fi
+AC_PATH_PROG(RUNTEST,[runtest],[true runtest])
+if test "$RUNTEST" = "false" ; then
+ AC_MSG_WARN([runtest (Deja-Gnu) is required for the test sute, but it was not found])
+fi
dnl Verify that the version of python available is high enough for qmtest
pyversion=`$PYTHON -V 2>&1 | cut -d\ -f2`
dnl libelf is for sparc only; we can ignore it if we don't have it
AC_CHECK_LIB(elf, elf_begin)
+dnl Check for bzip2 and zlib compression libraries needed for archive reading/writing
+AC_CHECK_LIB(bz2,BZ2_bzCompressInit,[bzip2_found=1],[bzip2_found=0])
+AC_CHECK_HEADERS([bzlib.h],[bzlib_h_found=1],[bzlib_h_found=0],[])
+AC_CHECK_LIB(z,gzopen,[zlib_found=1],[zlib_found=0])
+AC_CHECK_HEADERS([zlib.h],[zlib_h_found=1],[zlib_h_found=0],[])
+if test $zlib_found -eq 1 -a $zlib_h_found -eq 1; then
+ AC_DEFINE([HAVE_ZLIB],[1],[Define if zlib library is available on this platform.])
+ AC_SUBST([HAVE_ZLIB],[1])
+else
+ AC_SUBST([HAVE_ZLIB],[0])
+fi
+if test $bzip2_found -eq 1 -a $bzlib_h_found -eq 1 ; then
+ AC_DEFINE([HAVE_BZIP2],[1],[Define if bzip2 library is available on this platform.])
+ AC_SUBST([HAVE_BZIP2],[1])
+else
+ AC_SUBST([HAVE_BZIP2],[0])
+fi
dnl dlopen() is required for plugin support.
AC_SEARCH_LIBS(dlopen,dl,AC_DEFINE([HAVE_DLOPEN],[1],[Define if dlopen() is available on this platform.]),AC_MSG_WARN([dlopen() not found - disabling plugin support]))
AC_FUNC_ISNAN
AC_FUNC_ISINF
+AC_FUNC_RAND48
dnl Checks for library functions.
AC_FUNC_ALLOCA
dnl Create the output files
AC_OUTPUT
+dnl Warn if we don't have a compression library
+if test $bzip2_found -ne 1 ; then
+ if test $zlib_found -ne 1 ; then
+ AC_MSG_WARN([*** Neither zlib nor bzip2 compression libraries were found.])
+ AC_MSG_WARN([*** Bytecode archives will not support compression!])
+ AC_MSG_WARN([*** To correct, install the libraries and and re-run configure.])
+ fi
+fi
+
dnl Warn loudly if llvm-gcc was not obviously working
if test $llvmgccwarn = yes
then