remove obsolete comment
[oota-llvm.git] / configure
index 62b990b901c0a96cea9435bab0fd293df9589176..412c307ba480d7a788e8fb45c62117b8b4d5ecf2 100755 (executable)
--- a/configure
+++ b/configure
@@ -835,6 +835,7 @@ JIT
 TARGET_HAS_JIT
 ENABLE_DOXYGEN
 ENABLE_THREADS
+ENABLE_PIC
 TARGETS_TO_BUILD
 ENABLE_CBE_PRINTF_A
 EXTRA_OPTIONS
@@ -903,6 +904,7 @@ MMAP_FILE
 LLVMCC1
 LLVMCC1PLUS
 LLVMGCCDIR
+LLVMGCCLIBEXEC
 LLVMGCC_VERSION
 LLVMGCC_MAJVERS
 SHLIBEXT
@@ -936,8 +938,8 @@ CXXCPP
 F77
 FFLAGS'
 ac_subdirs_all='projects/sample
-projects/Stacker
 projects/privbracket
+projects/llvm-stacker
 projects/llvm-test
 projects/llvm-reopt
 projects/llvm-gcc
@@ -1525,6 +1527,8 @@ Optional Features:
   --enable-jit            Enable Just In Time Compiling (default is YES)
   --enable-doxygen        Build doxygen documentation (default is NO)
   --enable-threads        Use threads if available (default is YES)
+  --enable-pic            Build LLVM with Position Independent Code (default
+                          is NO)
   --enable-targets        Build specific host targets:
                           all,host-only,{target-name} (default=all)
   --enable-cbe-printf-a   Enable C Backend output with hex floating point via
@@ -2056,26 +2060,26 @@ for i in `ls ${srcdir}/projects`
 do
   if test -d ${srcdir}/projects/${i} ; then
     case ${i} in
-      "CVS") ;;
-      "sample")       subdirs="$subdirs projects/sample"
+      CVS) ;;
+      sample)       subdirs="$subdirs projects/sample"
     ;;
-      "Stacker")      subdirs="$subdirs projects/Stacker"
  ;;
-      "privbracket")  subdirs="$subdirs projects/privbracket"
+      privbracket)  subdirs="$subdirs projects/privbracket"
+ ;;
+      llvm-stacker) subdirs="$subdirs projects/llvm-stacker"
  ;;
-      "llvm-test")    subdirs="$subdirs projects/llvm-test"
+      llvm-test)    subdirs="$subdirs projects/llvm-test"
  ;;
-      "llvm-reopt")   subdirs="$subdirs projects/llvm-reopt"
+      llvm-reopt)   subdirs="$subdirs projects/llvm-reopt"
 ;;
-      "llvm-gcc")     subdirs="$subdirs projects/llvm-gcc"
+      llvm-gcc)     subdirs="$subdirs projects/llvm-gcc"
   ;;
-      "llvm-java")    subdirs="$subdirs projects/llvm-java"
+      llvm-java)    subdirs="$subdirs projects/llvm-java"
  ;;
-      "llvm-tv")      subdirs="$subdirs projects/llvm-tv"
+      llvm-tv)      subdirs="$subdirs projects/llvm-tv"
    ;;
-      "llvm-poolalloc") subdirs="$subdirs projects/llvm-poolalloc"
+      llvm-poolalloc) subdirs="$subdirs projects/llvm-poolalloc"
  ;;
-      "llvm-kernel")  subdirs="$subdirs projects/llvm-kernel"
+      llvm-kernel)  subdirs="$subdirs projects/llvm-kernel"
  ;;
       *)
         { echo "$as_me:$LINENO: WARNING: Unknown project (${i}) won't be configured automatically" >&5
@@ -4652,6 +4656,30 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
+# Check whether --enable-pic was given.
+if test "${enable_pic+set}" = set; then
+  enableval=$enable_pic;
+else
+  enableval=default
+fi
+
+case "$enableval" in
+  yes) ENABLE_PIC=1
+ ;;
+  no)  ENABLE_PIC=0
+ ;;
+  default) ENABLE_PIC=0
+ ;;
+  *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-pic. Use \"yes\" or \"no\"" >&5
+echo "$as_me: error: Invalid setting for --enable-pic. Use \"yes\" or \"no\"" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+
+cat >>confdefs.h <<_ACEOF
+#define ENABLE_PIC $ENABLE_PIC
+_ACEOF
+
+
 TARGETS_TO_BUILD=""
 # Check whether --enable-targets was given.
 if test "${enable_targets+set}" = set; then
