GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

configure.in 8.45 KB
Newer Older
Richard Hult's avatar
Richard Hult committed
1 2 3 4
# Process this file with autoconf to produce a configure script.
# require autoconf 2.54
AC_PREREQ(2.54)

Richard Hult's avatar
Richard Hult committed
5
AC_INIT(AUTHORS)
Richard Hult's avatar
Bump.  
Richard Hult committed
6
AM_INIT_AUTOMAKE(planner, 0.12.90)
Richard Hult's avatar
Richard Hult committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
AM_CONFIG_HEADER(config.h)

AM_MAINTAINER_MODE

AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AM_DISABLE_STATIC
AM_PROG_LIBTOOL

AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
AC_PATH_PROG(PG_CONFIG, pg_config)

PLANNER_COMPILE_WARNINGS

Richard Hult's avatar
Richard Hult committed
22
AC_PROG_INTLTOOL([0.30])
Richard Hult's avatar
Richard Hult committed
23 24 25 26 27 28

AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test x$PKG_CONFIG = xno ; then
  AC_MSG_ERROR([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/])
fi

Richard Hult's avatar
Richard Hult committed
29 30 31
AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no)
AM_CONDITIONAL(HAVE_NEW_MIME, test x$UPDATE_MIME_DATABASE != xno)

32 33 34
AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, update-desktop-database, no)
AM_CONDITIONAL(HAVE_NEWER_MIME, test x$UPDATE_DESKTOP_DATABASE != xno)

Richard Hult's avatar
Richard Hult committed
35 36 37 38 39 40 41 42 43 44
dnl  -------------
dnl | API docs    |--------------------------------------------
dnl  -------------
GTK_DOC_CHECK(1.0)

dnl NOTE: We need to use a separate automake conditional for this
dnl       to make this work with the tarballs.
AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
dnl -----------------------------------------------------------

Richard Hult's avatar
Richard Hult committed
45 46 47 48 49 50 51 52 53 54

dnl ==========================================================================
dnl
dnl Library Dependencies, uses pkg-config to detect correct version, etc
dnl
dnl ==========================================================================

dnl If you add a version number here, you *must* add an AC_SUBST line for
dnl it too, or it will never make it into the spec file!

Richard Hult's avatar
Richard Hult committed
55
GLIB_REQUIRED=2.4.0
Anders Carlsson's avatar
Anders Carlsson committed
56
GTK_REQUIRED=2.4.0
Richard Hult's avatar
Richard Hult committed
57 58 59 60 61 62 63 64 65 66
LIBGNOMECANVAS_REQUIRED=2.6.0
LIBGNOMEUI_REQUIRED=2.6.0
LIBGLADE_REQUIRED=2.4.0
LIBBONOBOUI_REQUIRED=2.6.0
LIBGNOMEPRINTUI_REQUIRED=2.6.0
GNOME_VFS_REQUIRED=2.6.0
GCONF_REQUIRED=2.6.0

LIBXML_REQUIRED=2.6.0
LIBXSLT_REQUIRED=1.1.0
Richard Hult's avatar
Richard Hult committed
67
LIBGSF_REQUIRED=1.4.0
Richard Hult's avatar
Richard Hult committed
68
PYGTK_REQUIRED=2.0.0
Richard Hult's avatar
Richard Hult committed
69 70 71 72 73 74 75 76 77

AC_SUBST(GLIB_REQUIRED)
AC_SUBST(GTK_REQUIRED)
AC_SUBST(LIBGNOMECANVAS_REQUIRED)
AC_SUBST(LIBGNOMEUI_REQUIRED)
AC_SUBST(LIBGLADE_REQUIRED)
AC_SUBST(LIBBONOBOUI_REQUIRED)
AC_SUBST(LIBGNOMEPRINTUI_REQUIRED)
AC_SUBST(GNOME_VFS_REQUIRED)
Richard Hult's avatar
Richard Hult committed
78
AC_SUBST(GCONF_REQUIRED)
Richard Hult's avatar
Richard Hult committed
79

80 81
AC_SUBST(LIBXML_REQUIRED)
AC_SUBST(LIBXSLT_REQUIRED)
Richard Hult's avatar
Richard Hult committed
82 83 84
AC_SUBST(LIBGSF_REQUIRED)
AC_SUBST(PYGTK_REQUIRED)

85
dnl  -----------
Richard Hult's avatar
Richard Hult committed
86
dnl | Database/GDA check |----------------------------------------------
87
dnl  -----------
Richard Hult's avatar
Richard Hult committed
88
AC_ARG_ENABLE(database, [  --enable-database=[no/yes]      enable database support [default=no]], enable_database="$enableval", enable_database=no)
89

Richard Hult's avatar
Richard Hult committed
90 91
if test "x$enable_database" = "xyes" ; then
    PKG_CHECK_MODULES(GDA, libgda >= 1.0)
