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 2115 - (hide annotations) (download)
Fri Apr 29 05:18:53 2005 UTC (19 years, 1 month ago) by ikezoe
Original Path: kazehakase/trunk/configure.in
File size: 12062 byte(s)
version 0.2.7

1 ikezoe 3 dnl Process this file with autoconf to produce a configure script.
2 ikezoe 927 AC_PREREQ(2.57)
3    
4 ikezoe 2115 AC_INIT(kazehakase, 0.2.7)
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 1997 AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no])
13 ikezoe 2000
14     AC_PROG_CXX
15     AC_PROG_CC
16     AC_PROG_CPP
17     AC_PROG_INSTALL
18     AC_PROG_LN_S
19     AC_PROG_MAKE_SET
20     AC_PROG_AWK
21    
22     dnl disable RTTI by default
23     AC_ARG_ENABLE(cpp-rtti,
24     [ --enable-cpp-rtti Enable C++ RTTI (for cvs gcc)],,
25     enable_cpp_rtti=no)
26    
27     if test "x$enable_cpp_rtti" = "xno"; then
28     AM_CXXFLAGS="-fno-rtti $CXXFLAGS"
29     fi
30 makeinu 59 dnl **************************************************************
31     dnl Check for GtkMozEmbed.
32     dnl **************************************************************
33 ikezoe 1997 GECKO=
34 ikezoe 2062 AC_ARG_WITH([gecko_engine],
35 ikezoe 1997 AS_HELP_STRING([--with-gecko-engine@<:@=mozilla|firefox|thunderbird@:>@],
36     [Whether to use mozilla, firefox or thunderbird gtkmozembed (default: mozilla)]),
37     [GECKO="$withval"])
38    
39     dnl try to autodetect: if mozilla exists, use it, else try firefox, then thunderbird
40     if test "x$GECKO" = "x"; then
41     if $PKG_CONFIG --exists firefox-gtkmozembed; then
42     GECKO=firefox
43 ikezoe 2035 elif $PKG_CONFIG --exists mozilla-firefox-gtkmozembed; then
44 ikezoe 2034 GECKO=mozilla-firefox
45 ikezoe 1997 elif $PKG_CONFIG --exists mozilla-gtkmozembed; then
46     GECKO=mozilla
47     elif $PKG_CONFIG --exists thunderbird-gtkmozembed; then
48     GECKO=thunderbird
49     else
50     AC_MSG_ERROR([no mozilla installation found])
51     fi
52 ikezoe 2114 elif test "x$with_gecko_engine" != "xmozilla" -a "x$with_gecko_engine" != "xfirefox" -a "x$with_gecko_engine" != "xthunderbird" -a "x$with_gecko_engine" != "xmozilla-firefox"; then
53 ikezoe 1997 AC_MSG_ERROR([unknown gecko engine name ($GECKO)])
54     fi
55     AC_SUBST(GECKO)
56    
57     AC_MSG_RESULT([$GECKO])
58    
59     case "$GECKO" in
60     mozilla) min_version=1.7 flavour=mozilla ;;
61     firefox) min_version=1.0 flavour=toolkit ;;
62 ikezoe 2034 mozilla-firefox) min_version=1.0 flavour=toolkit ;;
63 ikezoe 1997 thunderbird) min_version=0.8 flavour=toolkit ;;
64     esac
65    
66     GECKO_FLAVOUR=$flavour
67     AC_SUBST(GECKO_FLAVOUR)
68    
69     PKG_CHECK_MODULES(MOZILLA_COMPONENT, $GECKO-gtkmozembed >= $min_version $GECKO-xpcom >= $min_version)
70    
71 ikezoe 3 AC_SUBST(MOZILLA_COMPONENT_CFLAGS)
72     AC_SUBST(MOZILLA_COMPONENT_LIBS)
73    
74 ikezoe 1997 MOZILLA_INCLUDE_ROOT="`$PKG_CONFIG --variable=includedir $GECKO-gtkmozembed`"
75 ikezoe 3 AC_SUBST(MOZILLA_INCLUDE_ROOT)
76    
77 ikezoe 1997 MOZILLA_HOME="`$PKG_CONFIG --variable=libdir $GECKO-gtkmozembed`"
78 ikezoe 3 AC_SUBST(MOZILLA_HOME)
79    
80 ikezoe 1997 MOZILLA_PREFIX="`$PKG_CONFIG --variable=prefix $GECKO-gtkmozembed`"
81     AC_SUBST(MOZILLA_PREFIX)
82 ikezoe 108
83 ikezoe 1338 dnl *************************************************************************
84     dnl This is from Mozilla's configure.in. They set almost all the config stuff
85     dnl they need in mozilla-config.h Except for this compiler flag, which can't
86     dnl go in mozilla-config.h So we check the flag too and now we can include
87     dnl mozilla-config.h without breaking epiphany.
88     dnl This is really gcc-only
89     dnl Do this test using CXX only since some versions of gcc
90     dnl 2.95-2.97 have a signed wchar_t in c++ only and some versions
91     dnl only have short-wchar support for c++.
92     AC_LANG_PUSH(C++)
93 ikezoe 2000 _SAVE_CPPFLAGS=$CPPFLAGS
94 ikezoe 1338 _SAVE_CXXFLAGS=$CXXFLAGS
95     _SAVE_AM_CXXFLAGS=$AM_CXXFLAGS
96     AM_CXXFLAGS="$AM_CXXFLAGS -fshort-wchar"
97     CXXFLAGS="$CXXFLAGS $AM_CXXFLAGS"
98    
99     AC_CACHE_CHECK(for compiler -fshort-wchar option,
100     ac_cv_have_usable_wchar_option,
101     [AC_TRY_RUN([#include <stddef.h>
102     int main () {
103     return (sizeof(wchar_t) != 2) ||
104     (wchar_t)-1 < (wchar_t) 0 ; } ],
105     ac_cv_have_usable_wchar_option="yes",
106     ac_cv_have_usable_wchar_option="no",
107     ac_cv_have_usable_wchar_option="maybe")])
108    
109     if test "$ac_cv_have_usable_wchar_option" != "yes"; then
110     AM_CXXFLAGS=$_SAVE_AM_CXXFLAGS
111     fi
112    
113 makeinu 59
114 ikezoe 2024 CPPFLAGS="-I$MOZILLA_INCLUDE_ROOT -I$MOZILLA_INCLUDE_ROOT/helperAppDlg -I$MOZILLA_INCLUDE_ROOT/dom -I$MOZILLA_INCLUDE_ROOT/exthandler -I$MOZILLA_INCLUDE_ROOT/pipnss -I$MOZILLA_INCLUDE_ROOT/necko `$PKG_CONFIG --cflags-only-I $GECKO-xpcom` -DMOZILLA_STRICT_API $WARN_CFLAGS"
115 ikezoe 2000 CXXFLAGS="$_SAVE_CXXFLAGS $AM_CXXFLAGS `$PKG_CONFIG --cflags-only-other $GECKO-xpcom`"
116 makeinu 59
117 ikezoe 2000 AC_MSG_RESULT([$CXXFLAGS])
118 makeinu 59 dnl **************************************************************
119 ikezoe 1997 dnl Check Mozilla API .
120     dnl This code picked from Epiphany-1.7.0.
121     dnl **************************************************************
122    
123 ikezoe 2000 AC_MSG_CHECKING([[whether we have a gtk 2 mozilla build]])
124    
125     AC_RUN_IFELSE(
126     [AC_LANG_SOURCE(
127     [[#include <mozilla-config.h>
128     #include <string.h>
129     int main(void) {
130     return strcmp (MOZ_DEFAULT_TOOLKIT, "gtk2") != 0;
131     } ]]
132     )],
133     [result=yes],
134 ikezoe 2055 [AC_MSG_ERROR([[Kazehakase needs a gtk 2 mozilla build]])],
135 ikezoe 2000 [result=maybe])
136    
137     AC_MSG_RESULT([$result])
138    
139     dnl Changed from PRUnichar* to nsAString& in 1.8a1 and on aviary branch
140    
141 ikezoe 1997 AC_MSG_CHECKING([whether nsIFilePicker methods expect nsAString&])
142    
143     AC_COMPILE_IFELSE(
144     [AC_LANG_PROGRAM(
145     [[#include <nsEmbedString.h>
146     #include <widget/nsIFilePicker.h>]],
147     [[nsIFilePicker *p;
148     p->SetDefaultString (nsEmbedString());]]
149     )],
150     [AC_DEFINE([MOZ_NSIFILEPICKER_NSASTRING_],[1],[Define if nsIFilePicker uses nsAString&]) result=yes],
151     [result=no])
152    
153     AC_MSG_RESULT([$result])
154    
155     dnl Changed from char* to nsAString& in 1.8a1
156    
157     AC_MSG_CHECKING([whether nsIMIMEInfo methods expect nsAString&])
158    
159     AC_COMPILE_IFELSE(
160     [AC_LANG_PROGRAM(
161     [[#include <nsEmbedString.h>
162     #include <mimetype/nsIMIMEInfo.h>]],
163     [[nsIMIMEInfo *p;
164     p->SetDescription (nsEmbedString());]]
165     )],
166     [AC_DEFINE([MOZ_NSIMIMEINFO_NSACSTRING_],[1],[Define if nsIMIMEInfo uses nsAString&]) result=yes],
167     [result=no])
168    
169     AC_MSG_RESULT([$result])
170    
171 ikezoe 2000 AC_MSG_CHECKING([whether nsICacheSession methods expect nsAString&])
172    
173     AC_COMPILE_IFELSE(
174     [AC_LANG_PROGRAM(
175     [[#include <nsEmbedString.h>
176     #include <nkcache/nsICacheSession.h>]],
177     [[nsICacheSession *p;
178     p->OpenCacheEntry (nsEmbedCString(),0, PR_FALSE, nsnull);]]
179     )],
180     [AC_DEFINE([MOZ_NSICACHESESSION_NSACSTRING_],[1],[Define if nsICacheSession uses nsAString&]) result=yes],
181     [result=no])
182    
183     AC_MSG_RESULT([$result])
184    
185 ikezoe 2021 AC_MSG_CHECKING([whether nsIHelperAppLauncherDialog methods expect PRBool])
186 ikezoe 2014
187     AC_COMPILE_IFELSE(
188     [AC_LANG_PROGRAM(
189     [[#include <nsIHelperAppLauncherDialog.h>]],
190     [[nsIHelperAppLauncherDialog *p;
191 ikezoe 2021 PRBool b;
192 ikezoe 2014 p->Show (nsnull, nsnull, b);]]
193     )],
194 ikezoe 2021 [AC_DEFINE([MOZ_NSIHELPERAPPLAUNCHERDIALOG_NSPRBOOL_],[1],[Define if nsIHelperAppLauncharDialog uses PRBool]) result=yes],
195 ikezoe 2014 [result=no])
196    
197     AC_MSG_RESULT([$result])
198    
199 ikezoe 1997 AC_CHECK_FILE([$MOZILLA_INCLUDE_ROOT/nsITransfer.h],
200     [AC_DEFINE([HAVE_NSITRANSFER_H],[1],[Define if nsITransfer.h exists])],
201     [AC_CHECK_FILE([$MOZILLA_INCLUDE_ROOT/uriloader/nsITransfer.h],
202     [AC_DEFINE([HAVE_NSITRANSFER_H],[1],[Define if nsITransfer.h exists])])])
203    
204 ikezoe 2046 AC_CHECK_FILE([$MOZILLA_INCLUDE_ROOT/nsIPresContext.h],
205     [AC_DEFINE([HAVE_NSIPRESCONTEXT_H],[1],[Define if nsIPresContext.h exists])],
206     [AC_CHECK_FILE([$MOZILLA_INCLUDE_ROOT/layout/nsIPresContext.h],
207     [AC_DEFINE([HAVE_NSIPRESCONTEXT_H],[1],[Define if nsIPresContext.h exists])])])
208    
209 ikezoe 2000 dnl restore flags
210     CPPFLAGS=$_SAVE_CPPFLAGS
211     CXXFLAGS=$_SAVE_CXXFLAGS
212    
213     AC_LANG_POP([C++])
214 ikezoe 1997 dnl Not a simple file check due to the header being in the SDK since 1.8a6
215     dnl https://bugzilla.mozilla.org/show_bug.cgi?id=271068
216    
217     if test "x$flavour" = "xmozilla"; then
218 ikezoe 2002 AC_CHECK_FILE([$MOZILLA_INCLUDE_ROOT/nsIPassword.h],
219     [AC_DEFINE([HAVE_NSIPASSWORD_H],[1],
220     [Define if mozilla nsIPassword header is available])])
221 ikezoe 1997 AC_CHECK_FILE([$MOZILLA_INCLUDE_ROOT/wallet/nsIPassword.h],
222     [AC_DEFINE([HAVE_NSIPASSWORD_H],[1],
223     [Define if mozilla nsIPassword header is available])])
224     elif test "x$flavour" = "xtoolkit"; then
225     AC_CHECK_FILE([$MOZILLA_INCLUDE_ROOT/passwordmgr/nsIPassword.h],
226     [AC_DEFINE([HAVE_NSIPASSWORD_H],[1],
227     [Define if mozilla nsIPassword header is available])])
228     fi
229    
230     dnl **************************************************************
231 makeinu 59 dnl Check for Gtk+2.
232     dnl **************************************************************
233 ikezoe 3 dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
234     dnl pass to pkg-config
235 ikezoe 1748 AM_PATH_GTK_2_0(2.4.0)
236 makeinu 55 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
237 ikezoe 1327 AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
238 ikezoe 3
239 makeinu 59 dnl **************************************************************
240 ikezoe 1700 dnl Check for gtk-webcore.
241     dnl **************************************************************
242 ikezoe 1704 AC_ARG_ENABLE(gtk_webcore, [ --enable-gtk-webcore
243 ikezoe 1700 Enable GTK-Webcore module for HTML rendering])
244 ikezoe 1704 if test x"$enable_gtk_webcore" = "xyes"; then
245 ikezoe 1706 PKG_CHECK_MODULES(NRCIT, osb-nrcit)
246     AC_SUBST(NRCIT_CFLAGS)
247     AC_SUBST(NRCIT_LIBS)
248 ikezoe 1704 AC_DEFINE(ENABLE_GTK_WEBCORE, 1, [Define using GTK-Webcore support])
249 ikezoe 1700 fi
250 ikezoe 1704 AM_CONDITIONAL(ENABLE_GTK_WEBCORE, test x"$enable_gtk_webcore" = "xyes")
251 ikezoe 1700
252     dnl **************************************************************
253 makeinu 59 dnl Check for gettext.
254     dnl **************************************************************
255 ikezoe 2100 ALL_LINGUAS="cs ja"
256 ikezoe 107 GETTEXT_PACKAGE=kazehakase
257     AC_SUBST(GETTEXT_PACKAGE)
258 makeinu 72 AM_GLIB_GNU_GETTEXT
259 makeinu 59 localedir="${datadir}/locale"
260     AC_SUBST(localedir)
261    
262 makeinu 72 dnl
263     dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
264     dnl
265 ikezoe 1587 dnl kz_save_LIBS=$LIBS
266     dnl LIBS="$LIBS $GTK_LIBS"
267     dnl AC_CHECK_FUNCS(bind_textdomain_codeset)
268     dnl LIBS=$kz_save_LIBS
269 makeinu 59
270 makeinu 72
271     dnl **************************************************************
272     dnl Checks for programs.
273     dnl **************************************************************
274 ikezoe 3
275 ikezoe 457 if test "x$GCC" = "xyes"; then
276     case " $CFLAGS " in
277     *[\ \ ]-Wall[\ \ ]*) ;;
278     *) CFLAGS="$CFLAGS -Wall" ;;
279     esac
280    
281 makeinu 1635 case " $CFLAGS " in
282     *[\ \ ]-Wmissing-declarations[\ \ ]*) ;;
283     *) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
284     esac
285    
286     case " $CFLAGS " in
287     *[\ \ ]-Wmissing-prototypes[\ \ ]*) ;;
288     *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
289     esac
290    
291     case " $CFLAGS " in
292     *[\ \ ]-Wpointer-arith[\ \ ]*) ;;
293     *) CFLAGS="$CFLAGS -Wpointer-arith" ;;
294     esac
295    
296     case " $CFLAGS " in
297     *[\ \ ]-Wcast-align[\ \ ]*) ;;
298     *) CFLAGS="$CFLAGS -Wcast-align" ;;
299     esac
300    
301 ikezoe 457 if test "x$enable_ansi" = "xyes"; then
302     case " $CFLAGS " in
303     *[\ \ ]-ansi[\ \ ]*) ;;
304     *) CFLAGS="$CFLAGS -ansi" ;;
305     esac
306    
307     case " $CFLAGS " in
308     *[\ \ ]-pedantic[\ \ ]*) ;;
309     *) CFLAGS="$CFLAGS -pedantic" ;;
310     esac
311     fi
312     fi
313    
314 makeinu 72 dnl **************************************************************
315     dnl Checks for libraries.
316     dnl **************************************************************
317     # FIXME: Replace `main' with a function in `-le':
318     AC_CHECK_LIB([e], [main])
319     # FIXME: Replace `main' with a function in `-links':
320     AC_CHECK_LIB([inks], [main])
321    
322    
323     dnl **************************************************************
324     dnl Checks for header files.
325     dnl **************************************************************
326     AC_HEADER_STDC
327     AC_CHECK_HEADERS([fcntl.h libintl.h stdlib.h string.h unistd.h])
328    
329    
330     dnl **************************************************************
331     dnl Checks for typedefs, structures, and compiler characteristics.
332     dnl **************************************************************
333     AC_C_CONST
334    
335    
336     dnl **************************************************************
337     dnl Checks for library functions.
338     dnl **************************************************************
339 ikezoe 1236 AC_CHECK_FUNCS([setlocale strchr strtol uname memmove strerror])
340 makeinu 72
341 ikezoe 848 dnl **************************************************************
342 ikezoe 985 dnl Migemo
343     dnl **************************************************************
344     AC_ARG_ENABLE(migemo, [ --enable-migemo
345     Enable Migemo (Japanese incremental search)])
346     if test x"$enable_migemo" = "xyes"; then
347     AC_DEFINE(USE_MIGEMO, 1, [Define using Migemo support])
348     fi
349    
350 makeinu 72 AC_CONFIG_FILES([
351 makeinu 21 Makefile
352 makeinu 59 po/Makefile.in
353 makeinu 21 src/Makefile
354 makeinu 453 src/utils/Makefile
355     src/net/Makefile
356 makeinu 136 src/mozilla/Makefile
357 ikezoe 1700 src/khtml/Makefile
358 makeinu 453 src/actions/Makefile
359 makeinu 253 src/bookmarks/Makefile
360 ikezoe 1532 src/dialogs/Makefile
361 makeinu 122 src/prefs_ui/Makefile
362 makeinu 151 src/sidebar/Makefile
363 ikezoe 706 src/widget/Makefile
364 ikezoe 1323 src/libegg/Makefile
365 ikezoe 1487 src/libegg/dropdowntoolbutton/Makefile
366 ikezoe 1323 src/libegg/md5/Makefile
367     src/libegg/pixbufthumbnail/Makefile
368 ikezoe 1338 src/libegg/regex/Makefile
369     src/libegg/regex/pcre/Makefile
370 makeinu 136 etc/Makefile
371 makeinu 1625 etc/mozilla/Makefile
372 ikezoe 231 data/Makefile
373     data/icons/Makefile
374 ikezoe 1958 doc/Makefile
375 ikezoe 521 kazehakase.spec
376 makeinu 21 ])
377 makeinu 72
378     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