llvm.org GIT mirror llvm / 5d28b88
Add --with-llvmgcc= and --with-llvmgxx= configure options. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44586 91177308-0d34-0410-b5e6-96231b3b80d8 Devang Patel 11 years ago
2 changed file(s) with 90 addition(s) and 28 deletion(s). Raw diff Collapse all Expand all
420420 *) AC_MSG_ERROR([Invalid path for --with-llvmgccdir. Provide full path]) ;;
421421 esac
422422
423 dnl Allow a specific llvm-gcc compiler to be used with this LLVM config.
424 AC_ARG_WITH(llvmgcc,
425 AS_HELP_STRING([--with-llvmgcc],
426 [Specify location of llvm-gcc driver (default searches PATH)]),
427 LLVMGCC=$with_llvmgcc
428 WITH_LLVMGCCDIR="",)
429
430 dnl Allow a specific llvm-g++ compiler to be used with this LLVM config.
431 AC_ARG_WITH(llvmgxx,
432 AS_HELP_STRING([--with-llvmgxx],
433 [Specify location of llvm-g++ driver (default searches PATH)]),
434 LLVMGXX=$with_llvmgxx
435 WITH_LLVMGCCDIR="",)
436
437 if test -n "$LLVMGCC" && test -z "$LLVMGXX"; then
438 AC_MSG_ERROR([Invalid llvm-g++. Use --with-llvmgxx when --with-llvmgcc is used]);
439 fi
440
441 if test -n "$LLVMGXX" && test -z "$LLVMGCC"; then
442 AC_MSG_ERROR([Invalid llvm-gcc. Use --with-llvmgcc when --with-llvmgxx is used]);
443 fi
444
423445 dnl Specify extra build options
424446 AC_ARG_WITH(extra-options,
425447 AS_HELP_STRING([--with-extra-options],
588610 AC_PATH_PROG(LLVMGCC, $LLVMGCC, [])
589611 AC_PATH_PROG(LLVMGXX, $LLVMGXX, [])
590612 else
591 LLVMGCC="$WITH_LLVMGCCDIR/bin/llvm-gcc${EXEEXT}"
592 LLVMGXX="$WITH_LLVMGCCDIR/bin/llvm-g++${EXEEXT}"
613 if test -z "$LLVMGCC"; then
614 LLVMGCC="$WITH_LLVMGCCDIR/bin/llvm-gcc${EXEEXT}"
615 fi
616 if test -z "$LLVMGXX"; then
617 LLVMGXX="$WITH_LLVMGCCDIR/bin/llvm-g++${EXEEXT}"
618 fi
593619 AC_SUBST(LLVMGCC,$LLVMGCC)
594620 AC_SUBST(LLVMGXX,$LLVMGXX)
595621 fi
15611561 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
15621562 --with-llvmgccdir Specify location of llvm-gcc install dir (default
15631563 searches PATH)
1564 --with-llvmgcc Specify location of llvm-gcc driver (default
1565 searches PATH)
1566 --with-llvmgxx Specify location of llvm-g++ driver (default
1567 searches PATH)
15641568 --with-extra-options Specify addtional options to compile LLVM with
15651569 --with-ocaml-libdir Specify install location for ocaml bindings (default
15661570 is stdlib)
48154819 esac
48164820
48174821
4822 # Check whether --with-llvmgcc was given.
4823 if test "${with_llvmgcc+set}" = set; then
4824 withval=$with_llvmgcc; LLVMGCC=$with_llvmgcc
4825 WITH_LLVMGCCDIR=""
4826 fi
4827
4828
4829
4830 # Check whether --with-llvmgxx was given.
4831 if test "${with_llvmgxx+set}" = set; then
4832 withval=$with_llvmgxx; LLVMGXX=$with_llvmgxx
4833 WITH_LLVMGCCDIR=""
4834 fi
4835
4836
4837 if test -n "$LLVMGCC" && test -z "$LLVMGXX"; then
4838 { { echo "$as_me:$LINENO: error: Invalid llvm-g++. Use --with-llvmgxx when --with-llvmgcc is used" >&5
4839 echo "$as_me: error: Invalid llvm-g++. Use --with-llvmgxx when --with-llvmgcc is used" >&2;}
4840 { (exit 1); exit 1; }; };
4841 fi
4842
4843 if test -n "$LLVMGXX" && test -z "$LLVMGCC"; then
4844 { { echo "$as_me:$LINENO: error: Invalid llvm-gcc. Use --with-llvmgcc when --with-llvmgxx is used" >&5
4845 echo "$as_me: error: Invalid llvm-gcc. Use --with-llvmgcc when --with-llvmgxx is used" >&2;}
4846 { (exit 1); exit 1; }; };
4847 fi
4848
4849
48184850 # Check whether --with-extra-options was given.
48194851 if test "${with_extra_options+set}" = set; then
48204852 withval=$with_extra_options;
1054410576 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1054510577 lt_status=$lt_dlunknown
1054610578 cat > conftest.$ac_ext <
10547 #line 10548 "configure"
10579 #line 10580 "configure"
1054810580 #include "confdefs.h"
1054910581
1055010582 #if HAVE_DLFCN_H
1268812720 ;;
1268912721 *-*-irix6*)
1269012722 # Find out which ABI we are using.
12691 echo '#line 12692 "configure"' > conftest.$ac_ext
12723 echo '#line 12724 "configure"' > conftest.$ac_ext
1269212724 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1269312725 (eval $ac_compile) 2>&5
1269412726 ac_status=$?
1440614438 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1440714439 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1440814440 -e 's:$: $lt_compiler_flag:'`
14409 (eval echo "\"\$as_me:14410: $lt_compile\"" >&5)
14441 (eval echo "\"\$as_me:14442: $lt_compile\"" >&5)
1441014442 (eval "$lt_compile" 2>conftest.err)
1441114443 ac_status=$?
1441214444 cat conftest.err >&5
14413 echo "$as_me:14414: \$? = $ac_status" >&5
14445 echo "$as_me:14446: \$? = $ac_status" >&5
1441414446 if (exit $ac_status) && test -s "$ac_outfile"; then
1441514447 # The compiler can only warn and ignore the option if not recognized
1441614448 # So say no if there are warnings other than the usual output.
1467414706 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1467514707 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1467614708 -e 's:$: $lt_compiler_flag:'`
14677 (eval echo "\"\$as_me:14678: $lt_compile\"" >&5)
14709 (eval echo "\"\$as_me:14710: $lt_compile\"" >&5)
1467814710 (eval "$lt_compile" 2>conftest.err)
1467914711 ac_status=$?
1468014712 cat conftest.err >&5
14681 echo "$as_me:14682: \$? = $ac_status" >&5
14713 echo "$as_me:14714: \$? = $ac_status" >&5
1468214714 if (exit $ac_status) && test -s "$ac_outfile"; then
1468314715 # The compiler can only warn and ignore the option if not recognized
1468414716 # So say no if there are warnings other than the usual output.
1477814810 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1477914811 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1478014812 -e 's:$: $lt_compiler_flag:'`
14781 (eval echo "\"\$as_me:14782: $lt_compile\"" >&5)
14813 (eval echo "\"\$as_me:14814: $lt_compile\"" >&5)
1478214814 (eval "$lt_compile" 2>out/conftest.err)
1478314815 ac_status=$?
1478414816 cat out/conftest.err >&5
14785 echo "$as_me:14786: \$? = $ac_status" >&5
14817 echo "$as_me:14818: \$? = $ac_status" >&5
1478614818 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1478714819 then
1478814820 # The compiler can only warn and ignore the option if not recognized
1723017262 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1723117263 lt_status=$lt_dlunknown
1723217264 cat > conftest.$ac_ext <
17233 #line 17234 "configure"
17265 #line 17266 "configure"
1723417266 #include "confdefs.h"
1723517267
1723617268 #if HAVE_DLFCN_H
1733017362 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1733117363 lt_status=$lt_dlunknown
1733217364 cat > conftest.$ac_ext <
17333 #line 17334 "configure"
17365 #line 17366 "configure"
1733417366 #include "confdefs.h"
1733517367
1733617368 #if HAVE_DLFCN_H
1969819730 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1969919731 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1970019732 -e 's:$: $lt_compiler_flag:'`
19701 (eval echo "\"\$as_me:19702: $lt_compile\"" >&5)
19733 (eval echo "\"\$as_me:19734: $lt_compile\"" >&5)
1970219734 (eval "$lt_compile" 2>conftest.err)
1970319735 ac_status=$?
1970419736 cat conftest.err >&5
19705 echo "$as_me:19706: \$? = $ac_status" >&5
19737 echo "$as_me:19738: \$? = $ac_status" >&5
1970619738 if (exit $ac_status) && test -s "$ac_outfile"; then
1970719739 # The compiler can only warn and ignore the option if not recognized
1970819740 # So say no if there are warnings other than the usual output.
1980219834 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1980319835 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1980419836 -e 's:$: $lt_compiler_flag:'`
19805 (eval echo "\"\$as_me:19806: $lt_compile\"" >&5)
19837 (eval echo "\"\$as_me:19838: $lt_compile\"" >&5)
1980619838 (eval "$lt_compile" 2>out/conftest.err)
1980719839 ac_status=$?
1980819840 cat out/conftest.err >&5
19809 echo "$as_me:19810: \$? = $ac_status" >&5
19841 echo "$as_me:19842: \$? = $ac_status" >&5
1981019842 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1981119843 then
1981219844 # The compiler can only warn and ignore the option if not recognized
2137221404 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2137321405 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2137421406 -e 's:$: $lt_compiler_flag:'`
21375 (eval echo "\"\$as_me:21376: $lt_compile\"" >&5)
21407 (eval echo "\"\$as_me:21408: $lt_compile\"" >&5)
2137621408 (eval "$lt_compile" 2>conftest.err)
2137721409 ac_status=$?
2137821410 cat conftest.err >&5
21379 echo "$as_me:21380: \$? = $ac_status" >&5
21411 echo "$as_me:21412: \$? = $ac_status" >&5
2138021412 if (exit $ac_status) && test -s "$ac_outfile"; then
2138121413 # The compiler can only warn and ignore the option if not recognized
2138221414 # So say no if there are warnings other than the usual output.
2147621508 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2147721509 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2147821510 -e 's:$: $lt_compiler_flag:'`
21479 (eval echo "\"\$as_me:21480: $lt_compile\"" >&5)
21511 (eval echo "\"\$as_me:21512: $lt_compile\"" >&5)
2148021512 (eval "$lt_compile" 2>out/conftest.err)
2148121513 ac_status=$?
2148221514 cat out/conftest.err >&5
21483 echo "$as_me:21484: \$? = $ac_status" >&5
21515 echo "$as_me:21516: \$? = $ac_status" >&5
2148421516 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2148521517 then
2148621518 # The compiler can only warn and ignore the option if not recognized
2371123743 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2371223744 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2371323745 -e 's:$: $lt_compiler_flag:'`
23714 (eval echo "\"\$as_me:23715: $lt_compile\"" >&5)
23746 (eval echo "\"\$as_me:23747: $lt_compile\"" >&5)
2371523747 (eval "$lt_compile" 2>conftest.err)
2371623748 ac_status=$?
2371723749 cat conftest.err >&5
23718 echo "$as_me:23719: \$? = $ac_status" >&5
23750 echo "$as_me:23751: \$? = $ac_status" >&5
2371923751 if (exit $ac_status) && test -s "$ac_outfile"; then
2372023752 # The compiler can only warn and ignore the option if not recognized
2372123753 # So say no if there are warnings other than the usual output.
2397924011 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2398024012 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2398124013 -e 's:$: $lt_compiler_flag:'`
23982 (eval echo "\"\$as_me:23983: $lt_compile\"" >&5)
24014 (eval echo "\"\$as_me:24015: $lt_compile\"" >&5)
2398324015 (eval "$lt_compile" 2>conftest.err)
2398424016 ac_status=$?
2398524017 cat conftest.err >&5
23986 echo "$as_me:23987: \$? = $ac_status" >&5
24018 echo "$as_me:24019: \$? = $ac_status" >&5
2398724019 if (exit $ac_status) && test -s "$ac_outfile"; then
2398824020 # The compiler can only warn and ignore the option if not recognized
2398924021 # So say no if there are warnings other than the usual output.
2408324115 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2408424116 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2408524117 -e 's:$: $lt_compiler_flag:'`
24086 (eval echo "\"\$as_me:24087: $lt_compile\"" >&5)
24118 (eval echo "\"\$as_me:24119: $lt_compile\"" >&5)
2408724119 (eval "$lt_compile" 2>out/conftest.err)
2408824120 ac_status=$?
2408924121 cat out/conftest.err >&5
24090 echo "$as_me:24091: \$? = $ac_status" >&5
24122 echo "$as_me:24123: \$? = $ac_status" >&5
2409124123 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2409224124 then
2409324125 # The compiler can only warn and ignore the option if not recognized
2687526907
2687626908
2687726909 else
26878 LLVMGCC="$WITH_LLVMGCCDIR/bin/llvm-gcc${EXEEXT}"
26879 LLVMGXX="$WITH_LLVMGCCDIR/bin/llvm-g++${EXEEXT}"
26910 if test -z "$LLVMGCC"; then
26911 LLVMGCC="$WITH_LLVMGCCDIR/bin/llvm-gcc${EXEEXT}"
26912 fi
26913 if test -z "$LLVMGXX"; then
26914 LLVMGXX="$WITH_LLVMGCCDIR/bin/llvm-g++${EXEEXT}"
26915 fi
2688026916 LLVMGCC=$LLVMGCC
2688126917
2688226918 LLVMGXX=$LLVMGXX