OSDN Git Service

Use datarootdir for locales.
[pf3gnuchains/pf3gnuchains4x.git] / sid / component / cgen-cpu / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(compCGEN.cxx)
3 AC_CONFIG_AUX_DIR(../../config)
4 AM_INIT_AUTOMAKE(sidcomp,0.1)
5 AM_CONFIG_HEADER(config.h:config.in)
6
7 dnl automake support
8 AM_MAINTAINER_MODE
9 AC_LIBTOOL_WIN32_DLL
10 AM_PROG_LIBTOOL
11 AC_PROG_CXX
12 AC_PROG_CXXCPP
13 AC_EXEEXT
14 AC_LANG_CPLUSPLUS
15
16 AC_CHECK_LIB(m, main)
17 AC_CHECK_LIB(pthread, pthread_create)
18 AC_CHECK_FUNCS(getopt)
19
20 dnl Need extra defines for Solaris threads
21 case "$host" in
22   sparc-sun-solaris*)
23     # Note: If _REENTRANT isn't defined, then Solaris
24     # won't define thread-safe library routines.
25     cpu_defs="-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
26     ;;
27   *)
28     cpu_defs=
29     ;;
30 esac
31
32 dnl Check if we need libintl.
33 AC_MSG_CHECKING([whether libintl is required for gettext])
34 AC_LANG_SAVE
35 AC_LANG_C
36 AC_TRY_LINK_FUNC([textdomain],
37   [INTLLIBS=; AC_MSG_RESULT([no])],
38   [INTLLIBS='-L../../../intl -lintl']; AC_MSG_RESULT([yes]))
39 AC_LANG_RESTORE
40
41 dnl Perform --target/--enable-targets processing.
42 CY_SIDTARGET_CHECK
43
44 # Add per-target-family subdirectories here
45 cpu_subdirs=
46 cpu_libs=
47 cpu_incl=
48 if test $sidtarget_arm -eq 1; then
49         cpu_subdirs="$cpu_subdirs arm7t"
50         AC_CONFIG_SUBDIRS(arm7t)
51 fi
52 if test $sidtarget_m32r -eq 1; then
53         cpu_subdirs="$cpu_subdirs m32r"
54         AC_CONFIG_SUBDIRS(m32r)
55 fi
56 if test $sidtarget_mep -eq 1; then
57         cpu_subdirs="$cpu_subdirs mep"
58         AC_CONFIG_SUBDIRS(mep)
59 fi
60 if test $sidtarget_mt -eq 1; then
61         cpu_subdirs="$cpu_subdirs mt"
62         AC_CONFIG_SUBDIRS(mt)
63 fi
64 if test $sidtarget_sh -eq 1 -o $sidtarget_sh64 -eq 1; then
65         cpu_subdirs="$cpu_subdirs sh"
66         AC_CONFIG_SUBDIRS(sh)
67 fi
68 if test $sidtarget_xstormy16 -eq 1; then
69         cpu_subdirs="$cpu_subdirs xstormy16"
70         AC_CONFIG_SUBDIRS(xstormy16)
71 fi
72
73 for dir in $cpu_subdirs; do
74         cpu_libs="$cpu_libs $dir/lib$dir.la"
75         cpu_incl="$cpu_incl -I$srcdir/$dir"
76 done
77
78 AC_SUBST(cpu_subdirs)
79 AC_SUBST(cpu_defs)
80 AC_SUBST(cpu_incl)
81 AC_SUBST(cpu_libs)
82 AC_SUBST(cpu_defs)
83 AC_SUBST(INTLLIBS)
84
85 dnl Look for GUILE in install tree
86 AC_CHECK_PROGS(GUILE, guile, false)
87
88 dnl building docs
89 RH_DOCBUILD_CHECK
90
91 gcc_AC_CHECK_DECLS([vasprintf asprintf basename getopt], [], [], [
92 #include <stdio.h>
93 #include <string.h>
94 ])
95
96 dnl Outputs
97 AC_OUTPUT(Makefile CGEN.sh)