Adding ocamldoc generation.
[oota-llvm.git] / autoconf / configure.ac
index 1e97601089efb21b7a989dcfe9bb7c72d390d8ca..86459b8f710d9b936db81f11bc9a23e63acffea5 100644 (file)
@@ -31,12 +31,12 @@ dnl===
 dnl===-----------------------------------------------------------------------===
 dnl Initialize autoconf and define the package name, version number and
 dnl email address for reporting bugs.
-AC_INIT([[llvm]],[[2.2svn]],[llvmbugs@cs.uiuc.edu])
+AC_INIT([[llvm]],[[2.3svn]],[llvmbugs@cs.uiuc.edu])
 
 dnl Provide a copyright substitution and ensure the copyright notice is included
 dnl in the output of --version option of the generated configure script.
-AC_SUBST(LLVM_COPYRIGHT,["Copyright (c) 2003-2007 University of Illinois at Urbana-Champaign."])
-AC_COPYRIGHT([Copyright (c) 2003-2007 University of Illinois at Urbana-Champaign.])
+AC_SUBST(LLVM_COPYRIGHT,["Copyright (c) 2003-2008 University of Illinois at Urbana-Champaign."])
+AC_COPYRIGHT([Copyright (c) 2003-2008 University of Illinois at Urbana-Champaign.])
 
 dnl Indicate that we require autoconf 2.59 or later. Ths is needed because we
 dnl use some autoconf macros only available in 2.59.
@@ -119,7 +119,7 @@ AC_CACHE_CHECK([type of operating system we're going to host on],
     llvm_cv_platform_type="Unix" ;;
   *-*-darwin*)
     llvm_cv_link_all_option="-Wl,-all_load"
-    llvm_cv_link_all_option="-Wl,-noall_load"
+    llvm_cv_no_link_all_option="-Wl,-noall_load"
     llvm_cv_os_type="Darwin"
     llvm_cv_platform_type="Unix" ;;
   *-*-freebsd*)
@@ -580,18 +580,19 @@ dnl Checks for documentation and testing tools that we can do without. If these
 dnl are not found then they are set to "true" which always succeeds but does
 dnl nothing. This just lets the build output show that we could have done
 dnl something if the tool was available.
-AC_PATH_PROG(BZIP2,[bzip2],[echo "Skipped: bzip2 not found"])
-AC_PATH_PROG(DOXYGEN,[doxygen],[echo "Skipped: doxygen not found"])
-AC_PATH_PROG(GROFF,[groff],[echo "Skipped: groff not found"])
-AC_PATH_PROG(GZIP,[gzip],[echo "Skipped: gzip not found"])
-AC_PATH_PROG(POD2HTML,[pod2html],[echo "Skipped: pod2html not found"])
-AC_PATH_PROG(POD2MAN,[pod2man],[echo "Skipped: pod2man not found"])
-AC_PATH_PROG(RUNTEST,[runtest],[echo "Skipped: runtest not found"])
+AC_PATH_PROG(BZIP2, [bzip2])
+AC_PATH_PROG(DOXYGEN, [doxygen])
+AC_PATH_PROG(GROFF, [groff])
+AC_PATH_PROG(GZIP, [gzip])
+AC_PATH_PROG(POD2HTML, [pod2html])
+AC_PATH_PROG(POD2MAN, [pod2man])
+AC_PATH_PROG(RUNTEST, [runtest])
 DJ_AC_PATH_TCLSH
-AC_PATH_PROG(ZIP,[zip],[echo "Skipped: zip not found"])
-AC_PATH_PROG(OCAMLC,[ocamlc],[echo "Skipped: ocamlc not found"])
-AC_PATH_PROG(OCAMLOPT,[ocamlopt],[echo "Skipped: ocamlopt not found"])
-AC_PATH_PROG(OCAMLDEP,[ocamldep],[echo "Skipped: ocamldep not found"])
+AC_PATH_PROG(ZIP, [zip])
+AC_PATH_PROGS(OCAMLC, [ocamlc.opt ocamlc])
+AC_PATH_PROGS(OCAMLOPT, [ocamlopt.opt ocamlopt])
+AC_PATH_PROGS(OCAMLDEP, [ocamldep.opt ocamldep])
+AC_PATH_PROGS(OCAMLDOC, [ocamldoc.opt ocamldoc])
 
 dnl Determine if the linker supports the -R option.
 AC_LINK_USE_R
@@ -656,11 +657,10 @@ fi
 dnl Verify that GCC is version 3.0 or higher
 if test "$GCC" = "yes"
 then
-  gccmajor=`$CC --version | head -n 1 | sed 's/[[^0-9]]*\([[0-9.]]\).*/\1/'`
-  if test "$gccmajor" -lt "3"
-  then
-    AC_MSG_ERROR([gcc 3.x required, but you have a lower version])
-  fi
+  AC_COMPILE_IFELSE([[#if !defined(__GNUC__) || __GNUC__ < 3
+#error Unsupported GCC version
+#endif
+]], [], [AC_MSG_ERROR([gcc 3.x required, but you have a lower version])])
 fi
 
 dnl Check for GNU Make.  We use its extensions, so don't build without it
@@ -686,12 +686,6 @@ if test "$llvm_cv_os_type" = "MingW" ; then
   AC_CHECK_LIB(psapi, main)
 fi
 
-dnl lt_dlopen may be required for plugin support.
-AC_SEARCH_LIBS(lt_dlopen,ltdl,AC_DEFINE([HAVE_LT_DLOPEN],[1],
-              [Define if lt_dlopen() is available on this platform]),
-              AC_MSG_WARN([lt_dlopen() not found - plugin support might
-                           not be available]))
-
 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.]),