OSDN Git Service

* cygpath.cc (main): Remove enforcing "en_US.UTF-8" locale.
[pf3gnuchains/pf3gnuchains3x.git] / rda / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(README)
3 AC_CANONICAL_SYSTEM
4 AM_INIT_AUTOMAKE(rda, 0.1)
5 AM_CONFIG_HEADER(config.h:config.in)
6
7 dnl automake support
8 AM_MAINTAINER_MODE
9 dnl AC_LIBTOOL_WIN32_DLL
10 AM_PROG_LIBTOOL
11 AC_EXEEXT
12 AC_LANG_C
13
14 dnl Check for types
15 AC_CHECK_HEADERS(sys/time.h)
16 AC_HEADER_TIME
17
18 dnl Check for host characteristics
19 AC_C_BIGENDIAN
20
21 dnl Check for socket libs
22 AC_CHECK_LIB(socket, connect)
23 AC_CHECK_LIB(nsl, gethostbyname)
24 AC_CHECK_LIB(resolv, gethostbyname)
25 AC_CHECK_HEADERS(sys/socket.h netinet/in.h netinet/tcp.h arpa/inet.h)
26
27 # NOTE: Don't add -Wall or -Wunused, they both include
28 # -Wunused-parameter which reports bogus warnings.
29 build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
30 -Wformat -Wparentheses -Wpointer-arith"
31 # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
32 # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
33 # -Wchar-subscripts -Wuninitialized -Wtraditional -Wshadow -Wcast-qual
34 # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
35 # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
36 # -Woverloaded-virtual -Winline -Werror"
37 AC_ARG_ENABLE(build-warnings,
38 [  --enable-build-warnings Enable build-time compiler warnings if gcc is used],
39 [case "${enableval}" in
40   yes)  ;;
41   no)   build_warnings="-w";;
42   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
43         build_warnings="${build_warnings} ${t}";;
44   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
45         build_warnings="${t} ${build_warnings}";;
46   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
47 esac
48 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
49   echo "Setting compiler warning flags = $build_warnings" 6>&1
50 fi])dnl
51 AC_ARG_ENABLE(rda-build-warnings,
52 [  --enable-rda-build-warnings Enable RDA specific build-time compiler warnings if gcc is used],
53 [case "${enableval}" in
54   yes)  ;;
55   no)   build_warnings="-w";;
56   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
57         build_warnings="${build_warnings} ${t}";;
58   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
59         build_warnings="${t} ${build_warnings}";;
60   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
61 esac
62 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
63   echo "Setting LIBREMOTE specific compiler warning flags = $build_warnings" 6>&1
64 fi])dnl
65 WARN_CFLAGS=""
66 WERROR_CFLAGS=""
67 if test "x${build_warnings}" != x -a "x$GCC" = xyes
68 then
69     AC_MSG_CHECKING(compiler warning flags)
70     # Separate out the -Werror flag as some files just cannot be
71     # compiled with it enabled.
72     for w in ${build_warnings}; do
73         case $w in
74         -Werr*) WERROR_CFLAGS=-Werror ;;
75         *) # Check that GCC accepts it
76             if $CC $w 2>&1 | grep 'unrecognized option' > /dev/null; then
77                 :
78             else
79                 WARN_CFLAGS="${WARN_CFLAGS} $w"
80             fi
81         esac
82     done
83     AC_MSG_RESULT(${WARN_CFLAGS}${WERROR_CFLAGS})
84 fi
85 AC_SUBST(WARN_CFLAGS)
86 AC_SUBST(WERROR_CFLAGS)
87
88 # Add target dependent subdirectories here
89 targ_subdirs=
90 case "$target" in
91    *linux*)
92       targ_subdirs="$targ_subdirs unix"
93       AC_CONFIG_SUBDIRS(unix)
94    ;;
95 esac
96
97 dnl $targ_subdirs is expanded at configure run time
98 AC_SUBST(targ_subdirs)
99
100 dnl Outputs
101 AC_OUTPUT(Makefile lib/Makefile samples/Makefile qe/Makefile)