llvm.org GIT mirror llvm / b195d9d
Update to llvm-config tool, by Erik Kidd: 1. Check for Perl and only build llvm-config if its available. 2. Add some virtual components 3. Don't depend on "standard" location for Perl, but configured location 4. Document the tool with a POD file. This version is now ready for testing by users. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27005 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 13 years ago
12 changed file(s) with 209 addition(s) and 77 deletion(s). Raw diff Collapse all Expand all
7676 E: kungfoomaster@nondot.org
7777 D: Support for packed types
7878
79 N: Eric Kidd
80 W: http://randomhacks.net/
81 D: llvm-config script
82
7983 N: Sumant Kowshik
8084 E: kowshik@uiuc.edu
8185 D: Author of the original C backend
136136 YACC := @YACC@
137137
138138 # Paths to miscellaneous programs we hope are present but might not be
139 PERL := @PERL@
139140 BZIP2 := @BZIP2@
140141 DOT := @DOT@
141142 DOXYGEN := @DOXYGEN@
149150 TCLSH := @TCLSH@
150151 ZIP := @ZIP@
151152
153 HAVE_PERL := @HAVE_PERL@
154
152155 LIBS := @LIBS@
153156
154157 # Path to location for LLVM C/C++ front-end. You can modify this if you
194197 #VERBOSE = 1
195198
196199 # Enable JIT for this platform
197 @JIT@
200 TARGET_HAS_JIT = @TARGET_HAS_JIT@
198201
199202 # Shared library extension for this platform.
200203 SHLIBEXT = @SHLIBEXT@
217217 AC_SUBST(JIT,[[]])
218218 else
219219 case "$llvm_cv_target_arch" in
220 x86) AC_SUBST(JIT,[[TARGET_HAS_JIT=1]]) ;;
221 Sparc) AC_SUBST(JIT,[[TARGET_HAS_JIT=1]]) ;;
222 PowerPC) AC_SUBST(JIT,[[TARGET_HAS_JIT=1]]) ;;
223 x86_64) AC_SUBST(JIT,[[]]) ;;
224 Alpha) AC_SUBST(JIT,[[TARGET_HAS_JIT=1]]) ;;
225 IA64) AC_SUBST(JIT,[[]]) ;;
226 *) AC_SUBST(JIT,[[]]) ;;
220 x86) AC_SUBST(TARGET_HAS_JIT,1) ;;
221 Sparc) AC_SUBST(TARGET_HAS_JIT,1) ;;
222 PowerPC) AC_SUBST(TARGET_HAS_JIT,1) ;;
223 x86_64) AC_SUBST(TARGET_HAS_JIT,0) ;;
224 Alpha) AC_SUBST(TARGET_HAS_JIT,1) ;;
225 IA64) AC_SUBST(TARGET_HAS_JIT,0) ;;
226 *) AC_SUBST(TARGET_HAS_JIT,0) ;;
227227 esac
228228 fi
229229
337337 [Define to path to gv program if found or 'echo gv' otherwise])
338338 fi
339339
340 dnl Look for a sufficiently recent version of Perl.
341 LLVM_PROG_PERL([5.006])
342 AC_SUBST(PERL)
343 if test x"$PERL" = xnone; then
344 AC_SUBST(HAVE_PERL,0)
345 else
346 AC_SUBST(HAVE_PERL,1)
347 fi
348
340349 dnl Find the install program
341350 AC_PROG_INSTALL
342351
0 dnl Check for a reasonable version of Perl.
1 dnl $1 - Minimum Perl version. Typically 5.006.
2 dnl
3 AC_DEFUN([LLVM_PROG_PERL], [
4 AC_PATH_PROG(PERL, [perl], [none])
5 if test "$PERL" != "none"; then
6 AC_MSG_CHECKING(for Perl $1 or newer)
7 if $PERL -e 'use $1;' 2>&1 > /dev/null; then
8 AC_MSG_RESULT(yes)
9 else
10 PERL=none
11 AC_MSG_RESULT(not found)
12 fi
13 fi
14 ])
15
475475 # include
476476 #endif"
477477
478 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS LLVM_COPYRIGHT subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS LLVM_ON_UNIX LLVM_ON_WIN32 ARCH ENDIAN CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT ENABLE_OPTIMIZED DEBUG_RUNTIME JIT ENABLE_DOXYGEN ENABLE_THREADS TARGETS_TO_BUILD CPP CXX CXXFLAGS ac_ct_CXX LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON ifGNUmake LN_S CMP CP DATE FIND GREP MKDIR MV RANLIB ac_ct_RANLIB RM SED TAR GRAPHVIZ GV INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA BZIP2 DOT DOXYGEN ETAGS GROFF GZIP POD2HTML POD2MAN RUNTEST TCLSH ZIP EGREP INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL ECHO AR ac_ct_AR STRIP ac_ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ETAGSFLAGS LLVMGCC LLVMGXX ALLOCA MMAP_FILE LLVMCC1 LLVMCC1PLUS LLVMGCCDIR SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLVM_INFODIR LLVM_MANDIR LLVM_CONFIGTIME LIBOBJS LTLIBOBJS'
478 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS LLVM_COPYRIGHT subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS LLVM_ON_UNIX LLVM_ON_WIN32 ARCH ENDIAN CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT ENABLE_OPTIMIZED DEBUG_RUNTIME JIT TARGET_HAS_JIT ENABLE_DOXYGEN ENABLE_THREADS TARGETS_TO_BUILD CPP CXX CXXFLAGS ac_ct_CXX LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON ifGNUmake LN_S CMP CP DATE FIND GREP MKDIR MV RANLIB ac_ct_RANLIB RM SED TAR GRAPHVIZ GV PERL HAVE_PERL INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA BZIP2 DOT DOXYGEN ETAGS GROFF GZIP POD2HTML POD2MAN RUNTEST TCLSH ZIP EGREP INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL ECHO AR ac_ct_AR STRIP ac_ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ETAGSFLAGS LLVMGCC LLVMGXX ALLOCA MMAP_FILE LLVMCC1 LLVMCC1PLUS LLVMGCCDIR SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLVM_INFODIR LLVM_MANDIR LLVM_CONFIGTIME LIBOBJS LTLIBOBJS'
479479 ac_subst_files=''
480480
481481 # Initialize some variables set by options.
30103010
30113011 else
30123012 case "$llvm_cv_target_arch" in
3013 x86) JIT=TARGET_HAS_JIT=1
3013 x86) TARGET_HAS_JIT=1
30143014 ;;
3015 Sparc) JIT=TARGET_HAS_JIT=1
3015 Sparc) TARGET_HAS_JIT=1
30163016 ;;
3017 PowerPC) JIT=TARGET_HAS_JIT=1
3017 PowerPC) TARGET_HAS_JIT=1
30183018 ;;
3019 x86_64) JIT=
3019 x86_64) TARGET_HAS_JIT=0
30203020 ;;
3021 Alpha) JIT=TARGET_HAS_JIT=1
3021 Alpha) TARGET_HAS_JIT=1
30223022 ;;
3023 IA64) JIT=
3023 IA64) TARGET_HAS_JIT=0
30243024 ;;
3025 *) JIT=
3025 *) TARGET_HAS_JIT=0
30263026 ;;
30273027 esac
30283028 fi
51985198 cat >>confdefs.h <<_ACEOF
51995199 #define LLVM_PATH_GV "$GV"
52005200 _ACEOF
5201
5202 fi
5203
5204
5205 # Extract the first word of "perl", so it can be a program name with args.
5206 set dummy perl; ac_word=$2
5207 echo "$as_me:$LINENO: checking for $ac_word" >&5
5208 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5209 if test "${ac_cv_path_PERL+set}" = set; then
5210 echo $ECHO_N "(cached) $ECHO_C" >&6
5211 else
5212 case $PERL in
5213 [\\/]* | ?:[\\/]*)
5214 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
5215 ;;
5216 *)
5217 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5218 for as_dir in $PATH
5219 do
5220 IFS=$as_save_IFS
5221 test -z "$as_dir" && as_dir=.
5222 for ac_exec_ext in '' $ac_executable_extensions; do
5223 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5224 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
5225 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5226 break 2
5227 fi
5228 done
5229 done
5230
5231 test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="none"
5232 ;;
5233 esac
5234 fi
5235 PERL=$ac_cv_path_PERL
5236
5237 if test -n "$PERL"; then
5238 echo "$as_me:$LINENO: result: $PERL" >&5
5239 echo "${ECHO_T}$PERL" >&6
5240 else
5241 echo "$as_me:$LINENO: result: no" >&5
5242 echo "${ECHO_T}no" >&6
5243 fi
5244
5245 if test "$PERL" != "none"; then
5246 echo "$as_me:$LINENO: checking for Perl 5.006 or newer" >&5
5247 echo $ECHO_N "checking for Perl 5.006 or newer... $ECHO_C" >&6
5248 if $PERL -e 'use 5.006;' 2>&1 > /dev/null; then
5249 echo "$as_me:$LINENO: result: yes" >&5
5250 echo "${ECHO_T}yes" >&6
5251 else
5252 PERL=none
5253 echo "$as_me:$LINENO: result: not found" >&5
5254 echo "${ECHO_T}not found" >&6
5255 fi
5256 fi
5257
5258
5259 if test x"$PERL" = xnone; then
5260 HAVE_PERL=0
5261
5262 else
5263 HAVE_PERL=1
52015264
52025265 fi
52035266
83758438 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
83768439 lt_status=$lt_dlunknown
83778440 cat > conftest.$ac_ext <
8378 #line 8379 "configure"
8441 #line 8442 "configure"
83798442 #include "confdefs.h"
83808443
83818444 #if HAVE_DLFCN_H
1036610429 ;;
1036710430 *-*-irix6*)
1036810431 # Find out which ABI we are using.
10369 echo '#line 10370 "configure"' > conftest.$ac_ext
10432 echo '#line 10433 "configure"' > conftest.$ac_ext
1037010433 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1037110434 (eval $ac_compile) 2>&5
1037210435 ac_status=$?
1085110914
1085210915
1085310916 # Provide some information about the compiler.
10854 echo "$as_me:10855:" \
10917 echo "$as_me:10918:" \
1085510918 "checking for Fortran 77 compiler version" >&5
1085610919 ac_compiler=`set X $ac_compile; echo $2`
1085710920 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5
1190811971 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1190911972 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1191011973 -e 's:$: $lt_compiler_flag:'`
11911 (eval echo "\"\$as_me:11912: $lt_compile\"" >&5)
11974 (eval echo "\"\$as_me:11975: $lt_compile\"" >&5)
1191211975 (eval "$lt_compile" 2>conftest.err)
1191311976 ac_status=$?
1191411977 cat conftest.err >&5
11915 echo "$as_me:11916: \$? = $ac_status" >&5
11978 echo "$as_me:11979: \$? = $ac_status" >&5
1191611979 if (exit $ac_status) && test -s "$ac_outfile"; then
1191711980 # The compiler can only warn and ignore the option if not recognized
1191811981 # So say no if there are warnings
1215112214 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1215212215 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1215312216 -e 's:$: $lt_compiler_flag:'`
12154 (eval echo "\"\$as_me:12155: $lt_compile\"" >&5)
12217 (eval echo "\"\$as_me:12218: $lt_compile\"" >&5)
1215512218 (eval "$lt_compile" 2>conftest.err)
1215612219 ac_status=$?
1215712220 cat conftest.err >&5
12158 echo "$as_me:12159: \$? = $ac_status" >&5
12221 echo "$as_me:12222: \$? = $ac_status" >&5
1215912222 if (exit $ac_status) && test -s "$ac_outfile"; then
1216012223 # The compiler can only warn and ignore the option if not recognized
1216112224 # So say no if there are warnings
1221112274 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1221212275 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1221312276 -e 's:$: $lt_compiler_flag:'`
12214 (eval echo "\"\$as_me:12215: $lt_compile\"" >&5)
12277 (eval echo "\"\$as_me:12278: $lt_compile\"" >&5)
1221512278 (eval "$lt_compile" 2>out/conftest.err)
1221612279 ac_status=$?
1221712280 cat out/conftest.err >&5
12218 echo "$as_me:12219: \$? = $ac_status" >&5
12281 echo "$as_me:12282: \$? = $ac_status" >&5
1221912282 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1222012283 then
1222112284 # The compiler can only warn and ignore the option if not recognized
1439614459 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1439714460 lt_status=$lt_dlunknown
1439814461 cat > conftest.$ac_ext <
14399 #line 14400 "configure"
14462 #line 14463 "configure"
1440014463 #include "confdefs.h"
1440114464
1440214465 #if HAVE_DLFCN_H
1449414557 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1449514558 lt_status=$lt_dlunknown
1449614559 cat > conftest.$ac_ext <
14497 #line 14498 "configure"
14560 #line 14561 "configure"
1449814561 #include "confdefs.h"
1449914562
1450014563 #if HAVE_DLFCN_H
1668716750 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1668816751 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1668916752 -e 's:$: $lt_compiler_flag:'`
16690 (eval echo "\"\$as_me:16691: $lt_compile\"" >&5)
16753 (eval echo "\"\$as_me:16754: $lt_compile\"" >&5)
1669116754 (eval "$lt_compile" 2>conftest.err)
1669216755 ac_status=$?
1669316756 cat conftest.err >&5
16694 echo "$as_me:16695: \$? = $ac_status" >&5
16757 echo "$as_me:16758: \$? = $ac_status" >&5
1669516758 if (exit $ac_status) && test -s "$ac_outfile"; then
1669616759 # The compiler can only warn and ignore the option if not recognized
1669716760 # So say no if there are warnings
1674716810 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1674816811 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1674916812 -e 's:$: $lt_compiler_flag:'`
16750 (eval echo "\"\$as_me:16751: $lt_compile\"" >&5)
16813 (eval echo "\"\$as_me:16814: $lt_compile\"" >&5)
1675116814 (eval "$lt_compile" 2>out/conftest.err)
1675216815 ac_status=$?
1675316816 cat out/conftest.err >&5
16754 echo "$as_me:16755: \$? = $ac_status" >&5
16817 echo "$as_me:16818: \$? = $ac_status" >&5
1675516818 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1675616819 then
1675716820 # The compiler can only warn and ignore the option if not recognized
1810818171 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1810918172 lt_status=$lt_dlunknown
1811018173 cat > conftest.$ac_ext <
18111 #line 18112 "configure"
18174 #line 18175 "configure"
1811218175 #include "confdefs.h"
1811318176
1811418177 #if HAVE_DLFCN_H
1820618269 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1820718270 lt_status=$lt_dlunknown
1820818271 cat > conftest.$ac_ext <
18209 #line 18210 "configure"
18272 #line 18273 "configure"
1821018273 #include "confdefs.h"
1821118274
1821218275 #if HAVE_DLFCN_H
1904319106 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1904419107 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1904519108 -e 's:$: $lt_compiler_flag:'`
19046 (eval echo "\"\$as_me:19047: $lt_compile\"" >&5)
19109 (eval echo "\"\$as_me:19110: $lt_compile\"" >&5)
1904719110 (eval "$lt_compile" 2>conftest.err)
1904819111 ac_status=$?
1904919112 cat conftest.err >&5
19050 echo "$as_me:19051: \$? = $ac_status" >&5
19113 echo "$as_me:19114: \$? = $ac_status" >&5
1905119114 if (exit $ac_status) && test -s "$ac_outfile"; then
1905219115 # The compiler can only warn and ignore the option if not recognized
1905319116 # So say no if there are warnings
1910319166 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1910419167 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1910519168 -e 's:$: $lt_compiler_flag:'`
19106 (eval echo "\"\$as_me:19107: $lt_compile\"" >&5)
19169 (eval echo "\"\$as_me:19170: $lt_compile\"" >&5)
1910719170 (eval "$lt_compile" 2>out/conftest.err)
1910819171 ac_status=$?
1910919172 cat out/conftest.err >&5
19110 echo "$as_me:19111: \$? = $ac_status" >&5
19173 echo "$as_me:19174: \$? = $ac_status" >&5
1911119174 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1911219175 then
1911319176 # The compiler can only warn and ignore the option if not recognized
2114221205 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
2114321206 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2114421207 -e 's:$: $lt_compiler_flag:'`
21145 (eval echo "\"\$as_me:21146: $lt_compile\"" >&5)
21208 (eval echo "\"\$as_me:21209: $lt_compile\"" >&5)
2114621209 (eval "$lt_compile" 2>conftest.err)
2114721210 ac_status=$?
2114821211 cat conftest.err >&5
21149 echo "$as_me:21150: \$? = $ac_status" >&5
21212 echo "$as_me:21213: \$? = $ac_status" >&5
2115021213 if (exit $ac_status) && test -s "$ac_outfile"; then
2115121214 # The compiler can only warn and ignore the option if not recognized
2115221215 # So say no if there are warnings
2138521448 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
2138621449 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2138721450 -e 's:$: $lt_compiler_flag:'`
21388 (eval echo "\"\$as_me:21389: $lt_compile\"" >&5)
21451 (eval echo "\"\$as_me:21452: $lt_compile\"" >&5)
2138921452 (eval "$lt_compile" 2>conftest.err)
2139021453 ac_status=$?
2139121454 cat conftest.err >&5
21392 echo "$as_me:21393: \$? = $ac_status" >&5
21455 echo "$as_me:21456: \$? = $ac_status" >&5
2139321456 if (exit $ac_status) && test -s "$ac_outfile"; then
2139421457 # The compiler can only warn and ignore the option if not recognized
2139521458 # So say no if there are warnings
2144521508 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
2144621509 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2144721510 -e 's:$: $lt_compiler_flag:'`
21448 (eval echo "\"\$as_me:21449: $lt_compile\"" >&5)
21511 (eval echo "\"\$as_me:21512: $lt_compile\"" >&5)
2144921512 (eval "$lt_compile" 2>out/conftest.err)
2145021513 ac_status=$?
2145121514 cat out/conftest.err >&5
21452 echo "$as_me:21453: \$? = $ac_status" >&5
21515 echo "$as_me:21516: \$? = $ac_status" >&5
2145321516 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2145421517 then
2145521518 # The compiler can only warn and ignore the option if not recognized
2363023693 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2363123694 lt_status=$lt_dlunknown
2363223695 cat > conftest.$ac_ext <
23633 #line 23634 "configure"
23696 #line 23697 "configure"
2363423697 #include "confdefs.h"
2363523698
2363623699 #if HAVE_DLFCN_H
2372823791 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2372923792 lt_status=$lt_dlunknown
2373023793 cat > conftest.$ac_ext <
23731 #line 23732 "configure"
23794 #line 23795 "configure"
2373223795 #include "confdefs.h"
2373323796
2373423797 #if HAVE_DLFCN_H
3145031513 s,@ENABLE_OPTIMIZED@,$ENABLE_OPTIMIZED,;t t
3145131514 s,@DEBUG_RUNTIME@,$DEBUG_RUNTIME,;t t
3145231515 s,@JIT@,$JIT,;t t
31516 s,@TARGET_HAS_JIT@,$TARGET_HAS_JIT,;t t
3145331517 s,@ENABLE_DOXYGEN@,$ENABLE_DOXYGEN,;t t
3145431518 s,@ENABLE_THREADS@,$ENABLE_THREADS,;t t
3145531519 s,@TARGETS_TO_BUILD@,$TARGETS_TO_BUILD,;t t
3147931543 s,@TAR@,$TAR,;t t
3148031544 s,@GRAPHVIZ@,$GRAPHVIZ,;t t
3148131545 s,@GV@,$GV,;t t
31546 s,@PERL@,$PERL,;t t
31547 s,@HAVE_PERL@,$HAVE_PERL,;t t
3148231548 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
3148331549 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
3148431550 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
88
99 LEVEL = ../..
1010
11 EXTRA_DIST = LibDeps.txt llvm-config.in.in find-cycles.pl
1112
1213 include $(LEVEL)/Makefile.common
1314
3132 # don't have to process them at runtime.
3233 FinalLibDeps.txt: find-cycles.pl # LibDeps.txt deliberately omitted.
3334 $(Echo) "Finding cyclic dependencies between LLVM libraries."
34 $(Verb) $< < $(PROJ_SRC_DIR)/LibDeps.txt > $@
35 $(Verb) $(PERL) $< < $(PROJ_SRC_DIR)/LibDeps.txt > $@
3536
3637 # Rerun our configure substitutions as needed.
3738 llvm-config.in: llvm-config.in.in $(ConfigStatusScript)
1717 # This file was written by Eric Kidd, and is placed into the public domain.
1818 #
1919
20 use 5.006;
2021 use strict;
2122 use warnings;
2223
None #!/usr/bin/perl
0 #!@PERL@
11 #
22 # Program: llvm-config
33 #
99 # This file was written by Eric Kidd, and is placed into the public domain.
1010 #
1111
12 use 5.006;
1213 use strict;
1314 use warnings;
1415
1920 my $INCLUDEDIR = q{@LLVM_INCLUDEDIR@};
2021 my $LIBDIR = q{@LLVM_LIBDIR@};
2122 my $ARCH = lc(q{@ARCH@});
23 my $TARGET_HAS_JIT = q{@TARGET_HAS_JIT@};
2224 my @TARGETS_BUILT = map { lc($_) } qw{@TARGETS_TO_BUILD@};
2325 #---- end autoconf values ----
2426
105107 LLVM. Typically called from 'configure' scripts. Examples:
106108 llvm-config --cxxflags
107109 llvm-config --ldflags
108 llvm-config --libs jitplus
110 llvm-config --libs engine bcreader scalaropts
109111
110112 Options:
111113 --version LLVM version.
121123 --targets-built List of all targets currently built.
122124 Typical components:
123125 all All LLVM libraries (default).
124 native A native-code backend for this platform, if any.
125 jitplus All libraries needed to use the LLVM JIT examples.
126 backend Either a native backend or the C backend.
127 engine Either a native JIT or a bytecode interpreter.
126128 __EOD__
127129 exit(1);
128130 }
162164
163165 sub load_dependencies;
164166 sub build_name_map;
165 sub find_native_platform;
167 sub have_native_backend;
168 sub find_best_engine;
166169 sub expand_names (@);
167170 sub find_all_required_sets (@);
168171 sub find_all_required_sets_helper ($$@);
230233 }
231234
232235 # Add virtual entries.
233 $NAME_MAP{'native'} = find_native_platform;
234 $NAME_MAP{'jitplus'} = ['native', 'jit', 'bcreader', 'scalaropts'];
235 $NAME_MAP{'all'} = [name_map_entries]; # Must be last.
236 }
237
238 # Figure our what native platform we should use, if any.
239 sub find_native_platform {
236 $NAME_MAP{'native'} = have_native_backend() ? [$ARCH] : [];
237 $NAME_MAP{'backend'} = have_native_backend() ? ['native'] : ['cbackend'];
238 $NAME_MAP{'engine'} = find_best_engine;
239 $NAME_MAP{'all'} = [name_map_entries]; # Must be last.
240 }
241
242 # Return true if we have a native backend to use.
243 sub have_native_backend {
240244 my %BUILT;
241245 foreach my $target (@TARGETS_BUILT) { $BUILT{$target} = 1; }
242 if (defined $NAME_MAP{$ARCH} && defined $BUILT{$ARCH}) {
243 return [$ARCH];
246 return defined $NAME_MAP{$ARCH} && defined $BUILT{$ARCH};
247 }
248
249 # Find a working subclass of ExecutionEngine for this platform.
250 sub find_best_engine {
251 if (have_native_backend && $TARGET_HAS_JIT) {
252 # XXX - Right now, if we omit the interpreter, we get a linker
253 # error complaining about
254 # __ZN4llvm11Interpreter6createEPNS_6ModuleEPNS_17IntrinsicLoweringE.
255 # This needs investigation.
256 return ['jit', 'native', 'interpreter'];
244257 } else {
245 return [];
258 return ['interpreter'];
246259 }
247260 }
248261
1616
1717 include $(LEVEL)/Makefile.common
1818
19 # Only include llvm-config if we have Perl to build it with.
20 ifeq ($(HAVE_PERL),1)
21 DIRS += llvm-config
22 endif
88
99 LEVEL = ../..
1010
11 EXTRA_DIST = LibDeps.txt llvm-config.in.in find-cycles.pl
1112
1213 include $(LEVEL)/Makefile.common
1314
3132 # don't have to process them at runtime.
3233 FinalLibDeps.txt: find-cycles.pl # LibDeps.txt deliberately omitted.
3334 $(Echo) "Finding cyclic dependencies between LLVM libraries."
34 $(Verb) $< < $(PROJ_SRC_DIR)/LibDeps.txt > $@
35 $(Verb) $(PERL) $< < $(PROJ_SRC_DIR)/LibDeps.txt > $@
3536
3637 # Rerun our configure substitutions as needed.
3738 llvm-config.in: llvm-config.in.in $(ConfigStatusScript)
1717 # This file was written by Eric Kidd, and is placed into the public domain.
1818 #
1919
20 use 5.006;
2021 use strict;
2122 use warnings;
2223
None #!/usr/bin/perl
0 #!@PERL@
11 #
22 # Program: llvm-config
33 #
99 # This file was written by Eric Kidd, and is placed into the public domain.
1010 #
1111
12 use 5.006;
1213 use strict;
1314 use warnings;
1415
1920 my $INCLUDEDIR = q{@LLVM_INCLUDEDIR@};
2021 my $LIBDIR = q{@LLVM_LIBDIR@};
2122 my $ARCH = lc(q{@ARCH@});
23 my $TARGET_HAS_JIT = q{@TARGET_HAS_JIT@};
2224 my @TARGETS_BUILT = map { lc($_) } qw{@TARGETS_TO_BUILD@};
2325 #---- end autoconf values ----
2426
105107 LLVM. Typically called from 'configure' scripts. Examples:
106108 llvm-config --cxxflags
107109 llvm-config --ldflags
108 llvm-config --libs jitplus
110 llvm-config --libs engine bcreader scalaropts
109111
110112 Options:
111113 --version LLVM version.
121123 --targets-built List of all targets currently built.
122124 Typical components:
123125 all All LLVM libraries (default).
124 native A native-code backend for this platform, if any.
125 jitplus All libraries needed to use the LLVM JIT examples.
126 backend Either a native backend or the C backend.
127 engine Either a native JIT or a bytecode interpreter.
126128 __EOD__
127129 exit(1);
128130 }
162164
163165 sub load_dependencies;
164166 sub build_name_map;
165 sub find_native_platform;
167 sub have_native_backend;
168 sub find_best_engine;
166169 sub expand_names (@);
167170 sub find_all_required_sets (@);
168171 sub find_all_required_sets_helper ($$@);
230233 }
231234
232235 # Add virtual entries.
233 $NAME_MAP{'native'} = find_native_platform;
234 $NAME_MAP{'jitplus'} = ['native', 'jit', 'bcreader', 'scalaropts'];
235 $NAME_MAP{'all'} = [name_map_entries]; # Must be last.
236 }
237
238 # Figure our what native platform we should use, if any.
239 sub find_native_platform {
236 $NAME_MAP{'native'} = have_native_backend() ? [$ARCH] : [];
237 $NAME_MAP{'backend'} = have_native_backend() ? ['native'] : ['cbackend'];
238 $NAME_MAP{'engine'} = find_best_engine;
239 $NAME_MAP{'all'} = [name_map_entries]; # Must be last.
240 }
241
242 # Return true if we have a native backend to use.
243 sub have_native_backend {
240244 my %BUILT;
241245 foreach my $target (@TARGETS_BUILT) { $BUILT{$target} = 1; }
242 if (defined $NAME_MAP{$ARCH} && defined $BUILT{$ARCH}) {
243 return [$ARCH];
246 return defined $NAME_MAP{$ARCH} && defined $BUILT{$ARCH};
247 }
248
249 # Find a working subclass of ExecutionEngine for this platform.
250 sub find_best_engine {
251 if (have_native_backend && $TARGET_HAS_JIT) {
252 # XXX - Right now, if we omit the interpreter, we get a linker
253 # error complaining about
254 # __ZN4llvm11Interpreter6createEPNS_6ModuleEPNS_17IntrinsicLoweringE.
255 # This needs investigation.
256 return ['jit', 'native', 'interpreter'];
244257 } else {
245 return [];
258 return ['interpreter'];
246259 }
247260 }
248261