configure.ac 6.2 KB
Newer Older
Jose Maria Celorio's avatar
Jose Maria Celorio committed
1 2
dnl Process this file with autoconf to produce a configure script.

3
AC_PREREQ(2.52)
4 5 6 7
AC_INIT([glade3], [3.1.4],
	[http://bugzilla.gnome.org/enter_bug.cgi?product=glade3])
	
AC_CONFIG_HEADERS([config.h])
8
AC_CONFIG_SRCDIR([gladeui/glade.h])
9 10
AC_CONFIG_MACRO_DIR([m4])

Ivan Wong's avatar
Ivan Wong committed
11
AC_CANONICAL_SYSTEM
Jose Maria Celorio's avatar
Jose Maria Celorio committed
12

13 14
AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-bzip2])

Jose Maria Celorio's avatar
Jose Maria Celorio committed
15
AM_MAINTAINER_MODE
Tristan Van Berkom's avatar
Tristan Van Berkom committed
16

17
IT_PROG_INTLTOOL([0.35.0])
Tristan Van Berkom's avatar
Tristan Van Berkom committed
18

19
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
Ivan Wong's avatar
Ivan Wong committed
20
AC_PATH_PROG(DLLTOOL, dlltool)
21

Jose Maria Celorio's avatar
Jose Maria Celorio committed
22 23
AC_ISC_POSIX
AC_PROG_CC
Ivan Wong's avatar
Ivan Wong committed
24
AC_DISABLE_STATIC
Jose Maria Celorio's avatar
Jose Maria Celorio committed
25 26 27
AC_PROG_INSTALL
AC_PROG_MAKE_SET

28
AC_LIBTOOL_DLOPEN
29 30 31 32 33 34 35
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL

# If the source code has changed at all, increment GLADE_REVISION
# If any interfaces have been added, removed, or changed, increment GLADE_CURRENT, and set GLADE_REVISION to 0.
# If any interfaces have been added since the last public release, then increment GLADE_AGE.
# If any interfaces have been removed since the last public release, then set GLADE_AGE to 0.
36
# Reference: http://www.gnu.org/software/libtool/manual.html#Versioning
Tristan Van Berkom's avatar
Tristan Van Berkom committed
37
GLADE_REVISION=3
Tristan Van Berkom's avatar
Tristan Van Berkom committed
38
GLADE_CURRENT=4
39
GLADE_AGE=0
40 41 42
AC_SUBST(GLADE_REVISION)
AC_SUBST(GLADE_CURRENT)
AC_SUBST(GLADE_AGE)
43

Jose Maria Celorio's avatar
Jose Maria Celorio committed
44
dnl ================================================================
45
dnl Gettext stuff.
Jose Maria Celorio's avatar
Jose Maria Celorio committed
46
dnl ================================================================
47
GETTEXT_PACKAGE=AC_PACKAGE_NAME
48
AC_SUBST(GETTEXT_PACKAGE)
49
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of the gettext package.])
50
AM_GLIB_GNU_GETTEXT
Jose Maria Celorio's avatar
Jose Maria Celorio committed
51

52 53 54 55 56
dnl ================================================================
dnl Check for gtk-doc
dnl ================================================================
GTK_DOC_CHECK(1.4)

Paolo Borelli's avatar
Paolo Borelli committed
57
dnl ================================================================
58
dnl Check for gtk+
Paolo Borelli's avatar
Paolo Borelli committed
59
dnl ================================================================
60
PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.10.0  libxml-2.0 >= 2.4.0])
61 62
AC_SUBST(GTK_LIBS)
AC_SUBST(GTK_CFLAGS)
63

64 65 66
dnl ================================================================
dnl Check for optional gnome libs
dnl ================================================================
67
AC_ARG_ENABLE(gnome,
68 69
    AS_HELP_STRING([--disable-gnome], [disable gnome catalog]),
    check_gnome=$enableval, check_gnome=yes)
70 71

if test x"$check_gnome" = x"yes"; then
72
  PKG_CHECK_MODULES(GNOME, [libbonoboui-2.0 libgnomeui-2.0],
73 74 75 76 77 78 79
    [have_gnome=yes],[have_gnome=no])
  AC_SUBST(GNOME_LIBS)
  AC_SUBST(GNOME_CFLAGS)
else
  have_gnome=no
fi

80 81
AM_CONDITIONAL(BUILD_GNOME, test x"$have_gnome" = "xyes")

Tristan Van Berkom's avatar
Tristan Van Berkom committed
82 83 84 85
dnl ================================================================
dnl   GNOME User Manual (requires gnome-doc-utils)
dnl ================================================================
AC_ARG_ENABLE(user_manual,
86 87
    AS_HELP_STRING([--enable-user-manual], [build GNOME user manual]),
    enable_user_manual=yes, enable_user_manual=no)
Tristan Van Berkom's avatar
Tristan Van Berkom committed
88 89 90 91 92 93 94 95

if test x"$enable_user_manual" = "xyes"; then
GNOME_DOC_INIT
else
ENABLE_SK_TRUE="#"
ENABLE_SK_FALSE=""
fi

96
AM_CONDITIONAL(BUILD_USER_MANUAL, test x"$enable_user_manual" = "xyes")
Tristan Van Berkom's avatar
Tristan Van Berkom committed
97 98 99 100 101 102 103 104

dnl ================================================================
dnl Scrollkeeper
dnl ================================================================
if test x"$enable_gnome" = "xyes" ; then
  AC_PATH_PROG(SK_CONFIG, scrollkeeper-config, no)

  if test x"$SK_CONFIG" = "xno"; then