92
    use_gda=yes
93 94
else
    use_gda=no
95
fi
96

97 98
AC_SUBST(GDA_LIBS)
AC_SUBST(GDA_CFLAGS)
Richard Hult's avatar
Richard Hult committed
99
AM_CONDITIONAL(HAVE_GDA, test x$use_gda = xyes)
100 101 102
dnl -----------------------------------------------------------


Richard Hult's avatar
Richard Hult committed
103 104 105 106 107 108 109 110 111 112 113 114 115 116
dnl ================================
dnl | planner                      |---------------------------
dnl ================================
PKG_CHECK_MODULES(PLANNER,
[
	glib-2.0 >= $GLIB_REQUIRED
	gobject-2.0 gmodule-2.0
	gtk+-2.0 >= $GTK_REQUIRED
	libgnomecanvas-2.0 >= $LIBGNOMECANVAS_REQUIRED
	libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED
	libglade-2.0 >= $LIBGLADE_REQUIRED
	libbonoboui-2.0 >= $LIBBONOBOUI_REQUIRED
	libgnomeprintui-2.2 >= $LIBGNOMEPRINTUI_REQUIRED
	gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED
Richard Hult's avatar
Richard Hult committed
117
	gconf-2.0 >= $GCONF_REQUIRED
Richard Hult's avatar
Richard Hult committed
118 119 120 121 122 123 124 125 126 127 128 129
])

AC_SUBST(PLANNER_CFLAGS)
AC_SUBST(PLANNER_LIBS)
dnl -----------------------------------------------------------

dnl ================================
dnl | libplanner                   |---------------------------
dnl ================================
PKG_CHECK_MODULES(LIBPLANNER,
[
	glib-2.0 >= $GLIB_REQUIRED
130
	libxml-2.0 >= $LIBXML_REQUIRED
Richard Hult's avatar
Richard Hult committed
131 132
	gobject-2.0 gmodule-2.0
	libgsf-1 >= $LIBGSF_REQUIRED
Richard Hult's avatar
Richard Hult committed
133
	gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED
Richard Hult's avatar
Richard Hult committed
134 135 136 137 138 139 140 141 142 143
])

AC_SUBST(LIBPLANNER_CFLAGS)
AC_SUBST(LIBPLANNER_LIBS)
dnl -----------------------------------------------------------


dnl  ------------------
dnl | libeggrecent    |---------------------------------------
dnl  ------------------
Richard Hult's avatar
Richard Hult committed
144 145 146 147
#PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0 >= 2.1.1,
# GNOMEUI_UNSTABLE="-UUSE_STABLE_LIBGNOMEUI",
# GNOMEUI_UNSTABLE="-DUSE_STABLE_LIBGNOMEUI")
#AC_SUBST(GNOMEUI_UNSTABLE)
Richard Hult's avatar
Richard Hult committed
148 149 150
dnl -----------------------------------------------------------


151

Richard Hult's avatar
Richard Hult committed
152 153 154
dnl ================================
dnl | HTML output file-module      |---------------------------
dnl ================================
155
PKG_CHECK_MODULES(XSLT, libxslt >= $LIBXSLT_REQUIRED)
Richard Hult's avatar
Richard Hult committed
156 157 158 159 160
XSLT_LIBS="$XSLT_LIBS -lexslt"
AC_SUBST(XSLT_CFLAGS)
AC_SUBST(XSLT_LIBS)
dnl -----------------------------------------------------------

Richard Hult's avatar
Richard Hult committed
161 162


Richard Hult's avatar
Richard Hult committed
163 164 165
dnl  ------------------
dnl | Scrollkeeper     |---------------------------------------
dnl  ------------------
Richard Hult's avatar
Richard Hult committed
166 167 168 169 170 171 172 173 174 175 176 177 178
AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no)
if test x$SCROLLKEEPER_CONFIG = xno; then
  AC_MSG_ERROR(Couldn't find scrollkeeper-config. Please install the scrollkeeper package)
fi


dnl  ------------------
dnl | Language Support |---------------------------------------
dnl  ------------------
GETTEXT_PACKAGE=planner
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The prefix for our gettext translation domains.])

Laurent Dhima's avatar
Laurent Dhima committed
179
ALL_LINGUAS="am az be bg ca cs da de el en_CA en_GB es et fa fr hi hr hu id is it ja kn ko lv ml mn ms nl nn no pl pt pt_BR ru sk sq sr sr@Latn sv uk zh_CN"
Richard Hult's avatar
Richard Hult committed
180 181 182 183 184 185 186 187 188 189 190

AM_GLIB_GNU_GETTEXT

if test "x$prefix" = "xNONE"; then
  GNOMELOCALEDIR=$ac_default_prefix/${DATADIRNAME}/locale
else
  GNOMELOCALEDIR=$prefix/${DATADIRNAME}/locale
