source: trunk/third/gail/configure.in @ 18612

Revision 18612, 3.5 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18611, which included commits to RCS files with non-trunk default branches.
Line 
1dnl Process this file with autoconf to produce a configure script.
2
3AC_INIT(ChangeLog)
4
5AM_CONFIG_HEADER(config.h)
6
7
8AM_INIT_AUTOMAKE(gail, 1.2.0)
9
10# libtool versioning
11LT_CURRENT=17
12LT_REVISION=0
13LT_AGE=0
14LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
15AC_SUBST(LT_CURRENT)
16AC_SUBST(LT_REVISION)
17AC_SUBST(LT_AGE)
18AC_SUBST(LT_CURRENT_MINUS_AGE)
19
20
21AC_PROG_CC
22AM_DISABLE_STATIC
23AC_LIBTOOL_WIN32_DLL
24AM_PROG_LIBTOOL
25
26AC_MSG_CHECKING([for Win32])
27case "$host" in
28  *-*-mingw*)
29    gail_native_win32=yes
30    ;;
31  *)
32    gail_native_win32=no
33    ;;
34esac
35AC_MSG_RESULT([$gail_native_win32])
36AM_CONDITIONAL(OS_WIN32, test "$gail_native_win32" = "yes")
37
38if test "$gail_native_win32" = "yes"; then
39  AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
40fi
41AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
42
43dnl Cache $ACLOCAL_FLAGS
44AC_CACHE_CHECK([for aclocal flags], ac_cv_atk_aclocal_flags,[
45   ac_cv_atk_aclocal_flags="$ACLOCAL_FLAGS"
46])
47ACLOCAL="$ACLOCAL $ac_cv_atk_aclocal_flags"
48
49AC_ARG_ENABLE(rebuilds, [  --disable-rebuilds      disable all source autogeneration rules],,enable_rebuilds=yes)
50
51AC_ARG_WITH(html-dir, [  --with-html-dir=PATH    path to installed docs ])
52
53if test "x$with_html_dir" = "x" ; then
54  HTML_DIR='${datadir}/gtk-doc/html'
55else
56  HTML_DIR=$with_html_dir
57fi
58
59AC_SUBST(HTML_DIR)
60
61gtk_doc_min_version=0.9
62AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
63
64if $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
83fi
84
85dnl Let people disable the gtk-doc stuff.
86AC_ARG_ENABLE(gtk-doc, [  --enable-gtk-doc  Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
87
88if 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
94fi
95
96dnl NOTE: We need to use a separate automake conditional for this
97dnl       to make this work with the tarballs.
98AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
99
100changequote(,)dnl
101if test "x$GCC" = "xyes"; then
102  case " $CFLAGS " in
103  *[\ \ ]-Wall[\ \      ]*) ;;
104  *) CFLAGS="$CFLAGS -Wall" ;;
105  esac
106fi
107changequote([,])dnl
108
109ATK_PACKAGES="atk"
110GTK_PACKAGES="gtk+-2.0"
111LIBGNOMECANVAS_PACKAGES="libgnomecanvas-2.0"
112ATK_REQUIRED_VERSION=1.1.3
113GTK_REQUIRED_VERSION=2.1.3
114LIBGNOMECANVAS_REQUIRED_VERSION=2.0.0
115
116PKG_CHECK_MODULES(DEPS, $ATK_PACKAGES >= $ATK_REQUIRED_VERSION \
117        $GTK_PACKAGES >= $GTK_REQUIRED_VERSION \
118        $LIBGNOMECANVAS_PACKAGES >= $LIBGNOMECANVAS_REQUIRED_VERSION)
119
120old_LIBS="$LIBS"
121dnl Checks for inet libraries:
122AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent))
123AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
124AC_CHECK_FUNC(connect, , AC_CHECK_LIB(inet, connect))
125
126INET_LIBS="$LIBS"
127AC_SUBST(INET_LIBS)
128
129LIBS="$old_LIBS"
130
131DEP_CFLAGS=`$PKG_CONFIG --cflags $ATK_PACKAGES $GTK_PACKAGES $LIBGNOMECANVAS_PACKAGES`
132DEP_LIBS=`$PKG_CONFIG --libs $ATK_PACKAGES $GTK_PACKAGES $LIBGNOMECANVAS_PACKAGES`
133
134AC_SUBST(DEP_CFLAGS)
135AC_SUBST(DEP_LIBS)
136
137AC_OUTPUT([
138Makefile
139gail.pc
140libgail-util/Makefile
141gail/Makefile
142tests/Makefile
143docs/Makefile
144docs/reference/Makefile
145docs/reference/libgail-util/Makefile
146])
Note: See TracBrowser for help on using the repository browser.