diff options
Diffstat (limited to 'llvm/projects/sample/autoconf/m4')
20 files changed, 0 insertions, 631 deletions
diff --git a/llvm/projects/sample/autoconf/m4/build_exeext.m4 b/llvm/projects/sample/autoconf/m4/build_exeext.m4 deleted file mode 100644 index 1bdecc1ba57..00000000000 --- a/llvm/projects/sample/autoconf/m4/build_exeext.m4 +++ /dev/null @@ -1,42 +0,0 @@ -# Check for the extension used for executables on build platform. -# This is necessary for cross-compiling where the build platform -# may differ from the host platform. -AC_DEFUN([AC_BUILD_EXEEXT], -[ -AC_MSG_CHECKING([for executable suffix on build platform]) -AC_CACHE_VAL(ac_cv_build_exeext, -[if test "$CYGWIN" = yes || test "$MINGW32" = yes; then - ac_cv_build_exeext=.exe -else - ac_build_prefix=${build_alias}- - - AC_CHECK_PROG(BUILD_CC, ${ac_build_prefix}gcc, ${ac_build_prefix}gcc) - if test -z "$BUILD_CC"; then - AC_CHECK_PROG(BUILD_CC, gcc, gcc) - if test -z "$BUILD_CC"; then - AC_CHECK_PROG(BUILD_CC, cc, cc, , , /usr/ucb/cc) - fi - fi - test -z "$BUILD_CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) - ac_build_link='${BUILD_CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AS_MESSAGE_LOG_FD' - rm -f conftest* - echo 'int main () { return 0; }' > conftest.$ac_ext - ac_cv_build_exeext= - if AC_TRY_EVAL(ac_build_link); then - for file in conftest.*; do - case $file in - *.c | *.o | *.obj | *.dSYM) ;; - *) ac_cv_build_exeext=`echo $file | sed -e s/conftest//` ;; - esac - done - else - AC_MSG_ERROR([installation or configuration problem: compiler cannot create executables.]) - fi - rm -f conftest* - test x"${ac_cv_build_exeext}" = x && ac_cv_build_exeext=blank -fi]) -BUILD_EXEEXT="" -test x"${ac_cv_build_exeext}" != xblank && BUILD_EXEEXT=${ac_cv_build_exeext} -AC_MSG_RESULT(${ac_cv_build_exeext}) -ac_build_exeext=$BUILD_EXEEXT -AC_SUBST(BUILD_EXEEXT)]) diff --git a/llvm/projects/sample/autoconf/m4/c_printf_a.m4 b/llvm/projects/sample/autoconf/m4/c_printf_a.m4 deleted file mode 100644 index 61bac8c9dd1..00000000000 --- a/llvm/projects/sample/autoconf/m4/c_printf_a.m4 +++ /dev/null @@ -1,31 +0,0 @@ -# -# Determine if the printf() functions have the %a format character. -# This is modified from: -# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_slist.html -AC_DEFUN([AC_C_PRINTF_A], -[AC_CACHE_CHECK([if printf has the %a format character],[llvm_cv_c_printf_a], -[AC_LANG_PUSH([C]) - AC_RUN_IFELSE([ - AC_LANG_PROGRAM([[ -#include <stdio.h> -#include <stdlib.h> -]],[[ -volatile double A, B; -char Buffer[100]; -A = 1; -A /= 10.0; -sprintf(Buffer, "%a", A); -B = atof(Buffer); -if (A != B) - return (1); -if (A != 0x1.999999999999ap-4) - return (1); -return (0);]])], - llvm_cv_c_printf_a=yes, - llvmac_cv_c_printf_a=no, - llvmac_cv_c_printf_a=no) - AC_LANG_POP([C])]) - if test "$llvm_cv_c_printf_a" = "yes"; then - AC_DEFINE([HAVE_PRINTF_A],[1],[Define to have the %a format string]) - fi -]) diff --git a/llvm/projects/sample/autoconf/m4/check_gnu_make.m4 b/llvm/projects/sample/autoconf/m4/check_gnu_make.m4 deleted file mode 100644 index 7355e1c85bb..00000000000 --- a/llvm/projects/sample/autoconf/m4/check_gnu_make.m4 +++ /dev/null @@ -1,26 +0,0 @@ -# -# Check for GNU Make. This is originally from -# http://www.gnu.org/software/ac-archive/htmldoc/check_gnu_make.html -# -AC_DEFUN([AC_CHECK_GNU_MAKE], -[AC_CACHE_CHECK([for GNU make],[llvm_cv_gnu_make_command], -dnl Search all the common names for GNU make -[llvm_cv_gnu_make_command='' - for a in "$MAKE" make gmake gnumake ; do - if test -z "$a" ; then continue ; fi ; - if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) - then - llvm_cv_gnu_make_command=$a ; - break; - fi - done]) -dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, -dnl '#' otherwise - if test "x$llvm_cv_gnu_make_command" != "x" ; then - ifGNUmake='' ; - else - ifGNUmake='#' ; - AC_MSG_RESULT("Not found"); - fi - AC_SUBST(ifGNUmake) -]) diff --git a/llvm/projects/sample/autoconf/m4/config_makefile.m4 b/llvm/projects/sample/autoconf/m4/config_makefile.m4 deleted file mode 100644 index b1eaffdcd85..00000000000 --- a/llvm/projects/sample/autoconf/m4/config_makefile.m4 +++ /dev/null @@ -1,9 +0,0 @@ -# -# Configure a Makefile without clobbering it if it exists and is not out of -# date. This macro is unique to LLVM. -# -AC_DEFUN([AC_CONFIG_MAKEFILE], -[AC_CONFIG_COMMANDS($1, - [${llvm_src}/autoconf/mkinstalldirs `dirname $1` - ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/$1 $1]) -]) diff --git a/llvm/projects/sample/autoconf/m4/config_project.m4 b/llvm/projects/sample/autoconf/m4/config_project.m4 deleted file mode 100644 index eea7faf165c..00000000000 --- a/llvm/projects/sample/autoconf/m4/config_project.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# -# Provide the arguments and other processing needed for an LLVM project -# -AC_DEFUN([LLVM_CONFIG_PROJECT], - [AC_ARG_WITH([llvmsrc], - AS_HELP_STRING([--with-llvmsrc],[Location of LLVM Source Code]), - [llvm_src="$withval"],[llvm_src="]$1["]) - AC_SUBST(LLVM_SRC,$llvm_src) - AC_ARG_WITH([llvmobj], - AS_HELP_STRING([--with-llvmobj],[Location of LLVM Object Code]), - [llvm_obj="$withval"],[llvm_obj="]$2["]) - AC_SUBST(LLVM_OBJ,$llvm_obj) - AC_CONFIG_COMMANDS([setup],,[llvm_src="${LLVM_SRC}"]) -]) diff --git a/llvm/projects/sample/autoconf/m4/cxx_flag_check.m4 b/llvm/projects/sample/autoconf/m4/cxx_flag_check.m4 deleted file mode 100644 index 62454b7147f..00000000000 --- a/llvm/projects/sample/autoconf/m4/cxx_flag_check.m4 +++ /dev/null @@ -1,2 +0,0 @@ -AC_DEFUN([CXX_FLAG_CHECK], - [AC_SUBST($1, `$CXX -Werror $2 -fsyntax-only -xc /dev/null 2>/dev/null && echo $2`)]) diff --git a/llvm/projects/sample/autoconf/m4/find_std_program.m4 b/llvm/projects/sample/autoconf/m4/find_std_program.m4 deleted file mode 100644 index c789df8e641..00000000000 --- a/llvm/projects/sample/autoconf/m4/find_std_program.m4 +++ /dev/null @@ -1,118 +0,0 @@ -dnl Check for a standard program that has a bin, include and lib directory -dnl -dnl Parameters: -dnl $1 - prefix directory to check -dnl $2 - program name to check -dnl $3 - header file to check -dnl $4 - library file to check -AC_DEFUN([CHECK_STD_PROGRAM], -[m4_define([allcapsname],translit($2,a-z,A-Z)) -if test -n "$1" -a -d "$1" -a -n "$2" -a -d "$1/bin" -a -x "$1/bin/$2" ; then - AC_SUBST([USE_]allcapsname(),["USE_]allcapsname()[ = 1"]) - AC_SUBST(allcapsname(),[$1/bin/$2]) - AC_SUBST(allcapsname()[_BIN],[$1/bin]) - AC_SUBST(allcapsname()[_DIR],[$1]) - if test -n "$3" -a -d "$1/include" -a -f "$1/include/$3" ; then - AC_SUBST(allcapsname()[_INC],[$1/include]) - fi - if test -n "$4" -a -d "$1/lib" -a -f "$1/lib/$4" ; then - AC_SUBST(allcapsname()[_LIB],[$1/lib]) - fi -fi -]) - -dnl Find a program via --with options, in the path, or well known places -dnl -dnl Parameters: -dnl $1 - program's executable name -dnl $2 - header file name to check (optional) -dnl $3 - library file name to check (optional) -dnl $4 - alternate (long) name for the program -AC_DEFUN([FIND_STD_PROGRAM], -[m4_define([allcapsname],translit($1,a-z,A-Z)) -m4_define([stdprog_long_name],ifelse($4,,translit($1,[ !@#$%^&*()-+={}[]:;"',./?],[-]),translit($4,[ !@#$%^&*()-+={}[]:;"',./?],[-]))) -AC_MSG_CHECKING([for ]stdprog_long_name()[ bin/lib/include locations]) -AC_ARG_WITH($1, - AS_HELP_STRING([--with-]stdprog_long_name()[=DIR], - [Specify that the ]stdprog_long_name()[ install prefix is DIR]), - $1[pfxdir=$withval],$1[pfxdir=nada]) -AC_ARG_WITH($1[-bin], - AS_HELP_STRING([--with-]stdprog_long_name()[-bin=DIR], - [Specify that the ]stdprog_long_name()[ binary is in DIR]), - $1[bindir=$withval],$1[bindir=nada]) -AC_ARG_WITH($1[-lib], - AS_HELP_STRING([--with-]stdprog_long_name()[-lib=DIR], - [Specify that ]stdprog_long_name()[ libraries are in DIR]), - $1[libdir=$withval],$1[libdir=nada]) -AC_ARG_WITH($1[-inc], - AS_HELP_STRING([--with-]stdprog_long_name()[-inc=DIR], - [Specify that the ]stdprog_long_name()[ includes are in DIR]), - $1[incdir=$withval],$1[incdir=nada]) -eval pfxval=\$\{$1pfxdir\} -eval binval=\$\{$1bindir\} -eval incval=\$\{$1incdir\} -eval libval=\$\{$1libdir\} -if test "${pfxval}" != "nada" ; then - CHECK_STD_PROGRAM(${pfxval},$1,$2,$3) -elif test "${binval}" != "nada" ; then - if test "${libval}" != "nada" ; then - if test "${incval}" != "nada" ; then - if test -d "${binval}" ; then - if test -d "${incval}" ; then - if test -d "${libval}" ; then - AC_SUBST(allcapsname(),${binval}/$1) - AC_SUBST(allcapsname()[_BIN],${binval}) - AC_SUBST(allcapsname()[_INC],${incval}) - AC_SUBST(allcapsname()[_LIB],${libval}) - AC_SUBST([USE_]allcapsname(),["USE_]allcapsname()[ = 1"]) - AC_MSG_RESULT([found via --with options]) - else - AC_MSG_RESULT([failed]) - AC_MSG_ERROR([The --with-]$1[-libdir value must be a directory]) - fi - else - AC_MSG_RESULT([failed]) - AC_MSG_ERROR([The --with-]$1[-incdir value must be a directory]) - fi - else - AC_MSG_RESULT([failed]) - AC_MSG_ERROR([The --with-]$1[-bindir value must be a directory]) - fi - else - AC_MSG_RESULT([failed]) - AC_MSG_ERROR([The --with-]$1[-incdir option must be specified]) - fi - else - AC_MSG_RESULT([failed]) - AC_MSG_ERROR([The --with-]$1[-libdir option must be specified]) - fi -else - tmppfxdir=`which $1 2>&1` - if test -n "$tmppfxdir" -a -d "${tmppfxdir%*$1}" -a \ - -d "${tmppfxdir%*$1}/.." ; then - tmppfxdir=`cd "${tmppfxdir%*$1}/.." ; pwd` - CHECK_STD_PROGRAM($tmppfxdir,$1,$2,$3) - AC_MSG_RESULT([found in PATH at ]$tmppfxdir) - else - checkresult="yes" - eval checkval=\$\{"USE_"allcapsname()\} - CHECK_STD_PROGRAM([/usr],$1,$2,$3) - if test -z "${checkval}" ; then - CHECK_STD_PROGRAM([/usr/local],$1,$2,$3) - if test -z "${checkval}" ; then - CHECK_STD_PROGRAM([/sw],$1,$2,$3) - if test -z "${checkval}" ; then - CHECK_STD_PROGRAM([/opt],$1,$2,$3) - if test -z "${checkval}" ; then - CHECK_STD_PROGRAM([/],$1,$2,$3) - if test -z "${checkval}" ; then - checkresult="no" - fi - fi - fi - fi - fi - AC_MSG_RESULT($checkresult) - fi -fi -]) diff --git a/llvm/projects/sample/autoconf/m4/func_isinf.m4 b/llvm/projects/sample/autoconf/m4/func_isinf.m4 deleted file mode 100644 index 22ba81d54d5..00000000000 --- a/llvm/projects/sample/autoconf/m4/func_isinf.m4 +++ /dev/null @@ -1,36 +0,0 @@ -# -# This function determins if the isinf function isavailable on this -# platform. -# -AC_DEFUN([AC_FUNC_ISINF],[ -AC_SINGLE_CXX_CHECK([ac_cv_func_isinf_in_math_h], - [isinf], [<math.h>], - [float f; isinf(f);]) -if test "$ac_cv_func_isinf_in_math_h" = "yes" ; then - AC_DEFINE([HAVE_ISINF_IN_MATH_H],1,[Set to 1 if the isinf function is found in <math.h>]) -fi - -AC_SINGLE_CXX_CHECK([ac_cv_func_isinf_in_cmath], - [isinf], [<cmath>], - [float f; isinf(f);]) -if test "$ac_cv_func_isinf_in_cmath" = "yes" ; then - AC_DEFINE([HAVE_ISINF_IN_CMATH],1,[Set to 1 if the isinf function is found in <cmath>]) -fi - -AC_SINGLE_CXX_CHECK([ac_cv_func_std_isinf_in_cmath], - [std::isinf], [<cmath>], - [float f; std::isinf(f);]) -if test "$ac_cv_func_std_isinf_in_cmath" = "yes" ; then - AC_DEFINE([HAVE_STD_ISINF_IN_CMATH],1,[Set to 1 if the std::isinf function is found in <cmath>]) -fi - -AC_SINGLE_CXX_CHECK([ac_cv_func_finite_in_ieeefp_h], - [finite], [<ieeefp.h>], - [float f; finite(f);]) -if test "$ac_cv_func_finite_in_ieeefp_h" = "yes" ; then - AC_DEFINE([HAVE_FINITE_IN_IEEEFP_H],1,[Set to 1 if the finite function is found in <ieeefp.h>]) -fi - -]) - - diff --git a/llvm/projects/sample/autoconf/m4/func_isnan.m4 b/llvm/projects/sample/autoconf/m4/func_isnan.m4 deleted file mode 100644 index eb5ca0daeb5..00000000000 --- a/llvm/projects/sample/autoconf/m4/func_isnan.m4 +++ /dev/null @@ -1,27 +0,0 @@ -# -# This function determines if the isnan function is available on this -# platform. -# -AC_DEFUN([AC_FUNC_ISNAN],[ -AC_SINGLE_CXX_CHECK([ac_cv_func_isnan_in_math_h], - [isnan], [<math.h>], - [float f; isnan(f);]) - -if test "$ac_cv_func_isnan_in_math_h" = "yes" ; then - AC_DEFINE([HAVE_ISNAN_IN_MATH_H],1,[Set to 1 if the isnan function is found in <math.h>]) -fi - -AC_SINGLE_CXX_CHECK([ac_cv_func_isnan_in_cmath], - [isnan], [<cmath>], - [float f; isnan(f);]) -if test "$ac_cv_func_isnan_in_cmath" = "yes" ; then - AC_DEFINE([HAVE_ISNAN_IN_CMATH],1,[Set to 1 if the isnan function is found in <cmath>]) -fi - -AC_SINGLE_CXX_CHECK([ac_cv_func_std_isnan_in_cmath], - [std::isnan], [<cmath>], - [float f; std::isnan(f);]) -if test "$ac_cv_func_std_isnan_in_cmath" = "yes" ; then - AC_DEFINE([HAVE_STD_ISNAN_IN_CMATH],1,[Set to 1 if the std::isnan function is found in <cmath>]) -fi -]) diff --git a/llvm/projects/sample/autoconf/m4/func_mmap_file.m4 b/llvm/projects/sample/autoconf/m4/func_mmap_file.m4 deleted file mode 100644 index 372c87fbe5c..00000000000 --- a/llvm/projects/sample/autoconf/m4/func_mmap_file.m4 +++ /dev/null @@ -1,26 +0,0 @@ -# -# Check for the ability to mmap a file. -# -AC_DEFUN([AC_FUNC_MMAP_FILE], -[AC_CACHE_CHECK(for mmap of files, -ac_cv_func_mmap_file, -[ AC_LANG_PUSH([C]) - AC_RUN_IFELSE([ - AC_LANG_PROGRAM([[ -#include <sys/types.h> -#include <sys/mman.h> -#include <fcntl.h> -]],[[ - int fd; - fd = creat ("foo",0777); - fd = (int) mmap (0, 1, PROT_READ, MAP_SHARED, fd, 0); - unlink ("foo"); - return (fd != (int) MAP_FAILED);]])], - [ac_cv_func_mmap_file=yes],[ac_cv_func_mmap_file=no],[ac_cv_func_mmap_file=no]) - AC_LANG_POP([C]) -]) -if test "$ac_cv_func_mmap_file" = yes; then - AC_DEFINE([HAVE_MMAP_FILE],[],[Define if mmap() can map files into memory]) - AC_SUBST(MMAP_FILE,[yes]) -fi -]) diff --git a/llvm/projects/sample/autoconf/m4/header_mmap_anonymous.m4 b/llvm/projects/sample/autoconf/m4/header_mmap_anonymous.m4 deleted file mode 100644 index 2270d29557b..00000000000 --- a/llvm/projects/sample/autoconf/m4/header_mmap_anonymous.m4 +++ /dev/null @@ -1,21 +0,0 @@ -# -# Check for anonymous mmap macros. This is modified from -# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_slist.html -# -AC_DEFUN([AC_HEADER_MMAP_ANONYMOUS], -[AC_CACHE_CHECK(for MAP_ANONYMOUS vs. MAP_ANON, -ac_cv_header_mmap_anon, -[ AC_LANG_PUSH([C]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[#include <sys/mman.h> -#include <unistd.h> -#include <fcntl.h>]], - [[mmap (0, 1, PROT_READ, MAP_ANONYMOUS, -1, 0); return (0);]])], - ac_cv_header_mmap_anon=yes, - ac_cv_header_mmap_anon=no) - AC_LANG_POP([C]) -]) -if test "$ac_cv_header_mmap_anon" = yes; then - AC_DEFINE([HAVE_MMAP_ANONYMOUS],[1],[Define if mmap() uses MAP_ANONYMOUS to map anonymous pages, or undefine if it uses MAP_ANON]) -fi -]) diff --git a/llvm/projects/sample/autoconf/m4/huge_val.m4 b/llvm/projects/sample/autoconf/m4/huge_val.m4 deleted file mode 100644 index 6c9a22eab00..00000000000 --- a/llvm/projects/sample/autoconf/m4/huge_val.m4 +++ /dev/null @@ -1,20 +0,0 @@ -# -# This function determins if the HUGE_VAL macro is compilable with the -# -pedantic switch or not. XCode < 2.4.1 doesn't get it right. -# -AC_DEFUN([AC_HUGE_VAL_CHECK],[ - AC_CACHE_CHECK([for HUGE_VAL sanity], [ac_cv_huge_val_sanity],[ - AC_LANG_PUSH([C++]) - ac_save_CXXFLAGS=$CXXFLAGS - CXXFLAGS="$CXXFLAGS -pedantic" - AC_RUN_IFELSE( - AC_LANG_PROGRAM( - [#include <math.h>], - [double x = HUGE_VAL; return x != x; ]), - [ac_cv_huge_val_sanity=yes],[ac_cv_huge_val_sanity=no], - [ac_cv_huge_val_sanity=yes]) - CXXFLAGS=$ac_save_CXXFLAGS - AC_LANG_POP([C++]) - ]) - AC_SUBST(HUGE_VAL_SANITY,$ac_cv_huge_val_sanity) -]) diff --git a/llvm/projects/sample/autoconf/m4/link_options.m4 b/llvm/projects/sample/autoconf/m4/link_options.m4 deleted file mode 100644 index b58d61745f9..00000000000 --- a/llvm/projects/sample/autoconf/m4/link_options.m4 +++ /dev/null @@ -1,109 +0,0 @@ -# -# Get the linker version string. -# -# This macro is specific to LLVM. -# -AC_DEFUN([AC_LINK_GET_VERSION], - [AC_CACHE_CHECK([for linker version],[llvm_cv_link_version], - [ - version_string="$(ld -v 2>&1 | head -1)" - - # Check for ld64. - if (echo "$version_string" | grep -q "ld64"); then - llvm_cv_link_version=$(echo "$version_string" | sed -e "s#.*ld64-\([^ ]*\)\( (.*)\)\{0,1\}#\1#") - else - llvm_cv_link_version=$(echo "$version_string" | sed -e "s#[^0-9]*\([0-9.]*\).*#\1#") - fi - ]) - AC_DEFINE_UNQUOTED([HOST_LINK_VERSION],"$llvm_cv_link_version", - [Linker version detected at compile time.]) -]) - -# -# Determine if the system can handle the -R option being passed to the linker. -# -# This macro is specific to LLVM. -# -AC_DEFUN([AC_LINK_USE_R], -[AC_CACHE_CHECK([for compiler -Wl,-R<path> option],[llvm_cv_link_use_r], -[ AC_LANG_PUSH([C]) - oldcflags="$CFLAGS" - CFLAGS="$CFLAGS -Wl,-R." - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])], - [llvm_cv_link_use_r=yes],[llvm_cv_link_use_r=no]) - CFLAGS="$oldcflags" - AC_LANG_POP([C]) -]) -if test "$llvm_cv_link_use_r" = yes ; then - AC_DEFINE([HAVE_LINK_R],[1],[Define if you can use -Wl,-R. to pass -R. to the linker, in order to add the current directory to the dynamic linker search path.]) - fi -]) - -# -# Determine if the system can handle the -rdynamic option being passed -# to the compiler. -# -# This macro is specific to LLVM. -# -AC_DEFUN([AC_LINK_EXPORT_DYNAMIC], -[AC_CACHE_CHECK([for compiler -rdynamic option], - [llvm_cv_link_use_export_dynamic], -[ AC_LANG_PUSH([C]) - oldcflags="$CFLAGS" - CFLAGS="$CFLAGS -rdynamic" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])], - [llvm_cv_link_use_export_dynamic=yes],[llvm_cv_link_use_export_dynamic=no]) - CFLAGS="$oldcflags" - AC_LANG_POP([C]) -]) -if test "$llvm_cv_link_use_export_dynamic" = yes ; then - AC_DEFINE([HAVE_LINK_EXPORT_DYNAMIC],[1],[Define if you can use -rdynamic.]) - fi -]) - -# -# Determine if the system can handle the --version-script option being -# passed to the linker. -# -# This macro is specific to LLVM. -# -AC_DEFUN([AC_LINK_VERSION_SCRIPT], -[AC_CACHE_CHECK([for compiler -Wl,--version-script option], - [llvm_cv_link_use_version_script], -[ AC_LANG_PUSH([C]) - oldcflags="$CFLAGS" - - # The following code is from the autoconf manual, - # "11.13: Limitations of Usual Tools". - # Create a temporary directory $tmp in $TMPDIR (default /tmp). - # Use mktemp if possible; otherwise fall back on mkdir, - # with $RANDOM to make collisions less likely. - : ${TMPDIR=/tmp} - { - tmp=` - (umask 077 && mktemp -d "$TMPDIR/fooXXXXXX") 2>/dev/null - ` && - test -n "$tmp" && test -d "$tmp" - } || { - tmp=$TMPDIR/foo$$-$RANDOM - (umask 077 && mkdir "$tmp") - } || exit $? - - echo "{" > "$tmp/export.map" - echo " global: main;" >> "$tmp/export.map" - echo " local: *;" >> "$tmp/export.map" - echo "};" >> "$tmp/export.map" - - CFLAGS="$CFLAGS -Wl,--version-script=$tmp/export.map" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])], - [llvm_cv_link_use_version_script=yes],[llvm_cv_link_use_version_script=no]) - rm "$tmp/export.map" - rmdir "$tmp" - CFLAGS="$oldcflags" - AC_LANG_POP([C]) -]) -if test "$llvm_cv_link_use_version_script" = yes ; then - AC_SUBST(HAVE_LINK_VERSION_SCRIPT,1) - fi -]) - diff --git a/llvm/projects/sample/autoconf/m4/linux_mixed_64_32.m4 b/llvm/projects/sample/autoconf/m4/linux_mixed_64_32.m4 deleted file mode 100644 index 123491f87e5..00000000000 --- a/llvm/projects/sample/autoconf/m4/linux_mixed_64_32.m4 +++ /dev/null @@ -1,17 +0,0 @@ -# -# Some Linux machines run a 64-bit kernel with a 32-bit userspace. 'uname -m' -# shows these as x86_64. Ask the system 'gcc' what it thinks. -# -AC_DEFUN([AC_IS_LINUX_MIXED], -[AC_CACHE_CHECK(for 32-bit userspace on 64-bit system,llvm_cv_linux_mixed, -[ AC_LANG_PUSH([C]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[#ifndef __x86_64__ - error: Not x86-64 even if uname says so! - #endif - ]])], - [llvm_cv_linux_mixed=no], - [llvm_cv_linux_mixed=yes]) - AC_LANG_POP([C]) -]) -]) diff --git a/llvm/projects/sample/autoconf/m4/need_dev_zero_for_mmap.m4 b/llvm/projects/sample/autoconf/m4/need_dev_zero_for_mmap.m4 deleted file mode 100644 index 57b32283017..00000000000 --- a/llvm/projects/sample/autoconf/m4/need_dev_zero_for_mmap.m4 +++ /dev/null @@ -1,17 +0,0 @@ -# -# When allocating RWX memory, check whether we need to use /dev/zero -# as the file descriptor or not. -# -AC_DEFUN([AC_NEED_DEV_ZERO_FOR_MMAP], -[AC_CACHE_CHECK([if /dev/zero is needed for mmap], -ac_cv_need_dev_zero_for_mmap, -[if test "$llvm_cv_os_type" = "Interix" ; then - ac_cv_need_dev_zero_for_mmap=yes - else - ac_cv_need_dev_zero_for_mmap=no - fi -]) -if test "$ac_cv_need_dev_zero_for_mmap" = yes; then - AC_DEFINE([NEED_DEV_ZERO_FOR_MMAP],[1], - [Define if /dev/zero should be used when mapping RWX memory, or undefine if its not necessary]) -fi]) diff --git a/llvm/projects/sample/autoconf/m4/path_tclsh.m4 b/llvm/projects/sample/autoconf/m4/path_tclsh.m4 deleted file mode 100644 index 85433de71cc..00000000000 --- a/llvm/projects/sample/autoconf/m4/path_tclsh.m4 +++ /dev/null @@ -1,39 +0,0 @@ -dnl This macro checks for tclsh which is required to run dejagnu. On some -dnl platforms (notably FreeBSD), tclsh is named tclshX.Y - this handles -dnl that for us so we can get the latest installed tclsh version. -dnl -AC_DEFUN([DJ_AC_PATH_TCLSH], [ -no_itcl=true -AC_MSG_CHECKING(for the tclsh program in tclinclude directory) -AC_ARG_WITH(tclinclude, - AS_HELP_STRING([--with-tclinclude], - [directory where tcl headers are]), - [with_tclinclude=${withval}],[with_tclinclude='']) -AC_CACHE_VAL(ac_cv_path_tclsh,[ -dnl first check to see if --with-itclinclude was specified -if test x"${with_tclinclude}" != x ; then - if test -f ${with_tclinclude}/tclsh ; then - ac_cv_path_tclsh=`(cd ${with_tclinclude}; pwd)` - elif test -f ${with_tclinclude}/src/tclsh ; then - ac_cv_path_tclsh=`(cd ${with_tclinclude}/src; pwd)` - else - AC_MSG_ERROR([${with_tclinclude} directory doesn't contain tclsh]) - fi -fi]) - -dnl see if one is installed -if test x"${ac_cv_path_tclsh}" = x ; then - AC_MSG_RESULT(none) - AC_PATH_PROGS([TCLSH],[tclsh8.4 tclsh8.4.8 tclsh8.4.7 tclsh8.4.6 tclsh8.4.5 tclsh8.4.4 tclsh8.4.3 tclsh8.4.2 tclsh8.4.1 tclsh8.4.0 tclsh8.3 tclsh8.3.5 tclsh8.3.4 tclsh8.3.3 tclsh8.3.2 tclsh8.3.1 tclsh8.3.0 tclsh]) - if test x"${TCLSH}" = x ; then - ac_cv_path_tclsh=''; - else - ac_cv_path_tclsh="${TCLSH}"; - fi -else - AC_MSG_RESULT(${ac_cv_path_tclsh}) - TCLSH="${ac_cv_path_tclsh}" - AC_SUBST(TCLSH) -fi -]) - diff --git a/llvm/projects/sample/autoconf/m4/rand48.m4 b/llvm/projects/sample/autoconf/m4/rand48.m4 deleted file mode 100644 index 76f08faad28..00000000000 --- a/llvm/projects/sample/autoconf/m4/rand48.m4 +++ /dev/null @@ -1,12 +0,0 @@ -# -# This function determins if the srand48,drand48,lrand48 functions are -# available on this platform. -# -AC_DEFUN([AC_FUNC_RAND48],[ -AC_SINGLE_CXX_CHECK([ac_cv_func_rand48], - [srand48/lrand48/drand48], [<stdlib.h>], - [srand48(0);lrand48();drand48();]) -if test "$ac_cv_func_rand48" = "yes" ; then -AC_DEFINE([HAVE_RAND48],1,[Define to 1 if srand48/lrand48/drand48 exist in <stdlib.h>]) -fi -]) diff --git a/llvm/projects/sample/autoconf/m4/sanity_check.m4 b/llvm/projects/sample/autoconf/m4/sanity_check.m4 deleted file mode 100644 index 639fccca246..00000000000 --- a/llvm/projects/sample/autoconf/m4/sanity_check.m4 +++ /dev/null @@ -1,31 +0,0 @@ -dnl Check a program for version sanity. The test runs a program, passes it an -dnl argument to make it print out some identification string, and filters that -dnl output with a regular expression. If the output is non-empty, the program -dnl passes the sanity check. -dnl $1 - Name or full path of the program to run -dnl $2 - Argument to pass to print out identification string -dnl $3 - grep RE to match identification string -dnl $4 - set to 1 to make errors only a warning -AC_DEFUN([CHECK_PROGRAM_SANITY], -[ -AC_MSG_CHECKING([sanity for program ]$1) -sanity="0" -sanity_path=`which $1 2>/dev/null` -if test "$?" -eq 0 -a -x "$sanity_path" ; then - sanity=`$1 $2 2>&1 | grep "$3"` - if test -z "$sanity" ; then - AC_MSG_RESULT([no]) - sanity="0" - if test "$4" -eq 1 ; then - AC_MSG_WARN([Program ]$1[ failed to pass sanity check.]) - else - AC_MSG_ERROR([Program ]$1[ failed to pass sanity check.]) - fi - else - AC_MSG_RESULT([yes]) - sanity="1" - fi -else - AC_MSG_RESULT([not found]) -fi -]) diff --git a/llvm/projects/sample/autoconf/m4/single_cxx_check.m4 b/llvm/projects/sample/autoconf/m4/single_cxx_check.m4 deleted file mode 100644 index 21efa4bed35..00000000000 --- a/llvm/projects/sample/autoconf/m4/single_cxx_check.m4 +++ /dev/null @@ -1,10 +0,0 @@ -dnl AC_SINGLE_CXX_CHECK(CACHEVAR, FUNCTION, HEADER, PROGRAM) -dnl $1, $2, $3, $4, -dnl -AC_DEFUN([AC_SINGLE_CXX_CHECK], - [AC_CACHE_CHECK([for $2 in $3], [$1], - [AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE(AC_LANG_PROGRAM([#include $3],[$4]),[$1=yes],[$1=no]) - AC_LANG_POP([C++])]) - ]) - diff --git a/llvm/projects/sample/autoconf/m4/visibility_inlines_hidden.m4 b/llvm/projects/sample/autoconf/m4/visibility_inlines_hidden.m4 deleted file mode 100644 index b1cc42aa5f5..00000000000 --- a/llvm/projects/sample/autoconf/m4/visibility_inlines_hidden.m4 +++ /dev/null @@ -1,24 +0,0 @@ -# -# Determine if the compiler accepts -fvisibility-inlines-hidden -# -# This macro is specific to LLVM. -# -AC_DEFUN([AC_CXX_USE_VISIBILITY_INLINES_HIDDEN], -[AC_CACHE_CHECK([for compiler -fvisibility-inlines-hidden option], - [llvm_cv_cxx_visibility_inlines_hidden], -[ AC_LANG_PUSH([C++]) - oldcxxflags="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -O0 -fvisibility-inlines-hidden -Werror" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [template <typename T> struct X { void __attribute__((noinline)) f() {} };], - [X<int>().f();])], - [llvm_cv_cxx_visibility_inlines_hidden=yes],[llvm_cv_cxx_visibility_inlines_hidden=no]) - CXXFLAGS="$oldcxxflags" - AC_LANG_POP([C++]) -]) -if test "$llvm_cv_cxx_visibility_inlines_hidden" = yes ; then - AC_SUBST([ENABLE_VISIBILITY_INLINES_HIDDEN],[1]) -else - AC_SUBST([ENABLE_VISIBILITY_INLINES_HIDDEN],[0]) -fi -]) |