105
    AC_MSG_ERROR([Couldn't find scrollkeeper-config. Please install the scrollkeeper package: http://scrollkeeper.sourceforge.net])
Tristan Van Berkom's avatar
Tristan Van Berkom committed
106 107 108
  fi
fi

Juan Pablo Ugarte's avatar
Juan Pablo Ugarte committed
109 110 111 112
dnl ===============================================================
dnl Check for Python
dnl ================================================================
AC_ARG_ENABLE(python,
113 114
    AS_HELP_STRING([--disable-python], [disable python scripting module]),
    check_python=$enableval, check_python=yes)
Juan Pablo Ugarte's avatar
Juan Pablo Ugarte committed
115 116 117

if test x"$check_python" = x"yes"; then
    AC_PATH_PROGS([PYTHON], [python])
118 119 120 121
    PYGTK_REQ_MAYOR=2
    PYGTK_REQ_MINOR=10
    PYGTK_REQ_MICRO=0
    PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= $PYGTK_REQ_MAYOR.$PYGTK_REQ_MINOR.$PYGTK_REQ_MICRO, [have_pygtk=yes], [have_pygtk=no])
Juan Pablo Ugarte's avatar
Juan Pablo Ugarte committed
122 123 124
    if test -f $PYTHON -a "$have_pygtk" = "yes"; then
             PYTHON_CFLAGS="`$PYTHON -c "from distutils import sysconfig; getvar = sysconfig.get_config_var; flags = ['-I' + sysconfig.get_python_inc(), '-I' + sysconfig.get_python_inc(plat_specific=True)]; print ' '.join(flags)"` $PYGTK_CFLAGS"
             PYTHON_LIBS="`$PYTHON -c "from distutils import sysconfig; pyver = sysconfig.get_config_var('VERSION'); getvar = sysconfig.get_config_var; libs = getvar('LIBS').split() + getvar('SYSLIBS').split(); libs.append('-lpython'+pyver); libs.insert(0, '-L' + getvar('LIBPL')); print ' '.join(libs)"` $PYGTK_LIBS"
125 126 127 128
	     save_CFLAGS=$CFLAGS
	     CFLAGS=$PYTHON_CFLAGS
	     AC_CHECK_HEADERS(Python.h, have_python=yes, have_python=no)
	     CFLAGS=$save_CFLAGS
Juan Pablo Ugarte's avatar
Juan Pablo Ugarte committed
129 130
             AC_SUBST(PYTHON_CFLAGS)
             AC_SUBST(PYTHON_LIBS)
131 132 133
	     AC_DEFINE_UNQUOTED(PYGTK_REQ_MAYOR, $PYGTK_REQ_MAYOR, Pygtk mayor version required)
	     AC_DEFINE_UNQUOTED(PYGTK_REQ_MINOR, $PYGTK_REQ_MINOR, Pygtk minor version required)
	     AC_DEFINE_UNQUOTED(PYGTK_REQ_MICRO, $PYGTK_REQ_MICRO, Pygtk micro version required)
Juan Pablo Ugarte's avatar
Juan Pablo Ugarte committed
134 135 136 137 138 139 140 141 142
    else
        have_python=no
    fi
else
     have_python=no
fi

AM_CONDITIONAL(BUILD_PYTHON, test x"$have_python" = "xyes")

143 144 145 146
dnl ================================================================
dnl Check for windows
dnl ================================================================
case $host_os in
147 148 149 150 151 152
  *mingw* | pw32* | cygwin*)
    win32=yes
    ;;
  *)
    win32=no
    ;;
153 154
esac
AM_CONDITIONAL(WITH_WIN32, test x"$win32" = "xyes")
155

156 157 158 159
AC_SUBST([AM_CPPFLAGS])
AC_SUBST([AM_CFLAGS])
AC_SUBST([AM_CXXFLAGS])
AC_SUBST([AM_LDFLAGS])
160

Tristan Van Berkom's avatar
Tristan Van Berkom committed
161
AC_CONFIG_FILES([
Jose Maria Celorio's avatar
Jose Maria Celorio committed
162
Makefile
163
data/gladeui-1.0.pc
164 165 166 167
data/glade-3.desktop.in
data/Makefile
data/icons/Makefile
gladeui/Makefile
168
src/Makefile
169 170 171 172 173 174 175 176 177 178 179 180
plugins/Makefile
plugins/gtk+/Makefile
plugins/gtk+/icons/Makefile
plugins/gtk+/icons/16x16/Makefile
plugins/gtk+/icons/22x22/Makefile
plugins/gnome/Makefile
plugins/gnome/icons/Makefile
plugins/gnome/icons/16x16/Makefile
plugins/gnome/icons/22x22/Makefile
bindings/Makefile
bindings/python/Makefile
po/Makefile.in
Tristan Van Berkom's avatar
Tristan Van Berkom committed
181 182
doc/Makefile
doc/version.xml
Tristan Van Berkom's avatar
Tristan Van Berkom committed
183
help/Makefile
184
])
Jose Maria Celorio's avatar
Jose Maria Celorio committed
185

Tristan Van Berkom's avatar
Tristan Van Berkom committed
186 187
AC_OUTPUT

Jose Maria Celorio's avatar
Jose Maria Celorio committed
188 189 190 191 192
echo "

Configuration:

	Source code location:	${srcdir}
Tristan Van Berkom's avatar
Tristan Van Berkom committed
193
	Compiler:		${CC}
194
	GnomeUI Catalog:	${have_gnome}
Juan Pablo Ugarte's avatar
Juan Pablo Ugarte committed
195
	Python Binding:		${have_python}
196
	GNOME User Manual:	${enable_user_manual}
Jose Maria Celorio's avatar
Jose Maria Celorio committed
197
"