Develop and Download Open Source Software

Browse Subversion Repository

Contents of /mmaid/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 147 - (show annotations) (download)
Mon Dec 30 16:02:12 2013 UTC (10 years, 2 months ago) by iwm
File size: 5480 byte(s)
modify g_file_get_contents
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(src/mmaid.c)
3 PACKAGE=mmaid
4
5 dnl version number
6 MAJOR_VERSION=0
7 MINOR_VERSION=4
8 MICRO_VERSION=5
9 EXTRA_VERSION=
10 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
11
12 AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
13 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
14 AC_DEFINE_UNQUOTED(VERSION,"$VERSION")
15
16 AC_USE_SYSTEM_EXTENSIONS
17 AC_CONFIG_MACRO_DIR([m4])
18
19 dnl Getting the Canonical System Type
20 AC_CANONICAL_HOST
21 AC_DEFINE_UNQUOTED(BUILD_ENVIRONMENT,"${host}",Define to the build environment.)
22
23 dnl Specify a header configuration file
24 AM_CONFIG_HEADER(config.h)
25
26 dnl **************************************************************
27 dnl Checks for programs.
28 dnl **************************************************************
29 AC_C_BIGENDIAN
30 AC_ISC_POSIX
31 AC_PROG_CC
32 AC_PROG_INSTALL
33 AC_PROG_MAKE_SET
34 AM_MAINTAINER_MODE
35
36 dnl **************************************************************
37 dnl libtool
38 dnl **************************************************************
39 AC_ENABLE_SHARED(yes)
40 AC_ENABLE_STATIC(no)
41 AM_PROG_LIBTOOL
42
43 dnl **************************************************************
44 dnl Check for GTK+.
45 dnl **************************************************************
46 AM_PATH_GTK_2_0(2.0.0,,AC_MSG_ERROR(Test for GTK+-2.0 failed.))
47
48 dnl **************************************************************
49 dnl Check for Mime globs file.
50 dnl **************************************************************
51 AC_ARG_ENABLE(mime,
52 [ --enable-mime[=FILE] Enable mime globs file])
53 if test -z "$enable_mime" || test "$enable_mime" = 'yes'; then
54 if test -f "${datadir}/mime/globs"; then
55 mimefile="${datadir}/mime/globs"
56 elif test -f '/usr/local/share/mime/globs'; then
57 mimefile='/usr/local/share/mime/globs'
58 elif test -f '/usr/share/mime/globs'; then
59 mimefile='/usr/share/mime/globs'
60 elif test "$enable_mime" = 'yes'; then
61 mimefile="${datadir}/mime/globs"
62 fi
63 elif test "$enable_mime" != 'no'; then
64 mimefile="$enable_mime"
65 fi
66 if test -n "$mimefile"; then
67 enable_mime='yes'
68 else
69 enable_mime='no'
70 fi
71 AM_CONDITIONAL(ENABLE_MIME,test "$enable_mime" = 'yes')
72 AC_SUBST(mimefile)
73
74 dnl **************************************************************
75 dnl add /usr/local/include to $CFLAGS.
76 dnl Only when the directory exists and it wasn't there yet.
77 dnl **************************************************************
78 if test -d /usr/local/include; then
79 tt=`echo "$CFLAGS" | sed -e 's+-I/usr/local/include ++g' -e 's+-I/usr/local/include$++g'`
80 if test "$tt" = "$CFLAGS"; then
81 CFLAGS="$CFLAGS -I/usr/local/include"
82 fi
83 fi
84 if test -d /usr/local/lib; then
85 tt=`echo "$CFLAGS" | sed -e 's+-L/usr/local/lib ++g' -e 's+-L/usr/local/lib$++g'`
86 if test "$tt" = "$CFLAGS"; then
87 CFLAGS="$CFLAGS -L/usr/local/lib"
88 fi
89 fi
90
91 dnl **************************************************************
92 dnl Check for sysconfdir.
93 dnl **************************************************************
94 AC_SUBST(sysconfdir)
95
96 dnl **************************************************************
97 dnl Check for gettext.
98 dnl **************************************************************
99 ALL_LINGUAS='ja'
100 my_save_CFLAGS="$CFLAGS"
101 AC_CHECK_LIB(intl, libintl_nl_domain_bindings, CFLAGS="$CFLAGS -D_nl_domain_bindings=libintl_nl_domain_bindings")
102 AM_GNU_GETTEXT
103 CFLAGS="$my_save_CFLAGS"
104 AC_CHECK_FUNC(gettext,,AC_CHECK_LIB(intl,gettext))
105 localedir="${datadir}/locale"
106 AC_SUBST(localedir)
107
108 dnl **************************************************************
109 dnl Checks for header files.
110 dnl **************************************************************
111 AC_HEADER_STDBOOL
112 AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h complex.h dirent.h fcntl.h netdb.h netinet/in.h resolv.h stdint.h sys/file.h sys/mman.h sys/param.h sys/select.h sys/socket.h sys/stat.h sys/time.h sys/timeb.h sys/types.h unistd.h utime.h)
113
114 dnl **************************************************************
115 dnl Checks for typedefs and structures.
116 dnl **************************************************************
117 AC_C_CONST
118 AC_C_VOLATILE
119 AC_STRUCT_TM
120 AC_TYPE_SIZE_T
121
122 dnl **************************************************************
123 dnl Checks for compiler characteristics.
124 dnl **************************************************************
125 if test "$GCC" = 'yes'; then
126 CFLAGS="$CFLAGS -Wall"
127 fi
128 if $LD --help 2> /dev/null | grep as-needed > /dev/null; then
129 LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
130 fi
131
132 dnl **************************************************************
133 dnl Checks for library functions.
134 dnl **************************************************************
135 AC_FUNC_ALLOCA
136 AC_FUNC_MEMCMP
137 AC_FUNC_MKTIME
138 AC_FUNC_SETVBUF_REVERSED
139 AC_FUNC_STAT
140 AC_FUNC_LSTAT
141 AC_FUNC_STRCOLL
142 AC_FUNC_STRFTIME
143 AC_FUNC_VPRINTF
144 AC_CHECK_FUNCS(asprintf clock_gettime flock ftruncate getcwd gettimeofday gmtime_r kill lstat nanosleep setenv sleep timegm tzset unsetenv usleep utime vasprintf)
145
146 AC_OUTPUT([
147 Makefile
148 Makefile.msc
149 intl/Makefile
150 iwmcrt/Makefile
151 po/Makefile.in
152 gcommon/Makefile
153 misc/Makefile
154 orz/Makefile
155 src/Makefile
156 ])
157
158 dnl **************************************************************
159 dnl Show some info.
160 dnl **************************************************************
161 AC_MSG_RESULT([
162 Configure Result :
163
164 Package : ${PACKAGE}
165 Version : ${VERSION}
166 C Compiler : ${CC} ${CFLAGS}
167 Install path : ${prefix}
168 Config : ${sysconfdir}
169 Locale : ${localedir}
170 Mime globs : ${mimefile}
171 Environment : ${host}
172 ])

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26