@@ -7091,7 +7119,7 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_GRAPHVIZ 1
 _ACEOF
 
-    if test "$llvm_cv_os_type" == "MingW" ; then
+    if test "$llvm_cv_os_type" = "MingW" ; then
     GRAPHVIZ=`echo $GRAPHVIZ | sed 's/^\/\([A-Za-z]\)\//\1:\//' `
   fi
 
@@ -7147,7 +7175,7 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_DOT 1
 _ACEOF
 
-    if test "$llvm_cv_os_type" == "MingW" ; then
+    if test "$llvm_cv_os_type" = "MingW" ; then
     DOT=`echo $DOT | sed 's/^\/\([A-Za-z]\)\//\1:\//' `
   fi
 
@@ -7208,7 +7236,7 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_GV 1
 _ACEOF
 
-    if test "$llvm_cv_os_type" == "MingW" ; then
+    if test "$llvm_cv_os_type" = "MingW" ; then
     GV=`echo $GV | sed 's/^\/\([A-Za-z]\)\//\1:\//' `
   fi
 
@@ -7264,7 +7292,7 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_DOTTY 1
 _ACEOF
 
-    if test "$llvm_cv_os_type" == "MingW" ; then
+    if test "$llvm_cv_os_type" = "MingW" ; then
     DOTTY=`echo $DOTTY | sed 's/^\/\([A-Za-z]\)\//\1:\//' `
   fi
 
@@ -10299,7 +10327,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10302 "configure"
+#line 10330 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12443,7 +12471,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 12446 "configure"' > conftest.$ac_ext
+  echo '#line 12474 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -14161,11 +14189,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14164: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14192: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14168: \$? = $ac_status" >&5
+   echo "$as_me:14196: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -14429,11 +14457,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14432: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14460: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14436: \$? = $ac_status" >&5
+   echo "$as_me:14464: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -14533,11 +14561,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14536: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14564: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14540: \$? = $ac_status" >&5
+   echo "$as_me:14568: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -16985,7 +17013,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 16988 "configure"
+#line 17016 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -17085,7 +17113,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 17088 "configure"
+#line 17116 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -19453,11 +19481,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:19456: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:19484: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:19460: \$? = $ac_status" >&5
+   echo "$as_me:19488: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -19557,11 +19585,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:19560: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:19588: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:19564: \$? = $ac_status" >&5
+   echo "$as_me:19592: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -21127,11 +21155,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:21130: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:21158: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:21134: \$? = $ac_status" >&5
+   echo "$as_me:21162: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -21231,11 +21259,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:21234: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:21262: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:21238: \$? = $ac_status" >&5
+   echo "$as_me:21266: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -23466,11 +23494,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:23469: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:23497: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:23473: \$? = $ac_status" >&5
+   echo "$as_me:23501: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -23734,11 +23762,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:23737: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:23765: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:23741: \$? = $ac_status" >&5
+   echo "$as_me:23769: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -23838,11 +23866,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:23841: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:23869: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:23845: \$? = $ac_status" >&5
+   echo "$as_me:23873: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -26871,7 +26899,7 @@ _ACEOF
 
 fi
 
-if test "$llvm_cv_os_type" == "MingW" ; then
+if test "$llvm_cv_os_type" = "MingW" ; then
 
 { echo "$as_me:$LINENO: checking for main in -limagehlp" >&5
 echo $ECHO_N "checking for main in -limagehlp... $ECHO_C" >&6; }
@@ -30303,9 +30331,7 @@ done
 
 
 
-
-
-for ac_func in _setjmp _longjmp setjmp longjmp sigsetjmp siglongjmp
+for ac_func in setjmp longjmp sigsetjmp siglongjmp
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -33300,6 +33326,9 @@ if test "$llvm_cv_llvmgcc_sanity" = "yes" ; then
   llvmgccdir=`echo "$llvmcc1path" | sed 's,/libexec/.*,,'`
   LLVMGCCDIR=$llvmgccdir
 