fi
AC_DEFINE_UNQUOTED(GNOMELOCALEDIR, "$GNOMELOCALEDIR", [The locale dir to use])
dnl -----------------------------------------------------------

191 192 193 194
dnl  --------------
dnl | Python setup |--------------------------------------------
dnl  --------------
AC_ARG_ENABLE(python, [  --enable-python        build python bindings [default=auto]], enable_python="$enableval", enable_python=auto)
Richard Hult's avatar
Richard Hult committed
195
AC_ARG_ENABLE(python-plugin, [  --enable-python-plugin build python plugin [default=no]], enable_python_plugin="$enableval", enable_python_plugin=no)
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217

if test "x$enable_python" != "xno"; then
    dnl check for python
    have_python=yes
    AM_PATH_PYTHON([2.2])
    AM_CHECK_PYTHON_HEADERS(,have_python=no)
    AC_SUBST(PYGTK_CFLAGS)

    dnl check for pygtk
    if test "x$have_python" = "xyes"; then
      PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= $PYGTK_REQUIRED, have_python=yes, have_python=no)
    fi
    if test "x$have_python" = "xyes"; then
      AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no)
      if test "x$PYGTK_CODEGEN" = xno; then
        AC_MSG_ERROR(could not find pygtk-codegen-2.0 script)
        have_python=no
      fi
    fi
else
    have_python=no
fi
218

219
AM_CONDITIONAL(HAVE_PYTHON, test x$have_python = xyes)
Richard Hult's avatar
Richard Hult committed
220
AM_CONDITIONAL(HAVE_PYTHON_PLUGIN, test x$enable_python_plugin = xyes)
221
dnl -----------------------------------------------------------
222

223 224 225
dnl  --------------
dnl | dotnet setup |--------------------------------------------
dnl  --------------
226
AC_ARG_ENABLE(dotnet, [  --enable-dotnet        build dotnet bindings [default=auto]], enable_dotnet="$enableval", enable_dotnet=no)
Richard Hult's avatar
Richard Hult committed
227

228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248
if test "x$enable_dotnet" != "xno"; then
    PKG_CHECK_MODULES(,gtk-sharp,have_dotnet=yes,have_dotnet=no)

    if test "x$have_dotnet" = "xyes"; then
        AC_PATH_PROG(GAPI_FIXUP, gapi-fixup, no)
        AC_PATH_PROG(GAPI_CODEGEN, gapi-codegen, no)
        AC_PATH_PROG(MCS, mcs, no)
        AC_PATH_PROG(MONO, mono, no)
    fi
else
    have_dotnet=no
fi

if test "x$enable_dotnet" = "xyes"; then
    AC_MSG_CHECKING(for mono environment)
    if test "x$have_dotnet" = "xno"; then
        AC_MSG_ERROR([not found])
    fi
fi

AM_CONDITIONAL(HAVE_DOTNET, test x$have_dotnet = xyes)
249

250 251 252 253 254
dnl This will cause the automake generated makefiles to pass the
dnl correct flags to aclocal.
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
AC_SUBST(ACLOCAL_AMFLAGS)

Richard Hult's avatar
Richard Hult committed
255 256 257 258 259 260 261 262 263 264
AC_CONFIG_FILES([
Makefile
libplanner/Makefile
libegg/Makefile
libegg/recent-files/Makefile
src/Makefile
docs/Makefile
docs/libplanner/Makefile
docs/user-guide/Makefile
docs/user-guide/C/Makefile
Richard Hult's avatar
Richard Hult committed
265
docs/sql/Makefile
Richard Hult's avatar
Richard Hult committed
266
examples/Makefile
Richard Hult's avatar
Richard Hult committed
267 268
tests/Makefile
tests/files/Makefile
Richard Hult's avatar
Richard Hult committed
269 270 271 272 273 274 275 276
po/Makefile.in
data/Makefile
data/images/Makefile
data/glade/Makefile
data/ui/Makefile
data/dtd/Makefile
data/stylesheets/Makefile
data/mime/Makefile
277
data/sql/Makefile
278
python/Makefile
279 280 281
dotnet/Makefile
dotnet/libplanner/Makefile
dotnet/samples/Makefile
Richard Hult's avatar
Richard Hult committed
282
planner.spec
Richard Hult's avatar
Richard Hult committed
283 284 285
libplanner-1.pc
])

286

Richard Hult's avatar
Richard Hult committed
287 288 289
AC_OUTPUT

echo
Richard Hult's avatar
Richard Hult committed
290 291 292 293 294 295
echo "Planner prefix      : $prefix"
echo "Build API docs      : $enable_gtk_doc"
echo "Python bindings     : $have_python"
echo "Python plugin       : $enable_python_plugin"
echo "Dotnet bindings     : $have_dotnet"
echo "Database/GDA support: $use_gda"
Richard Hult's avatar
Richard Hult committed
296 297
echo

298