Développer et télécharger des logiciels Open Source

Browse Subversion Repository

Annotation of /kazehakase/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3015 - (hide annotations) (download)
Mon Mar 26 04:39:07 2007 UTC (17 years, 2 months ago) by makeinu
File size: 14847 byte(s)
Embed kazehakase icon into the executable file for Microsoft Windows.
But currently you have to convert the icon manually.

1 ikezoe 3 dnl Process this file with autoconf to produce a configure script.
2 ikezoe 927 AC_PREREQ(2.57)
3    
4 furyo 2833 AC_INIT(kazehakase, 0.4.4.1)
5 ikezoe 927 AM_INIT_AUTOMAKE(1.6)
6 ikezoe 3 AM_CONFIG_HEADER(config.h)
7    
8 makeinu 55 AC_ENABLE_SHARED(yes)
9     AC_ENABLE_STATIC(no)
10     AM_PROG_LIBTOOL
11    
12 ikezoe 2651 LT_VERSION_INFO="1:0:1"
13     LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
14     AC_SUBST(LT_VERSION_INFO)
15     AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
16    
17 ikezoe 1997 AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no])
18 ikezoe 2000
19     AC_PROG_CXX
20     AC_PROG_CC
21     AC_PROG_CPP
22     AC_PROG_INSTALL
23     AC_PROG_LN_S
24     AC_PROG_MAKE_SET
25     AC_PROG_AWK
26    
27     dnl disable RTTI by default
28     AC_ARG_ENABLE(cpp-rtti,
29     [ --enable-cpp-rtti Enable C++ RTTI (for cvs gcc)],,
30     enable_cpp_rtti=no)
31    
32     if test "x$enable_cpp_rtti" = "xno"; then
33 ikezoe 2134 AM_CXXFLAGS="-fno-rtti $AM_CXXFLAGS"
34 ikezoe 2000 fi
35 ikezoe 2134
36 makeinu 59 dnl **************************************************************
37 ikezoe 2911 dnl Configure for embed module.
38     dnl **************************************************************
39     embeddir="${libdir}/\$(PACKAGE)/embed"
40     AC_SUBST(embeddir)
41    
42     dnl **************************************************************
43 makeinu 59 dnl Check for GtkMozEmbed.
44     dnl **************************************************************
45 ikezoe 1997
46 ikezoe 2844 KAZEHAKASE_GECKO_CHECK
47 makeinu 59
48 ikezoe 1997 dnl **************************************************************
49 makeinu 59 dnl Check for Gtk+2.
50     dnl **************************************************************
51 ikezoe 3 dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
52     dnl pass to pkg-config
53 ikezoe 2525 AM_PATH_GTK_2_0(2.6.0)
54 makeinu 55 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
55 ikezoe 1327 AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
56 ikezoe 3
57 makeinu 59 dnl **************************************************************
58 ikezoe 2875 dnl Check Glib version
59     dnl **************************************************************
60     PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.13.0, GLIB_HAS_NO_REGREX="no", GLIB_HAS_NO_REGEX="yes")
61     AM_CONDITIONAL(GLIB_HAS_NO_REGEX, test x"$GLIB_HAS_NO_REGEX" = "xyes")
62    
63     dnl **************************************************************
64 ikezoe 1700 dnl Check for gtk-webcore.
65     dnl **************************************************************
66    
67 ikezoe 2936 gtk_webcore_exists=no
68 ikezoe 2999 PKG_CHECK_MODULES(NRCIT, osb-nrcit >= 0.5.2,
69 ikezoe 2936 [gtk_webcore_exists=yes], [gtk_webcore_exists=no])
70     AC_SUBST([NRCIT_CFLAGS])
71     AC_SUBST([NRCIT_LIBS])
72     AM_CONDITIONAL([WITH_GTK_WEBCORE], [test x"$gtk_webcore_exists" = "xyes"])
73    
74 ikezoe 1700 dnl **************************************************************
75 tyuyu 2325 dnl Check for GNU TLS
76     dnl **************************************************************
77 ikezoe 2197 AC_ARG_ENABLE(ssl, [ --disable-ssl
78 tyuyu 2325 Disable GNU TLS suport],,
79 ikezoe 2197 disable_ssl=no)
80     if test x"$disable_ssl" = "xno"; then
81 tyuyu 2337 AM_PATH_LIBGNUTLS(1.2.0,
82     AC_DEFINE(USE_SSL, 1, [Define using GNU TLS]),
83     AC_MSG_WARN([[libgnutls was not found.]]))
84 ikezoe 2197 fi
85     AM_CONDITIONAL(ENABLE_SSL, test x"$disable_ssl" = "xno")
86 ikezoe 2195
87     dnl **************************************************************
88 ikezoe 2799 dnl Check for Session Management
89     dnl **************************************************************
90    
91     AC_PATH_XTRA
92    
93     SM_LIBS=""
94     sm_save_cppflags="$CPPFLAGS"
95     CPPFLAGS="$CPPFLAGS $X_CFLAGS"
96    
97     HAVE_SM=true
98     AC_CHECK_LIB(SM, SmcSaveYourselfDone,
99     [SM_LIBS="$X_LIBS -lSM -lICE"],HAVE_SM=false,
100     $X_LIBS -lICE)
101     AC_CHECK_HEADERS(X11/SM/SMlib.h,,HAVE_SM=false)
102     if test "$HAVE_SM" = true; then
103     AC_DEFINE(HAVE_LIBSM, 1, [Define to 1 if you have libSM installed])
104     fi
105    
106     AC_SUBST(SM_LIBS)
107     CPPFLAGS="$sm_save_cppflags"
108    
109     dnl **************************************************************
110 makeinu 59 dnl Check for gettext.
111     dnl **************************************************************
112 ikezoe 2309 ALL_LINGUAS="cs fr ja ru"
113 ikezoe 107 GETTEXT_PACKAGE=kazehakase
114     AC_SUBST(GETTEXT_PACKAGE)
115 makeinu 72 AM_GLIB_GNU_GETTEXT
116 makeinu 59 localedir="${datadir}/locale"
117     AC_SUBST(localedir)
118    
119 makeinu 72 dnl **************************************************************
120     dnl Checks for programs.
121     dnl **************************************************************
122 ikezoe 3
123 kous 2422 AC_ARG_ENABLE(Werror, [ --enable-Werror Enable -Werror option for GCC])
124    
125 ikezoe 457 if test "x$GCC" = "xyes"; then
126     case " $CFLAGS " in
127     *[\ \ ]-Wall[\ \ ]*) ;;
128     *) CFLAGS="$CFLAGS -Wall" ;;
129     esac
130    
131 makeinu 1635 case " $CFLAGS " in
132     *[\ \ ]-Wmissing-declarations[\ \ ]*) ;;
133     *) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
134     esac
135    
136     case " $CFLAGS " in
137     *[\ \ ]-Wmissing-prototypes[\ \ ]*) ;;
138     *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
139     esac
140    
141     case " $CFLAGS " in
142     *[\ \ ]-Wpointer-arith[\ \ ]*) ;;
143     *) CFLAGS="$CFLAGS -Wpointer-arith" ;;
144     esac
145    
146     case " $CFLAGS " in
147     *[\ \ ]-Wcast-align[\ \ ]*) ;;
148     *) CFLAGS="$CFLAGS -Wcast-align" ;;
149     esac
150    
151 kous 2422 if test "x$enable_Werror" = "xyes"; then
152     case " $CFLAGS " in
153     *[\ \ ]-Werror[\ \ ]*) ;;
154     *) CFLAGS="$CFLAGS -Werror" ;;
155     esac
156     fi
157    
158 ikezoe 457 if test "x$enable_ansi" = "xyes"; then
159     case " $CFLAGS " in
160     *[\ \ ]-ansi[\ \ ]*) ;;
161     *) CFLAGS="$CFLAGS -ansi" ;;
162     esac
163    
164     case " $CFLAGS " in
165     *[\ \ ]-pedantic[\ \ ]*) ;;
166     *) CFLAGS="$CFLAGS -pedantic" ;;
167     esac
168     fi
169     fi
170    
171 makeinu 72 dnl **************************************************************
172     dnl Checks for libraries.
173     dnl **************************************************************
174     # FIXME: Replace `main' with a function in `-le':
175     AC_CHECK_LIB([e], [main])
176     # FIXME: Replace `main' with a function in `-links':
177     AC_CHECK_LIB([inks], [main])
178    
179 kous 2898
180     AC_CHECK_HEADER(winsock2.h,
181 kous 2915 [AC_CACHE_CHECK([for socket in -lwsock32], [ac_kz_lib_wsock32],
182     [LIBS_save=$LIBS
183     LIBS="-lwsock32 $LIBS"
184     AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <winsock2.h>
185     ],
186     [socket(0,0,0)])],
187     [AS_VAR_SET([ac_kz_lib_wsock32], [yes])
188     SOCKET_LIBS="-lwsock32 $SOCKET_LIBS"],
189     [AS_VAR_SET([ac_kz_lib_wsock32], [no])])
190     LIBS=$LIBS_save])
191 kous 2898
192 kous 2915 AC_CACHE_CHECK([for WSASocket in -lws2_32], [ac_kz_lib_ws2_32],
193     [LIBS_save=$LIBS
194     LIBS="-lws2_32 $LIBS"
195     AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <winsock2.h>
196     ],
197     [WSASocket(0,0,0,0,0,0)])],
198     [AS_VAR_SET([ac_kz_lib_ws2_32], [yes])
199     SOCKET_LIBS="-lws2_32 $SOCKET_LIBS"],
200     [AS_VAR_SET([ac_kz_lib_ws2_32], [no])])
201     LIBS=$LIBS_save])])
202 kous 2898 AC_SUBST(SOCKET_LIBS)
203    
204 tyuyu 2167 dnl chekc zlib
205     AC_CHECK_HEADER(zlib.h,
206     [
207     dnl zlib.h was found
208     HAVE_ZLIB_H="1"
209     dnl if the lib wasn't found already, try again with the new paths
210     if test "$HAVE_LIBZ" != "1"; then
211     AC_CHECK_LIB(z, gzread,
212     [
213     dnl the lib was found!
214     HAVE_LIBZ="1"
215     ],
216     [ CPPFLAGS=$_cppflags
217     LDFLAGS=$_ldflags])
218     fi
219     ],
220     [
221     dnl zlib.h was not found, restore the flags
222     CPPFLAGS=$_cppflags
223     LDFLAGS=$_ldflags]
224     )
225     if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1"
226     then
227     AC_MSG_WARN([configure found only the libz lib, not the header file!])
228     elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"
229     then
230     AC_MSG_WARN([configure found only the libz header file, not the lib!])
231     elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"
232     then
233     ZLIB_LIBS=-lz
234     AC_SUBST(ZLIB_LIBS)
235     fi
236 makeinu 72
237     dnl **************************************************************
238     dnl Checks for header files.
239     dnl **************************************************************
240     AC_HEADER_STDC
241     AC_CHECK_HEADERS([fcntl.h libintl.h stdlib.h string.h unistd.h])
242    
243    
244     dnl **************************************************************
245     dnl Checks for typedefs, structures, and compiler characteristics.
246     dnl **************************************************************
247     AC_C_CONST
248    
249    
250     dnl **************************************************************
251     dnl Checks for library functions.
252     dnl **************************************************************
253 kous 2943 AC_CHECK_FUNCS([setlocale strchr strtol uname memmove strerror])
254     AC_CHECK_FUNC([strptime], [have_strptime=yes], [have_strptime=no])
255     AM_CONDITIONAL(HAVE_STRPTIME, test x"$have_strptime" = "xyes")
256 makeinu 72
257 ikezoe 848 dnl **************************************************************
258 ikezoe 985 dnl Migemo
259     dnl **************************************************************
260     AC_ARG_ENABLE(migemo, [ --enable-migemo
261     Enable Migemo (Japanese incremental search)])
262     if test x"$enable_migemo" = "xyes"; then
263     AC_DEFINE(USE_MIGEMO, 1, [Define using Migemo support])
264     fi
265    
266 kous 2401 dnl **************************************************************
267     dnl Configure for extentions.
268     dnl **************************************************************
269     extdir="${libdir}/\$(PACKAGE)/ext"
270     AC_SUBST(extdir)
271 tyuyu 2167
272 kous 2401 dnl **************************************************************
273     dnl Extention: Check for Ruby.
274     dnl **************************************************************
275     ruby_available="no"
276 kous 2452 AC_ARG_WITH([ruby],
277 kous 2401 AS_HELP_STRING([--with-ruby=PATH],
278 kous 2452 [Ruby interpreter path (default: auto-detect)]),
279     [RUBY="$withval"])
280 tyuyu 2167
281 kous 2450 if test "$RUBY" = "no"; then
282 kous 2401 : # ignore
283 kous 2450 elif test "$RUBY" = ""; then
284     AC_PATH_PROG(RUBY, ruby, none)
285     if test "$RUBY" != "none"; then
286 kous 2401 ruby_available="yes"
287     fi
288     else
289 kous 2450 AC_CHECK_FILE([$RUBY],
290 kous 2402 [ruby_available="yes"],
291 kous 2452 [AC_MSG_WARN([$RUBY is not found. Disable Ruby extension.])])
292 kous 2401 fi
293    
294     if test "$ruby_available" = "yes"; then
295 kous 2450 rbconfig="$RUBY -rrbconfig -e "
296 kous 2408
297     changequote(<<, >>)
298 kous 2588 for var_name in archdir sitearchdir CFLAGS LIBRUBYARG libdir; do
299 kous 2408 rbconfig_tmp=`$rbconfig "print Config::CONFIG['$var_name']"`
300     eval "rbconfig_$var_name=\"$rbconfig_tmp\""
301     done
302     changequote([, ])
303    
304     RUBY_CFLAGS="$RUBY_CFLAGS -I$rbconfig_archdir "
305     RUBY_CFLAGS="$RUBY_CFLAGS -I$rbconfig_sitearchdir "
306     RUBY_CFLAGS="$RUBY_CFLAGS $rbconfig_CFLAGS "
307     RUBY_LIBS="$rbconfig_LIBRUBYARG"
308     RUBY_LDFLAGS="-L$rbconfig_libdir"
309    
310 kous 2401 AC_SUBST(RUBY_CFLAGS)
311     AC_SUBST(RUBY_LIBS)
312     AC_SUBST(RUBY_LDFLAGS)
313 kous 2403
314     _SAVE_CFLAGS=$CFLAGS
315 erisnu 2444 ruby_undef_package_macros="
316 kous 2403 #undef PACKAGE_NAME
317     #undef PACKAGE_TARNAME
318     #undef PACKAGE_STRING
319     #undef PACKAGE_VERSION
320 erisnu 2444 "
321     ruby_disable_message="Disable Ruby extension."
322     CFLAGS="$CFLAGS $RUBY_CFLAGS"
323     AC_CHECK_HEADERS(ruby.h, [],
324 kous 2588 [ruby_available="no"
325 erisnu 2444 AC_MSG_WARN([$ruby_disable_message])],
326     [$ruby_undef_package_macros])
327     if test "x$ruby_available" = "xyes"; then
328     CFLAGS="$CFLAGS $GTK_CFLAGS"
329     AC_CHECK_HEADERS(rbgtk.h, [],
330 kous 2588 [ruby_available="no"
331 kous 2625 AC_MSG_WARN([$ruby_disable_message])],
332 erisnu 2444 [$ruby_undef_package_macros])
333     fi
334 kous 2403 CFLAGS=$_SAVE_CFLAGS
335 kous 2401 fi
336    
337     AM_CONDITIONAL([WITH_RUBY], [test "$ruby_available" = "yes"])
338    
339    
340 kous 2449 dnl **************************************************************
341 kous 2450 dnl Configure for gettext from Ruby scripts
342     dnl **************************************************************
343 kous 2452 AC_ARG_WITH([rgettext],
344     AS_HELP_STRING([--with-rgettext=PATH],
345     [rgettext path (default: auto-detect)]),
346     [RGETTEXT="$withval"])
347 kous 2450
348 kous 2452 if test "$RGETTEXT" = "no"; then
349     RGETTEXT=""
350     elif test "$RGETTEXT" = ""; then
351     AC_PATH_PROG(RGETTEXT, rgettext, none)
352     if test "$RGETTEXT" = "none"; then
353 kous 2450 RGETTEXT=""
354     fi
355 kous 2452 else
356     rgettext_message="$RGETTEXT is not found. Disable gettext from Ruby scripts."
357     AC_CHECK_FILE([$RGETTEXT], [],
358     [RGETTEXT=""
359     AC_MSG_WARN([$rgettext_message])])
360     fi
361 kous 2450
362 kous 2452 RGETTEXT_TARGETS=""
363     if test "$RGETTEXT" != ""; then
364     changequote(<<, >>)
365     for dir in data/ext/ruby; do
366     tmp_targets="`find $dir -name '*.rb' -exec echo \$\(top_srcdir\)/\{\} \;`"
367     RGETTEXT_TARGETS="$RGETTEXT_TARGETS `echo $tmp_targets | xargs echo`"
368     done
369     changequote([, ])
370 kous 2450 fi
371 kous 2452 AC_SUBST(RGETTEXT_TARGETS)
372 kous 2450
373     dnl **************************************************************
374 kous 2449 dnl Configure for UI XML
375     dnl **************************************************************
376     if test "$ruby_available" = "yes" ; then
377     UI_XML_RUBY_START=""
378     UI_XML_RUBY_END=""
379     else
380     UI_XML_RUBY_START="<!--"
381     UI_XML_RUBY_END="-->"
382     fi
383    
384     AC_SUBST([UI_XML_RUBY_START])
385     AC_SUBST([UI_XML_RUBY_END])
386    
387 kous 2611 KZ_BACKENDS="\$(GECKO)-\$(MOZILLA_COMPONENT_VERSION)"
388     AC_SUBST([KZ_BACKENDS])
389 kous 2449
390 ikezoe 2651 dnl **************************************************************
391     dnl Configure for history search module.
392     dnl **************************************************************
393     searchdir="${libdir}/\$(PACKAGE)/search"
394     AC_SUBST(searchdir)
395    
396 ikezoe 2658 dnl **************************************************************
397     dnl Check for Hyper Estraier.
398     dnl **************************************************************
399    
400     est_exists=no
401 kous 2941 AC_ARG_ENABLE([heyper-estraier],
402     AS_HELP_STRING([--disable-hyper-estraier],
403     [Disable Hyper Estraier support]))
404     if test "x$enable_hyper_estraier" = "x" -o \
405     "x$enable_hyper_estraier" = "xyes"; then
406     PKG_CHECK_MODULES(EST, hyperestraier,
407     [est_exists=yes], [est_exists=no])
408     fi
409 ikezoe 2658 AM_CONDITIONAL([WITH_EST], [test "$est_exists" = "yes"])
410    
411 ikezoe 2682 dnl **************************************************************
412     dnl Check for Anthy
413     dnl **************************************************************
414    
415     anthy_exists=no
416     PKG_CHECK_MODULES(ANTHY, anthy,
417     [anthy_exists=yes], [anthy_exists=no])
418 kous 2804
419     AC_PATH_PROG(MECAB_CONFIG, mecab-config, "none")
420     if test x"$MECAB_CONFIG" = x"none"; then
421     mecab_exists=no
422     MECAB_LIBS=""
423     MECAB_CFLAGS=""
424     else
425     mecab_exists=yes
426     MECAB_LIBS=`$MECAB_CONFIG --libs`
427     MECAB_CFLAGS=`$MECAB_CONFIG --cflags`
428     fi
429 ikezoe 2682 AC_SUBST([MECAB_CFLAGS])
430     AC_SUBST([MECAB_LIBS])
431 kous 2804
432     if test x"$anthy_exists" = "xyes" -a x"$mecab_exists" = "xyes" ; then
433 kous 2838 anthy_trainer_available="yes"
434 kous 2804 else
435 kous 2838 anthy_trainer_available="no"
436 ikezoe 2706 fi
437 ikezoe 2682
438 kous 2838 anthy_trainer_available="no"
439     AM_CONDITIONAL([WITH_ANTHY_TRAINER], [test x"$anthy_trainer_available" = "xyes"])
440     if test x"$anthy_trainer_available" = "xyes" ; then
441 ikezoe 2806 AC_DEFINE(WITH_ANTHY_TRAINER, 1, [Define to 1 if Anthy and Mecab is found])
442 kous 2804 fi
443    
444 kous 2945 dnl **************************************************************
445     dnl Check for MinGW
446     dnl **************************************************************
447    
448     AC_ARG_ENABLE([mingw-debug],
449     AS_HELP_STRING([--enable-mingw-debug],
450     [Enable MinGW debug]))
451     case $host_os in
452     mingw*)
453     if test "x$enable_mingw_debug" != "xno"; then
454     LDFLAGS="$LDFLAGS -mwindows"
455     fi
456 makeinu 3015 AC_CHECK_TOOL(WINDRES, windres)
457 kous 2945 ;;
458     esac
459 makeinu 3015 AM_CONDITIONAL([HAVE_WINDRES], [test x"$WINDRES" != x])
460 kous 2945
461 ikezoe 2134 AC_SUBST([AM_CPPFLAGS])
462     AC_SUBST([AM_CFLAGS])
463     AC_SUBST([AM_CXXFLAGS])
464     AC_SUBST([AM_LDFLAGS])
465    
466 makeinu 72 AC_CONFIG_FILES([
467 makeinu 21 Makefile
468 makeinu 59 po/Makefile.in
469 makeinu 21 src/Makefile
470 kous 2941 src/missing/Makefile
471 makeinu 453 src/utils/Makefile
472 ikezoe 2875 src/utils/pcre/Makefile
473 makeinu 453 src/net/Makefile
474     src/actions/Makefile
475 makeinu 253 src/bookmarks/Makefile
476 ikezoe 1532 src/dialogs/Makefile
477 makeinu 122 src/prefs_ui/Makefile
478 makeinu 151 src/sidebar/Makefile
479 ikezoe 706 src/widget/Makefile
480 ikezoe 1323 src/libegg/Makefile
481     src/libegg/md5/Makefile
482     src/libegg/pixbufthumbnail/Makefile
483 ikezoe 2651 module/Makefile
484 ikezoe 2897 module/embed/Makefile
485     module/embed/gecko/Makefile
486 ikezoe 2999 module/embed/gtk-webcore/Makefile
487 ikezoe 2651 module/search/Makefile
488 makeinu 136 etc/Makefile
489 kous 2449 etc/kz-ui-beginner.xml
490     etc/kz-ui-medium.xml
491     etc/kz-ui-expert.xml
492 makeinu 1625 etc/mozilla/Makefile
493 kous 2387 ext/Makefile
494 kous 2401 ext/ruby/Makefile
495 ikezoe 231 data/Makefile
496     data/icons/Makefile
497 kous 2387 data/ext/Makefile
498 kous 2401 data/ext/ruby/Makefile
499 kous 2406 data/ext/ruby/kz/Makefile
500     data/ext/ruby/kz/actions/Makefile
501 ikezoe 1958 doc/Makefile
502 ikezoe 521 kazehakase.spec
503 makeinu 21 ])
504 makeinu 72
505     AC_OUTPUT

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