+  llvmgcclibexec=`echo "$llvmcc1path" | sed 's,/cc1,,'`
+  LLVMGCCLIBEXEC=$llvmgcclibexec
+
   llvmgccversion=`"$LLVMGCC" -dumpversion 2>&1 | sed 's/^\([0-9.]*\).*/\1/'`
   llvmgccmajvers=`echo $llvmgccversion | sed 's/^\([0-9]\).*/\1/'`
   LLVMGCC_VERSION=$llvmgccversion
@@ -33314,7 +33343,7 @@ SHLIBEXT=$libltdl_cv_shlibext
 # Translate the various configuration directories and other basic
 # information into substitutions that will end up in Makefile.config.in
 # that these configured values can be used by the makefiles
-if test "${prefix}" == "NONE" ; then
+if test "${prefix}" = "NONE" ; then
   prefix="/usr/local"
 fi
 eval LLVM_PREFIX="${prefix}";
@@ -34172,6 +34201,7 @@ JIT!$JIT$ac_delim
 TARGET_HAS_JIT!$TARGET_HAS_JIT$ac_delim
 ENABLE_DOXYGEN!$ENABLE_DOXYGEN$ac_delim
 ENABLE_THREADS!$ENABLE_THREADS$ac_delim
+ENABLE_PIC!$ENABLE_PIC$ac_delim
 TARGETS_TO_BUILD!$TARGETS_TO_BUILD$ac_delim
 ENABLE_CBE_PRINTF_A!$ENABLE_CBE_PRINTF_A$ac_delim
 EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim
@@ -34189,7 +34219,6 @@ NM!$NM$ac_delim
 ifGNUmake!$ifGNUmake$ac_delim
 LN_S!$LN_S$ac_delim
 CMP!$CMP$ac_delim
-CP!$CP$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -34231,6 +34260,7 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+CP!$CP$ac_delim
 DATE!$DATE$ac_delim
 FIND!$FIND$ac_delim
 MKDIR!$MKDIR$ac_delim
@@ -34281,6 +34311,7 @@ MMAP_FILE!$MMAP_FILE$ac_delim
 LLVMCC1!$LLVMCC1$ac_delim
 LLVMCC1PLUS!$LLVMCC1PLUS$ac_delim
 LLVMGCCDIR!$LLVMGCCDIR$ac_delim
+LLVMGCCLIBEXEC!$LLVMGCCLIBEXEC$ac_delim
 LLVMGCC_VERSION!$LLVMGCC_VERSION$ac_delim
 LLVMGCC_MAJVERS!$LLVMGCC_MAJVERS$ac_delim
 SHLIBEXT!$SHLIBEXT$ac_delim
@@ -34298,7 +34329,7 @@ LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 65; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 67; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -34929,15 +34960,3 @@ echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
 fi
 
 
-if test "$llvm_cv_llvmgcc_sanity" = "no" ; then
- { echo "$as_me:$LINENO: WARNING: ***** llvm-gcc/llvm-g++ was not found, or does not appear to be " >&5
-echo "$as_me: WARNING: ***** llvm-gcc/llvm-g++ was not found, or does not appear to be " >&2;}
- { echo "$as_me:$LINENO: WARNING: ***** working. Please make sure you have llvm-gcc and llvm-g++ in" >&5
-echo "$as_me: WARNING: ***** working. Please make sure you have llvm-gcc and llvm-g++ in" >&2;}
- { echo "$as_me:$LINENO: WARNING: ***** your path before configuring LLVM. The runtime libraries" >&5
-echo "$as_me: WARNING: ***** your path before configuring LLVM. The runtime libraries" >&2;}
- { echo "$as_me:$LINENO: WARNING: ***** (llvm/runtime) will not be built but you should be able to" >&5
-echo "$as_me: WARNING: ***** (llvm/runtime) will not be built but you should be able to" >&2;}
- { echo "$as_me:$LINENO: WARNING: ***** build the llvm tools." >&5
-echo "$as_me: WARNING: ***** build the llvm tools." >&2;}
-fi