OSDN Git Service

2008-11-13 Frank Ch. Eigler <fche@elastic.org>
[pf3gnuchains/pf3gnuchains4x.git] / sid / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(Makefile.in)
3 AC_CONFIG_AUX_DIR(config)
4
5 dnl set $CC early on
6 AC_PROG_CC
7
8 AM_INIT_AUTOMAKE(sid, 0.1-net)
9
10 dnl automake support
11 AM_MAINTAINER_MODE
12 AC_EXEEXT
13 AC_PROG_CXX
14 AC_PROG_CXXCPP
15 AC_PROG_MAKE_SET
16 AC_LANG_CPLUSPLUS
17
18 dnl The following is needed for config/info.tcl.
19 CY_SIDTARGET_CHECK
20
21 dnl Disable shared libraries
22 AC_CACHE_CHECK(whether can build shared SID component libraries, ac_cv_libstdcxx_shared, [
23    CY_LIBSTDCXX_CHECK
24    ac_cv_libstdcxx_shared=$have_libstdcxx_shared
25 ])
26
27 if test x$ac_cv_libstdcxx_shared != xyes -o x$enable_shared = xno
28 then
29   AC_MSG_WARN(Disabling shared SID component libraries.)
30   # This variable is not really proper to mess with.  However,
31   # there appears to be no other way of adding an extra argument
32   # to child directories' configure runs.  This is largely safe
33   # because this code is run long after the ac_configure_args were
34   # parsed for the enable_* etc. args.
35   ac_configure_args="$ac_configure_args --disable-shared"
36   enable_shared=no
37 else
38   enable_shared=yes
39 fi
40 AC_SUBST(enable_shared)
41 AC_SUBST(target)
42
43 # In case this directory exists, we prefer it to non-pic.
44 # In case it doesn't exist, create at least a blank one here, so libtool doesn't barf looking for it
45 mkdir -p ../libiberty/pic
46
47 AC_CONFIG_SUBDIRS(include component main bsp samples demos)
48 AC_OUTPUT(Makefile doc/Makefile config/info.tcl)