1 | dnl Process this file with autoconf to produce a configure script. |
---|
2 | |
---|
3 | AC_INIT(ChangeLog) |
---|
4 | |
---|
5 | AM_CONFIG_HEADER(config.h) |
---|
6 | |
---|
7 | |
---|
8 | AM_INIT_AUTOMAKE(gail, 1.2.0) |
---|
9 | |
---|
10 | # libtool versioning |
---|
11 | LT_CURRENT=17 |
---|
12 | LT_REVISION=0 |
---|
13 | LT_AGE=0 |
---|
14 | LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE` |
---|
15 | AC_SUBST(LT_CURRENT) |
---|
16 | AC_SUBST(LT_REVISION) |
---|
17 | AC_SUBST(LT_AGE) |
---|
18 | AC_SUBST(LT_CURRENT_MINUS_AGE) |
---|
19 | |
---|
20 | |
---|
21 | AC_PROG_CC |
---|
22 | AM_DISABLE_STATIC |
---|
23 | AC_LIBTOOL_WIN32_DLL |
---|
24 | AM_PROG_LIBTOOL |
---|
25 | |
---|
26 | AC_MSG_CHECKING([for Win32]) |
---|
27 | case "$host" in |
---|
28 | *-*-mingw*) |
---|
29 | gail_native_win32=yes |
---|
30 | ;; |
---|
31 | *) |
---|
32 | gail_native_win32=no |
---|
33 | ;; |
---|
34 | esac |
---|
35 | AC_MSG_RESULT([$gail_native_win32]) |
---|
36 | AM_CONDITIONAL(OS_WIN32, test "$gail_native_win32" = "yes") |
---|
37 | |
---|
38 | if test "$gail_native_win32" = "yes"; then |
---|
39 | AC_CHECK_PROG(ms_librarian, lib.exe, yes, no) |
---|
40 | fi |
---|
41 | AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes) |
---|
42 | |
---|
43 | dnl Cache $ACLOCAL_FLAGS |
---|
44 | AC_CACHE_CHECK([for aclocal flags], ac_cv_atk_aclocal_flags,[ |
---|
45 | ac_cv_atk_aclocal_flags="$ACLOCAL_FLAGS" |
---|
46 | ]) |
---|
47 | ACLOCAL="$ACLOCAL $ac_cv_atk_aclocal_flags" |
---|
48 | |
---|
49 | AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes) |
---|
50 | |
---|
51 | AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ]) |
---|
52 | |
---|
53 | if test "x$with_html_dir" = "x" ; then |
---|
54 | HTML_DIR='${datadir}/gtk-doc/html' |
---|
55 | else |
---|
56 | HTML_DIR=$with_html_dir |
---|
57 | fi |
---|
58 | |
---|
59 | AC_SUBST(HTML_DIR) |
---|
60 | |
---|
61 | gtk_doc_min_version=0.9 |
---|
62 | AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false) |
---|
63 | |
---|
64 | if $GTKDOC ; then |
---|
65 | gtk_doc_version=`gtkdoc-mkdb --version` |
---|
66 | AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version]) |
---|
67 | IFS="${IFS= }"; gail_save_IFS="$IFS"; IFS="." |
---|
68 | set $gtk_doc_version |
---|
69 | for min in $gtk_doc_min_version ; do |
---|
70 | cur=$1; shift |
---|
71 | if test -z $min ; then break; fi |
---|
72 | if test -z $cur ; then GTKDOC=false; break; fi |
---|
73 | if test $cur -gt $min ; then break ; fi |
---|
74 | if test $cur -lt $min ; then GTKDOC=false; break ; fi |
---|
75 | done |
---|
76 | IFS="$gail_save_IFS" |
---|
77 | |
---|
78 | if $GTKDOC ; then |
---|
79 | AC_MSG_RESULT(yes) |
---|
80 | else |
---|
81 | AC_MSG_RESULT(no) |
---|
82 | fi |
---|
83 | fi |
---|
84 | |
---|
85 | dnl Let people disable the gtk-doc stuff. |
---|
86 | AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto) |
---|
87 | |
---|
88 | if test x$enable_gtk_doc = xauto ; then |
---|
89 | if test x$GTKDOC = xtrue ; then |
---|
90 | enable_gtk_doc=yes |
---|
91 | else |
---|
92 | enable_gtk_doc=no |
---|
93 | fi |
---|
94 | fi |
---|
95 | |
---|
96 | dnl NOTE: We need to use a separate automake conditional for this |
---|
97 | dnl to make this work with the tarballs. |
---|
98 | AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) |
---|
99 | |
---|
100 | changequote(,)dnl |
---|
101 | if test "x$GCC" = "xyes"; then |
---|
102 | case " $CFLAGS " in |
---|
103 | *[\ \ ]-Wall[\ \ ]*) ;; |
---|
104 | *) CFLAGS="$CFLAGS -Wall" ;; |
---|
105 | esac |
---|
106 | fi |
---|
107 | changequote([,])dnl |
---|
108 | |
---|
109 | ATK_PACKAGES="atk" |
---|
110 | GTK_PACKAGES="gtk+-2.0" |
---|
111 | LIBGNOMECANVAS_PACKAGES="libgnomecanvas-2.0" |
---|
112 | ATK_REQUIRED_VERSION=1.1.3 |
---|
113 | GTK_REQUIRED_VERSION=2.1.3 |
---|
114 | LIBGNOMECANVAS_REQUIRED_VERSION=2.0.0 |
---|
115 | |
---|
116 | PKG_CHECK_MODULES(DEPS, $ATK_PACKAGES >= $ATK_REQUIRED_VERSION \ |
---|
117 | $GTK_PACKAGES >= $GTK_REQUIRED_VERSION \ |
---|
118 | $LIBGNOMECANVAS_PACKAGES >= $LIBGNOMECANVAS_REQUIRED_VERSION) |
---|
119 | |
---|
120 | old_LIBS="$LIBS" |
---|
121 | dnl Checks for inet libraries: |
---|
122 | AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent)) |
---|
123 | AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) |
---|
124 | AC_CHECK_FUNC(connect, , AC_CHECK_LIB(inet, connect)) |
---|
125 | |
---|
126 | INET_LIBS="$LIBS" |
---|
127 | AC_SUBST(INET_LIBS) |
---|
128 | |
---|
129 | LIBS="$old_LIBS" |
---|
130 | |
---|
131 | DEP_CFLAGS=`$PKG_CONFIG --cflags $ATK_PACKAGES $GTK_PACKAGES $LIBGNOMECANVAS_PACKAGES` |
---|
132 | DEP_LIBS=`$PKG_CONFIG --libs $ATK_PACKAGES $GTK_PACKAGES $LIBGNOMECANVAS_PACKAGES` |
---|
133 | |
---|
134 | AC_SUBST(DEP_CFLAGS) |
---|
135 | AC_SUBST(DEP_LIBS) |
---|
136 | |
---|
137 | AC_OUTPUT([ |
---|
138 | Makefile |
---|
139 | gail.pc |
---|
140 | libgail-util/Makefile |
---|
141 | gail/Makefile |
---|
142 | tests/Makefile |
---|
143 | docs/Makefile |
---|
144 | docs/reference/Makefile |
---|
145 | docs/reference/libgail-util/Makefile |
---|
146 | ]) |
---|