]> sourceware.org Git - newlib-cygwin.git/blame - libgloss/frv/configure.in
2002-06-18 Dave Brolley <brolley@redhat.com>
[newlib-cygwin.git] / libgloss / frv / configure.in
CommitLineData
c2b0dec2
DB
1dnl Process this file with autoconf to produce a configure script.
2AC_PREREQ(2.5)dnl
3AC_INIT(crt0.S)
4
5if test "${enable_shared}" = "yes" ; then
6 echo "Shared libraries not supported for cross compiling, ignored"
7fi
8
9if test "$srcdir" = "." ; then
10 if test "${with_target_subdir}" != "." ; then
11 libgloss_topdir="${srcdir}/${with_multisrctop}../../.."
12 else
13 libgloss_topdir="${srcdir}/${with_multisrctop}../.."
14 fi
15else
16 libgloss_topdir="${srcdir}/../.."
17fi
18AC_CONFIG_AUX_DIR($libgloss_topdir)
19
20AC_CANONICAL_SYSTEM
21AC_ARG_PROGRAM
22
23AC_PROG_INSTALL
24
25# FIXME: We temporarily define our own version of AC_PROG_CC. This is
26# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
27# are probably using a cross compiler, which will not be able to fully
28# link an executable. This should really be fixed in autoconf
29# itself.
30
31AC_DEFUN(LIB_AC_PROG_CC,
32[AC_BEFORE([$0], [AC_PROG_CPP])dnl
33AC_CHECK_PROG(CC, gcc, gcc)
34if test -z "$CC"; then
35 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
36 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
37fi
38
39AC_PROG_CC_GNU
40
41if test $ac_cv_prog_gcc = yes; then
42 GCC=yes
43dnl Check whether -g works, even if CFLAGS is set, in case the package
44dnl plays around with CFLAGS (such as to build both debugging and
45dnl normal versions of a library), tasteless as that idea is.
46 ac_test_CFLAGS="${CFLAGS+set}"
47 ac_save_CFLAGS="$CFLAGS"
48 CFLAGS=
49 AC_PROG_CC_G
50 if test "$ac_test_CFLAGS" = set; then
51 CFLAGS="$ac_save_CFLAGS"
52 elif test $ac_cv_prog_cc_g = yes; then
53 CFLAGS="-g -O2"
54 else
55 CFLAGS="-O2"
56 fi
57else
58 GCC=
59 test "${CFLAGS+set}" = set || CFLAGS="-g"
60fi
61])
62
63LIB_AC_PROG_CC
64
65AS=${AS-as}
66AC_SUBST(AS)
67AR=${AR-ar}
68AC_SUBST(AR)
69LD=${LD-ld}
70AC_SUBST(LD)
71AC_PROG_RANLIB
72
73host_makefile_frag=${srcdir}/../config/default.mh
74
75dnl We have to assign the same value to other variables because autoconf
76dnl doesn't provide a mechanism to substitute a replacement keyword with
77dnl arbitrary data or pathnames.
78dnl
79host_makefile_frag_path=$host_makefile_frag
80AC_SUBST(host_makefile_frag_path)
81AC_SUBST_FILE(host_makefile_frag)
82
83AC_OUTPUT(Makefile,
84. ${libgloss_topdir}/config-ml.in,
85srcdir=${srcdir}
86target=${target}
87ac_configure_args="${ac_configure_args} --enable-multilib"
88CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
89libgloss_topdir=${libgloss_topdir}
90)
This page took 0.028666 seconds and 5 git commands to generate.