* lower-subreg.c (simple_move): Reject PARTIAL_INT modes.
[official-gcc.git] / libgcc / configure.ac
blob825805d7c6dce077ef5e88e87ecb25c140ef5f1f
1 dnl Process this file with autoconf to produce a configure script.
3 sinclude(../config/acx.m4)
4 sinclude(../config/no-executables.m4)
6 AC_PREREQ(2.59)
7 AC_INIT([GNU C Runtime Library], 1.0,,[libgcc])
8 AC_CONFIG_SRCDIR([static-object.mk])
10 AC_ARG_WITH(target-subdir,
11 [  --with-target-subdir=SUBDIR      Configuring in a subdirectory for target])
12 AC_ARG_WITH(cross-host,
13 [  --with-cross-host=HOST           Configuring with a cross compiler])
14 AC_ARG_WITH(ld,
15 [  --with-ld               arrange to use the specified ld (full pathname)])
17 if test "${srcdir}" = "."; then
18   if test -n "${with_build_subdir}"; then
19     libgcc_topdir="${srcdir}/../.."
20     with_target_subdir=
21   elif test -z "${with_target_subdir}"; then
22     libgcc_topdir="${srcdir}/.."
23   else
24     if test "${with_target_subdir}" != "."; then
25       libgcc_topdir="${srcdir}/${with_multisrctop}../.."
26     else
27       libgcc_topdir="${srcdir}/${with_multisrctop}.."
28     fi
29   fi
30 else
31   libgcc_topdir="${srcdir}/.."
33 AC_SUBST(libgcc_topdir)
34 AC_CONFIG_AUX_DIR($libgcc_topdir)
36 AC_ARG_ENABLE(shared,
37 [  --disable-shared        don't provide a shared libgcc],
39   case $enable_shared in
40   yes | no) ;;
41   *)
42     enable_shared=no
43     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
44     for pkg in $enableval; do
45       if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then
46         enable_shared=yes
47       fi
48     done
49     IFS="$ac_save_ifs"
50     ;;
51   esac
52 ], [enable_shared=yes])
53 AC_SUBST(enable_shared)
55 AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
56 AC_ARG_ENABLE(version-specific-runtime-libs,
57 [  --enable-version-specific-runtime-libs    Specify that runtime libraries should be installed in a compiler-specific directory ],
58 [case "$enableval" in
59  yes) version_specific_libs=yes ;;
60  no)  version_specific_libs=no ;;
61  *)   AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
62  esac],
63 [version_specific_libs=no])
64 AC_MSG_RESULT($version_specific_libs)
66 AC_ARG_WITH(slibdir,
67 [  --with-slibdir=DIR      shared libraries in DIR [LIBDIR]],
68 slibdir="$with_slibdir",
69 if test "${version_specific_libs}" = yes; then
70   slibdir='$(libsubdir)'
71 elif test -n "$with_cross_host" && test x"$with_cross_host" != x"no"; then
72   slibdir='$(exec_prefix)/$(host_noncanonical)/lib'
73 else
74   slibdir='$(libdir)'
75 fi)
76 AC_SUBST(slibdir)
78 AC_PROG_INSTALL
80 AC_PROG_AWK
81 # We need awk; bail out if it's missing.
82 case ${AWK} in
83   "") AC_MSG_ERROR([can't build without awk, bailing out]) ;;
84 esac
86 AC_CANONICAL_HOST
87 ACX_NONCANONICAL_HOST
88 GCC_TOPLEV_SUBDIRS
90 dnl These must be called before AM_PROG_LIBTOOL, because it may want
91 dnl to call AC_CHECK_PROG.
92 AC_CHECK_TOOL(AR, ar)
93 AC_CHECK_TOOL(LIPO, lipo, :)
94 AC_CHECK_TOOL(NM, nm)
95 AC_CHECK_TOOL(RANLIB, ranlib, :)
96 AC_CHECK_TOOL(STRIP, strip, :)
97 AC_PROG_LN_S
99 GCC_NO_EXECUTABLES
100 AC_PROG_CC
101 AC_PROG_CPP_WERROR
103 # Check for decimal float support.
104 AC_CACHE_CHECK([whether decimal floating point is supported], [libgcc_cv_dfp],
105                [AC_COMPILE_IFELSE([_Decimal32 x;], [libgcc_cv_dfp=yes],
106                                   [libgcc_cv_dfp=no])])
107 decimal_float=$libgcc_cv_dfp
108 AC_SUBST(decimal_float)
110 # Collect host-machine-specific information.
111 . ${srcdir}/config.host
113 # Check for visibility support.  This is after config.host so that
114 # we can check for asm_hidden_op.
115 AC_CACHE_CHECK([for __attribute__((visibility("hidden")))],
116     libgcc_cv_hidden_visibility_attribute, [
117         echo 'int __attribute__ ((visibility ("hidden"))) foo (void) { return 1; }' > conftest.c
118         libgcc_cv_hidden_visibility_attribute=no
119         if AC_TRY_COMMAND(${CC-cc} -Werror -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
120             if grep "\\$asm_hidden_op.*foo" conftest.s >/dev/null; then
121                 libgcc_cv_hidden_visibility_attribute=yes
122             fi
123         fi
124         rm -f conftest.*
125     ])
127 if test $libgcc_cv_hidden_visibility_attribute = yes; then
128     vis_hide='-fvisibility=hidden -DHIDE_EXPORTS'
129 else
130     vis_hide=
132 AC_SUBST(vis_hide)
134 # Conditionalize the makefile for this target machine.
135 tmake_file_=
136 for f in ${tmake_file}
138         if test -f ${srcdir}/config/$f
139         then
140                 tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
141         fi
142 done
143 tmake_file="${tmake_file_}"
144 AC_SUBST(tmake_file)
146 # Substitute configuration variables
147 AC_SUBST(extra_parts)
148 AC_SUBST(asm_hidden_op)
150 # We need multilib support.
151 AC_CONFIG_FILES([Makefile])
152 AC_CONFIG_COMMANDS([default],
153   [[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
154 if test -n "$CONFIG_FILES"; then
155   # FIXME: We shouldn't need to set ac_file
156   ac_file=Makefile
157   . ${libgcc_topdir}/config-ml.in
158 fi]],
159 [[srcdir=${srcdir}
160 host=${host}
161 target=${target}
162 with_target_subdir=${with_target_subdir}
163 with_multisubdir=${with_multisubdir}
164 ac_configure_args="--enable-multilib ${ac_configure_args}"
165 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
166 libgcc_topdir=${libgcc_topdir}
167 CC="${CC}"
169 AC_OUTPUT