llvm.org GIT mirror llvm / 7b3e851
For PR351: Create new variables LLVM_ON_UNIX and LLVM_ON_WIN32 so we can start getting rid of reliance upon a symbolic link to switch implementations in lib/System git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19131 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 15 years ago
3 changed file(s) with 142 addition(s) and 67 deletion(s). Raw diff Collapse all Expand all
9696
9797 dnl Determine the platform type and cache its value. This helps us configure
9898 dnl the System library to the correct build platform.
99 AC_CACHE_CHECK([support for generic build operating system],
100 [llvm_cv_platform_type],
99 AC_CACHE_CHECK([type of operating system we're on],
100 [llvm_cv_os_type],
101101 [case $build in
102 *-*-aix*) llvm_cv_platform_type="AIX" ;;
103 *-*-cygwin*) llvm_cv_platform_type="Cygwin" ;;
104 *-*-darwin*) llvm_cv_platform_type="Darwin" ;;
105 *-*-freebsd*) llvm_cv_platform_type="FreeBSD" ;;
106 *-*-interix*) llvm_cv_platform_type="Interix" ;;
107 *-*-linux*) llvm_cv_platform_type="Linux" ;;
108 *-*-solaris*) llvm_cv_platform_type="SunOS" ;;
109 *-*-win32*) llvm_cv_platform_type="Win32" ;;
110 *-*-mingw*) llvm_cv_platform_type="Win32" ;;
111 *) llvm_cv_platform_type="Unknown" ;;
102 *-*-aix*)
103 llvm_cv_os_type="AIX"
104 llvm_cv_platform_type="Unix" ;;
105 *-*-cygwin*)
106 llvm_cv_os_type="Cygwin"
107 llvm_cv_platform_type="Unix" ;;
108 *-*-darwin*)
109 llvm_cv_os_type="Darwin"
110 llvm_cv_platform_type="Unix" ;;
111 *-*-freebsd*)
112 llvm_cv_os_type="FreeBSD"
113 llvm_cv_platform_type="Unix" ;;
114 *-*-interix*)
115 llvm_cv_os_type="Interix"
116 llvm_cv_platform_type="Unix" ;;
117 *-*-linux*)
118 llvm_cv_os_type="Linux"
119 llvm_cv_platform_type="Unix" ;;
120 *-*-solaris*)
121 llvm_cv_os_type="SunOS"
122 llvm_cv_platform_type="Unix" ;;
123 *-*-win32*)
124 llvm_cv_os_type="Win32"
125 llvm_cv_platform_type="Win32" ;;
126 *-*-mingw*)
127 llvm_cv_os_type="MingW"
128 llvm_cv_platform_type="Win32" ;;
129 *)
130 llvm_cv_os_type="Unknown"
131 llvm_cv_platform_type="Unknown" ;;
112132 esac])
113133
114134 dnl Make sure we aren't attempting to configure for an unknown system
115 if test "$llvm_cv_platform_type" = "Unknown" ; then
116 AC_MSG_ERROR([Operating system platform is unknown, configure can't continue])
135 if test "$llvm_cv_os_type" = "Unknown" ; then
136 AC_MSG_ERROR([Operating system is unknown, configure can't continue])
117137 fi
118138
119139 dnl Set the "OS" Makefile variable based on the platform type so the
120140 dnl makefile can configure itself to specific build hosts
121 AC_SUBST(OS,$llvm_cv_platform_type)
141 AC_SUBST(OS,$llvm_cv_os_type)
142
143 dnl Set the "LLVM_ON_*" variables based on llvm_cvs_platform_type
144 dnl This is used by lib/System to determine the basic kind of implementation
145 dnl to use.
146 case $llvm_cv_platform_type in
147 Unix)
148 AC_DEFINE([LLVM_ON_UNIX],[1],[Define if this is Unixish platform])
149 ;;
150 Win32)
151 AC_DEFINE([LLVM_ON_WIN32],[1],[Define if this is Win32ish platform])
152 ;;
153 esac
122154
123155 dnl Make a link from lib/System/platform to lib/System/$llvm_cv_platform_type
124156 dnl This helps the #inclusion of the system specific include files
16961696 NONENONEs,x,x, &&
16971697 program_prefix=${target_alias}-
16981698
1699 echo "$as_me:$LINENO: checking support for generic build operating system" >&5
1700 echo $ECHO_N "checking support for generic build operating system... $ECHO_C" >&6
1701 if test "${llvm_cv_platform_type+set}" = set; then
1699 echo "$as_me:$LINENO: checking type of operating system we're on" >&5
1700 echo $ECHO_N "checking type of operating system we're on... $ECHO_C" >&6
1701 if test "${llvm_cv_os_type+set}" = set; then
17021702 echo $ECHO_N "(cached) $ECHO_C" >&6
17031703 else
17041704 case $build in
1705 *-*-aix*) llvm_cv_platform_type="AIX" ;;
1706 *-*-cygwin*) llvm_cv_platform_type="Cygwin" ;;
1707 *-*-darwin*) llvm_cv_platform_type="Darwin" ;;
1708 *-*-freebsd*) llvm_cv_platform_type="FreeBSD" ;;
1709 *-*-interix*) llvm_cv_platform_type="Interix" ;;
1710 *-*-linux*) llvm_cv_platform_type="Linux" ;;
1711 *-*-solaris*) llvm_cv_platform_type="SunOS" ;;
1712 *-*-win32*) llvm_cv_platform_type="Win32" ;;
1713 *-*-mingw*) llvm_cv_platform_type="Win32" ;;
1714 *) llvm_cv_platform_type="Unknown" ;;
1705 *-*-aix*)
1706 llvm_cv_os_type="AIX"
1707 llvm_cv_platform_type="Unix" ;;
1708 *-*-cygwin*)
1709 llvm_cv_os_type="Cygwin"
1710 llvm_cv_platform_type="Unix" ;;
1711 *-*-darwin*)
1712 llvm_cv_os_type="Darwin"
1713 llvm_cv_platform_type="Unix" ;;
1714 *-*-freebsd*)
1715 llvm_cv_os_type="FreeBSD"
1716 llvm_cv_platform_type="Unix" ;;
1717 *-*-interix*)
1718 llvm_cv_os_type="Interix"
1719 llvm_cv_platform_type="Unix" ;;
1720 *-*-linux*)
1721 llvm_cv_os_type="Linux"
1722 llvm_cv_platform_type="Unix" ;;
1723 *-*-solaris*)
1724 llvm_cv_os_type="SunOS"
1725 llvm_cv_platform_type="Unix" ;;
1726 *-*-win32*)
1727 llvm_cv_os_type="Win32"
1728 llvm_cv_platform_type="Win32" ;;
1729 *-*-mingw*)
1730 llvm_cv_os_type="MingW"
1731 llvm_cv_platform_type="Win32" ;;
1732 *)
1733 llvm_cv_os_type="Unknown"
1734 llvm_cv_platform_type="Unknown" ;;
17151735 esac
17161736 fi
1717 echo "$as_me:$LINENO: result: $llvm_cv_platform_type" >&5
1718 echo "${ECHO_T}$llvm_cv_platform_type" >&6
1719
1720 if test "$llvm_cv_platform_type" = "Unknown" ; then
1721 { { echo "$as_me:$LINENO: error: Operating system platform is unknown, configure can't continue" >&5
1722 echo "$as_me: error: Operating system platform is unknown, configure can't continue" >&2;}
1737 echo "$as_me:$LINENO: result: $llvm_cv_os_type" >&5
1738 echo "${ECHO_T}$llvm_cv_os_type" >&6
1739
1740 if test "$llvm_cv_os_type" = "Unknown" ; then
1741 { { echo "$as_me:$LINENO: error: Operating system is unknown, configure can't continue" >&5
1742 echo "$as_me: error: Operating system is unknown, configure can't continue" >&2;}
17231743 { (exit 1); exit 1; }; }
17241744 fi
17251745
1726 OS=$llvm_cv_platform_type
1727
1746 OS=$llvm_cv_os_type
1747
1748
1749 case $llvm_cv_platform_type in
1750 Unix)
1751
1752 cat >>confdefs.h <<\_ACEOF
1753 #define LLVM_ON_UNIX 1
1754 _ACEOF
1755
1756 ;;
1757 Win32)
1758
1759 cat >>confdefs.h <<\_ACEOF
1760 #define LLVM_ON_WIN32 1
1761 _ACEOF
1762
1763 ;;
1764 esac
17281765
17291766 ac_config_links="$ac_config_links lib/System/platform:lib/System/$llvm_cv_platform_type"
17301767
82448281 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
82458282 lt_status=$lt_dlunknown
82468283 cat > conftest.$ac_ext <
8247 #line 8248 "configure"
8284 #line 8285 "configure"
82488285 #include "confdefs.h"
82498286
82508287 #if HAVE_DLFCN_H
1023510272 ;;
1023610273 *-*-irix6*)
1023710274 # Find out which ABI we are using.
10238 echo '#line 10239 "configure"' > conftest.$ac_ext
10275 echo '#line 10276 "configure"' > conftest.$ac_ext
1023910276 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1024010277 (eval $ac_compile) 2>&5
1024110278 ac_status=$?
1072010757
1072110758
1072210759 # Provide some information about the compiler.
10723 echo "$as_me:10724:" \
10760 echo "$as_me:10761:" \
1072410761 "checking for Fortran 77 compiler version" >&5
1072510762 ac_compiler=`set X $ac_compile; echo $2`
1072610763 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5
1177711814 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1177811815 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1177911816 -e 's:$: $lt_compiler_flag:'`
11780 (eval echo "\"\$as_me:11781: $lt_compile\"" >&5)
11817 (eval echo "\"\$as_me:11818: $lt_compile\"" >&5)
1178111818 (eval "$lt_compile" 2>conftest.err)
1178211819 ac_status=$?
1178311820 cat conftest.err >&5
11784 echo "$as_me:11785: \$? = $ac_status" >&5
11821 echo "$as_me:11822: \$? = $ac_status" >&5
1178511822 if (exit $ac_status) && test -s "$ac_outfile"; then
1178611823 # The compiler can only warn and ignore the option if not recognized
1178711824 # So say no if there are warnings
1202012057 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1202112058 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1202212059 -e 's:$: $lt_compiler_flag:'`
12023 (eval echo "\"\$as_me:12024: $lt_compile\"" >&5)
12060 (eval echo "\"\$as_me:12061: $lt_compile\"" >&5)
1202412061 (eval "$lt_compile" 2>conftest.err)
1202512062 ac_status=$?
1202612063 cat conftest.err >&5
12027 echo "$as_me:12028: \$? = $ac_status" >&5
12064 echo "$as_me:12065: \$? = $ac_status" >&5
1202812065 if (exit $ac_status) && test -s "$ac_outfile"; then
1202912066 # The compiler can only warn and ignore the option if not recognized
1203012067 # So say no if there are warnings
1208012117 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1208112118 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1208212119 -e 's:$: $lt_compiler_flag:'`
12083 (eval echo "\"\$as_me:12084: $lt_compile\"" >&5)
12120 (eval echo "\"\$as_me:12121: $lt_compile\"" >&5)
1208412121 (eval "$lt_compile" 2>out/conftest.err)
1208512122 ac_status=$?
1208612123 cat out/conftest.err >&5
12087 echo "$as_me:12088: \$? = $ac_status" >&5
12124 echo "$as_me:12125: \$? = $ac_status" >&5
1208812125 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1208912126 then
1209012127 # The compiler can only warn and ignore the option if not recognized
1426514302 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1426614303 lt_status=$lt_dlunknown
1426714304 cat > conftest.$ac_ext <
14268 #line 14269 "configure"
14305 #line 14306 "configure"
1426914306 #include "confdefs.h"
1427014307
1427114308 #if HAVE_DLFCN_H
1436314400 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1436414401 lt_status=$lt_dlunknown
1436514402 cat > conftest.$ac_ext <
14366 #line 14367 "configure"
14403 #line 14404 "configure"
1436714404 #include "confdefs.h"
1436814405
1436914406 #if HAVE_DLFCN_H
1655616593 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1655716594 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1655816595 -e 's:$: $lt_compiler_flag:'`
16559 (eval echo "\"\$as_me:16560: $lt_compile\"" >&5)
16596 (eval echo "\"\$as_me:16597: $lt_compile\"" >&5)
1656016597 (eval "$lt_compile" 2>conftest.err)
1656116598 ac_status=$?
1656216599 cat conftest.err >&5
16563 echo "$as_me:16564: \$? = $ac_status" >&5
16600 echo "$as_me:16601: \$? = $ac_status" >&5
1656416601 if (exit $ac_status) && test -s "$ac_outfile"; then
1656516602 # The compiler can only warn and ignore the option if not recognized
1656616603 # So say no if there are warnings
1661616653 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1661716654 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1661816655 -e 's:$: $lt_compiler_flag:'`
16619 (eval echo "\"\$as_me:16620: $lt_compile\"" >&5)
16656 (eval echo "\"\$as_me:16657: $lt_compile\"" >&5)
1662016657 (eval "$lt_compile" 2>out/conftest.err)
1662116658 ac_status=$?
1662216659 cat out/conftest.err >&5
16623 echo "$as_me:16624: \$? = $ac_status" >&5
16660 echo "$as_me:16661: \$? = $ac_status" >&5
1662416661 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1662516662 then
1662616663 # The compiler can only warn and ignore the option if not recognized
1797718014 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1797818015 lt_status=$lt_dlunknown
1797918016 cat > conftest.$ac_ext <
17980 #line 17981 "configure"
18017 #line 18018 "configure"
1798118018 #include "confdefs.h"
1798218019
1798318020 #if HAVE_DLFCN_H
1807518112 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1807618113 lt_status=$lt_dlunknown
1807718114 cat > conftest.$ac_ext <
18078 #line 18079 "configure"
18115 #line 18116 "configure"
1807918116 #include "confdefs.h"
1808018117
1808118118 #if HAVE_DLFCN_H
1891218949 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1891318950 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1891418951 -e 's:$: $lt_compiler_flag:'`
18915 (eval echo "\"\$as_me:18916: $lt_compile\"" >&5)
18952 (eval echo "\"\$as_me:18953: $lt_compile\"" >&5)
1891618953 (eval "$lt_compile" 2>conftest.err)
1891718954 ac_status=$?
1891818955 cat conftest.err >&5
18919 echo "$as_me:18920: \$? = $ac_status" >&5
18956 echo "$as_me:18957: \$? = $ac_status" >&5
1892018957 if (exit $ac_status) && test -s "$ac_outfile"; then
1892118958 # The compiler can only warn and ignore the option if not recognized
1892218959 # So say no if there are warnings
1897219009 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1897319010 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1897419011 -e 's:$: $lt_compiler_flag:'`
18975 (eval echo "\"\$as_me:18976: $lt_compile\"" >&5)
19012 (eval echo "\"\$as_me:19013: $lt_compile\"" >&5)
1897619013 (eval "$lt_compile" 2>out/conftest.err)
1897719014 ac_status=$?
1897819015 cat out/conftest.err >&5
18979 echo "$as_me:18980: \$? = $ac_status" >&5
19016 echo "$as_me:19017: \$? = $ac_status" >&5
1898019017 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1898119018 then
1898219019 # The compiler can only warn and ignore the option if not recognized
2101121048 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
2101221049 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2101321050 -e 's:$: $lt_compiler_flag:'`
21014 (eval echo "\"\$as_me:21015: $lt_compile\"" >&5)
21051 (eval echo "\"\$as_me:21052: $lt_compile\"" >&5)
2101521052 (eval "$lt_compile" 2>conftest.err)
2101621053 ac_status=$?
2101721054 cat conftest.err >&5
21018 echo "$as_me:21019: \$? = $ac_status" >&5
21055 echo "$as_me:21056: \$? = $ac_status" >&5
2101921056 if (exit $ac_status) && test -s "$ac_outfile"; then
2102021057 # The compiler can only warn and ignore the option if not recognized
2102121058 # So say no if there are warnings
2125421291 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
2125521292 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2125621293 -e 's:$: $lt_compiler_flag:'`
21257 (eval echo "\"\$as_me:21258: $lt_compile\"" >&5)
21294 (eval echo "\"\$as_me:21295: $lt_compile\"" >&5)
2125821295 (eval "$lt_compile" 2>conftest.err)
2125921296 ac_status=$?
2126021297 cat conftest.err >&5
21261 echo "$as_me:21262: \$? = $ac_status" >&5
21298 echo "$as_me:21299: \$? = $ac_status" >&5
2126221299 if (exit $ac_status) && test -s "$ac_outfile"; then
2126321300 # The compiler can only warn and ignore the option if not recognized
2126421301 # So say no if there are warnings
2131421351 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
2131521352 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
2131621353 -e 's:$: $lt_compiler_flag:'`
21317 (eval echo "\"\$as_me:21318: $lt_compile\"" >&5)
21354 (eval echo "\"\$as_me:21355: $lt_compile\"" >&5)
2131821355 (eval "$lt_compile" 2>out/conftest.err)
2131921356 ac_status=$?
2132021357 cat out/conftest.err >&5
21321 echo "$as_me:21322: \$? = $ac_status" >&5
21358 echo "$as_me:21359: \$? = $ac_status" >&5
2132221359 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2132321360 then
2132421361 # The compiler can only warn and ignore the option if not recognized
2349923536 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2350023537 lt_status=$lt_dlunknown
2350123538 cat > conftest.$ac_ext <
23502 #line 23503 "configure"
23539 #line 23540 "configure"
2350323540 #include "confdefs.h"
2350423541
2350523542 #if HAVE_DLFCN_H
2359723634 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2359823635 lt_status=$lt_dlunknown
2359923636 cat > conftest.$ac_ext <
23600 #line 23601 "configure"
23637 #line 23638 "configure"
2360123638 #include "confdefs.h"
2360223639
2360323640 #if HAVE_DLFCN_H
3142431461
3142531462
3142631463 if test "$llvm_cv_llvmgcc_sanity" = "no" ; then
31427 { echo "$as_me:$LINENO: WARNING: ***** llvmgcc/llvmg++ was not found, or does not appear to be " >&5
31428 echo "$as_me: WARNING: ***** llvmgcc/llvmg++ was not found, or does not appear to be " >&2;}
31464 { echo "$as_me:$LINENO: WARNING: ***** llvm-gcc/llvm-g++ was not found, or does not appear to be " >&5
31465 echo "$as_me: WARNING: ***** llvm-gcc/llvm-g++ was not found, or does not appear to be " >&2;}
3142931466 { echo "$as_me:$LINENO: WARNING: ***** working. Please make sure you have llvmgcc and llvmg++ in" >&5
3143031467 echo "$as_me: WARNING: ***** working. Please make sure you have llvmgcc and llvmg++ in" >&2;}
3143131468 { echo "$as_me:$LINENO: WARNING: ***** your path before configuring LLVM. The runtime libraries" >&5
345345
346346 /* Installation directory for man pages */
347347 #undef LLVM_MANDIR
348
349 /* Define if this is Unixish platform */
350 #undef LLVM_ON_UNIX
351
352 /* Define if this is Win32ish platform */
353 #undef LLVM_ON_WIN32
348354
349355 /* Installation prefix directory */
350356 #undef LLVM_PREFIX