llvm.org GIT mirror llvm / 8c3d258
configure: Don't require a perl interpreter to be present, LLVM's buildsystem doesn't depend on perl anymore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152234 91177308-0d34-0410-b5e6-96231b3b80d8 Benjamin Kramer 7 years ago
8 changed file(s) with 4 addition(s) and 202 deletion(s). Raw diff Collapse all Expand all
174174 TAR := @TAR@
175175
176176 # Paths to miscellaneous programs we hope are present but might not be
177 PERL := @PERL@
178177 BZIP2 := @BZIP2@
179178 CAT := @CAT@
180179 DOT := @DOT@
193192 TCLSH := @TCLSH@
194193 ZIP := @ZIP@
195194
196 HAVE_PERL := @HAVE_PERL@
197195 HAVE_PTHREAD := @HAVE_PTHREAD@
198196
199197 LIBS := @LIBS@
10041004 [Define to path to xdot.py program if found or 'echo xdot.py' otherwise])
10051005 fi
10061006
1007 dnl Look for a sufficiently recent version of Perl.
1008 LLVM_PROG_PERL([5.006])
1009 AC_SUBST(PERL)
1010 if test x"$PERL" = xnone; then
1011 AC_SUBST(HAVE_PERL,0)
1012 AC_MSG_ERROR([perl is required but was not found, please install it])
1013 else
1014 AC_SUBST(HAVE_PERL,1)
1015 fi
1016
10171007 dnl Find the install program
10181008 AC_PROG_INSTALL
10191009 dnl Prepend src dir to install path dir if it's a relative path
+0
-16
autoconf/m4/path_perl.m4 less more
None 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
735735 GV
736736 DOTTY
737737 XDOT_PY
738 PERL
739 HAVE_PERL
740738 INSTALL_PROGRAM
741739 INSTALL_SCRIPT
742740 INSTALL_DATA
69046902
69056903 fi
69066904
6907
6908 # Extract the first word of "perl", so it can be a program name with args.
6909 set dummy perl; ac_word=$2
6910 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6911 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6912 if test "${ac_cv_path_PERL+set}" = set; then
6913 echo $ECHO_N "(cached) $ECHO_C" >&6
6914 else
6915 case $PERL in
6916 [\\/]* | ?:[\\/]*)
6917 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
6918 ;;
6919 *)
6920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6921 for as_dir in $PATH
6922 do
6923 IFS=$as_save_IFS
6924 test -z "$as_dir" && as_dir=.
6925 for ac_exec_ext in '' $ac_executable_extensions; do
6926 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
6927 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6928 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6929 break 2
6930 fi
6931 done
6932 done
6933 IFS=$as_save_IFS
6934
6935 test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="none"
6936 ;;
6937 esac
6938 fi
6939 PERL=$ac_cv_path_PERL
6940 if test -n "$PERL"; then
6941 { echo "$as_me:$LINENO: result: $PERL" >&5
6942 echo "${ECHO_T}$PERL" >&6; }
6943 else
6944 { echo "$as_me:$LINENO: result: no" >&5
6945 echo "${ECHO_T}no" >&6; }
6946 fi
6947
6948
6949 if test "$PERL" != "none"; then
6950 { echo "$as_me:$LINENO: checking for Perl 5.006 or newer" >&5
6951 echo $ECHO_N "checking for Perl 5.006 or newer... $ECHO_C" >&6; }
6952 if $PERL -e 'use 5.006;' 2>&1 > /dev/null; then
6953 { echo "$as_me:$LINENO: result: yes" >&5
6954 echo "${ECHO_T}yes" >&6; }
6955 else
6956 PERL=none
6957 { echo "$as_me:$LINENO: result: not found" >&5
6958 echo "${ECHO_T}not found" >&6; }
6959 fi
6960 fi
6961
6962
6963 if test x"$PERL" = xnone; then
6964 HAVE_PERL=0
6965
6966 { { echo "$as_me:$LINENO: error: perl is required but was not found, please install it" >&5
6967 echo "$as_me: error: perl is required but was not found, please install it" >&2;}
6968 { (exit 1); exit 1; }; }
6969 else
6970 HAVE_PERL=1
6971
6972 fi
6973
69746905 # Find a good install program. We prefer a C program (faster),
69756906 # so one script is as good as another. But avoid the broken or
69766907 # incompatible versions:
1046310394 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1046410395 lt_status=$lt_dlunknown
1046510396 cat > conftest.$ac_ext <
10466 #line 10467 "configure"
10397 #line 10398 "configure"
1046710398 #include "confdefs.h"
1046810399
1046910400 #if HAVE_DLFCN_H
2195121882 GV!$GV$ac_delim
2195221883 DOTTY!$DOTTY$ac_delim
2195321884 XDOT_PY!$XDOT_PY$ac_delim
21954 PERL!$PERL$ac_delim
21955 HAVE_PERL!$HAVE_PERL$ac_delim
2195621885 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
2195721886 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
2195821887 INSTALL_DATA!$INSTALL_DATA$ac_delim
2200821937 LTLIBOBJS!$LTLIBOBJS$ac_delim
2200921938 _ACEOF
2201021939
22011 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 92; then
21940 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 90; then
2201221941 break
2201321942 elif $ac_last_try; then
2201421943 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
142142 TAR := @TAR@
143143
144144 # Paths to miscellaneous programs we hope are present but might not be
145 PERL := @PERL@
146145 BZIP2 := @BZIP2@
147146 CAT := @CAT@
148147 DOT := @DOT@
161160 TCLSH := @TCLSH@
162161 ZIP := @ZIP@
163162
164 HAVE_PERL := @HAVE_PERL@
165163 HAVE_PTHREAD := @HAVE_PTHREAD@
166164
167165 LIBS := @LIBS@
908908 [Define to path to xdot.py program if found or 'echo xdot.py' otherwise])
909909 fi
910910
911 dnl Look for a sufficiently recent version of Perl.
912 LLVM_PROG_PERL([5.006])
913 AC_SUBST(PERL)
914 if test x"$PERL" = xnone; then
915 AC_SUBST(HAVE_PERL,0)
916 AC_MSG_ERROR([perl is required but was not found, please install it])
917 else
918 AC_SUBST(HAVE_PERL,1)
919 fi
920
921911 dnl Find the install program
922912 AC_PROG_INSTALL
923913 dnl Prepend src dir to install path dir if it's a relative path
+0
-16
projects/sample/autoconf/m4/path_perl.m4 less more
None 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
732732 GV
733733 DOTTY
734734 XDOT_PY
735 PERL
736 HAVE_PERL
737735 INSTALL_PROGRAM
738736 INSTALL_SCRIPT
739737 INSTALL_DATA
68066804
68076805 fi
68086806
6809
6810 # Extract the first word of "perl", so it can be a program name with args.
6811 set dummy perl; ac_word=$2
6812 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6813 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6814 if test "${ac_cv_path_PERL+set}" = set; then
6815 echo $ECHO_N "(cached) $ECHO_C" >&6
6816 else
6817 case $PERL in
6818 [\\/]* | ?:[\\/]*)
6819 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
6820 ;;
6821 *)
6822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6823 for as_dir in $PATH
6824 do
6825 IFS=$as_save_IFS
6826 test -z "$as_dir" && as_dir=.
6827 for ac_exec_ext in '' $ac_executable_extensions; do
6828 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
6829 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6830 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6831 break 2
6832 fi
6833 done
6834 done
6835 IFS=$as_save_IFS
6836
6837 test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="none"
6838 ;;
6839 esac
6840 fi
6841 PERL=$ac_cv_path_PERL
6842 if test -n "$PERL"; then
6843 { echo "$as_me:$LINENO: result: $PERL" >&5
6844 echo "${ECHO_T}$PERL" >&6; }
6845 else
6846 { echo "$as_me:$LINENO: result: no" >&5
6847 echo "${ECHO_T}no" >&6; }
6848 fi
6849
6850
6851 if test "$PERL" != "none"; then
6852 { echo "$as_me:$LINENO: checking for Perl 5.006 or newer" >&5
6853 echo $ECHO_N "checking for Perl 5.006 or newer... $ECHO_C" >&6; }
6854 if $PERL -e 'use 5.006;' 2>&1 > /dev/null; then
6855 { echo "$as_me:$LINENO: result: yes" >&5
6856 echo "${ECHO_T}yes" >&6; }
6857 else
6858 PERL=none
6859 { echo "$as_me:$LINENO: result: not found" >&5
6860 echo "${ECHO_T}not found" >&6; }
6861 fi
6862 fi
6863
6864
6865 if test x"$PERL" = xnone; then
6866 HAVE_PERL=0
6867
6868 { { echo "$as_me:$LINENO: error: perl is required but was not found, please install it" >&5
6869 echo "$as_me: error: perl is required but was not found, please install it" >&2;}
6870 { (exit 1); exit 1; }; }
6871 else
6872 HAVE_PERL=1
6873
6874 fi
6875
68766807 # Find a good install program. We prefer a C program (faster),
68776808 # so one script is as good as another. But avoid the broken or
68786809 # incompatible versions:
1036510296 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1036610297 lt_status=$lt_dlunknown
1036710298 cat > conftest.$ac_ext <
10368 #line 10369 "configure"
10299 #line 10300 "configure"
1036910300 #include "confdefs.h"
1037010301
1037110302 #if HAVE_DLFCN_H
2178921720 GV!$GV$ac_delim
2179021721 DOTTY!$DOTTY$ac_delim
2179121722 XDOT_PY!$XDOT_PY$ac_delim
21792 PERL!$PERL$ac_delim
21793 HAVE_PERL!$HAVE_PERL$ac_delim
2179421723 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
2179521724 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
2179621725 INSTALL_DATA!$INSTALL_DATA$ac_delim
2184621775 LTLIBOBJS!$LTLIBOBJS$ac_delim
2184721776 _ACEOF
2184821777
21849 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 91; then
21778 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then
2185021779 break
2185121780 elif $ac_last_try; then
2185221781 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5