configure.ac 2.47 KB
Newer Older
1
AC_INIT(src/gnome-schedule.py)
Gaute Hope's avatar
Gaute Hope committed
2
AM_INIT_AUTOMAKE(gnome-schedule, 1.0.0)
Philip Van Hoof's avatar
Philip Van Hoof committed
3

4 5
dnl check for python
dnl AM_PATH_PYTHON
6 7
AM_PATH_PYTHON

Gaute Hope's avatar
Gaute Hope committed
8
PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= 2.6)
9 10
AC_SUBST(PYGTK_CFLAGS)
AC_SUBST(PYGTK_LIBS)
11

12 13 14 15 16 17 18 19 20

AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
  if test "$PKGCONFIG" != "no" ; then
    AC_MSG_CHECKING([PYTHONPATH env variable for PyGTK])
    PYTHONPATH=$($PKGCONFIG --variable=pyexecdir pygtk-2.0)
    AC_SUBST([PYTHONPATH])
    AC_MSG_RESULT($PYTHONPATH)
  fi

21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
export PYTHONPATH=$PYGTK_DIR:$PYTHONPATH
dnl check for libglade
AC_MSG_CHECKING(for gtk.glade)
prog="
import sys
try:
  import gtk.glade
except RuntimeError:
  sys.exit(0)
except ImportError:
  sys.exit(1)
sys.exit(0)
"

if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
then
  AC_MSG_RESULT(found)
else
  AC_MSG_RESULT(not found)
  AC_MSG_ERROR([You need to have python libglade bindings installed])
fi

43 44 45
PKG_CHECK_MODULES(GNOMEPYTHON, gnome-python-2.0 >= 2.12.0)


46
AC_PATH_PROG(CRONTAB_CONFIG, crontab, no)
Philip Van Hoof's avatar
Philip Van Hoof committed
47
if test x$CRONTAB_CONFIG = xno; then
48 49 50
  AC_MSG_ERROR(Please install the application crontab)
fi

Philip Van Hoof's avatar
Philip Van Hoof committed
51 52 53 54 55
AC_PATH_PROG(AT_CONFIG, at, no)
if test x$AT_CONFIG = xno; then
  AC_MSG_ERROR(Please install the application at)
fi

Philip Van Hoof's avatar
Philip Van Hoof committed
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
AC_PATH_PROG(ATQ_CONFIG, atq, no)
if test x$ATQ_CONFIG = xno; then
  AC_MSG_ERROR(Please install the application atq)
fi

AC_PATH_PROG(ATRM_CONFIG, atrm, no)
if test x$ATRM_CONFIG = xno; then
  AC_MSG_ERROR(Please install the application atrm)
fi

AC_PATH_PROG(BATCH_CONFIG, batch, no)
if test x$BATCH_CONFIG = xno; then
  AC_MSG_ERROR(Please install the application batch)
fi

Gaute Hope's avatar
Gaute Hope committed
71 72 73 74 75
AC_PATH_PROG(SU_CONFIG, su, no)
if test x$BATCH_CONFIG = xno; then
  AC_MSG_ERROR(Please install the application su)
fi

76 77 78 79 80 81
AC_PATH_PROG(XSLTPROC, xsltproc, no)
if test "$XSLTPROC" = "no"; then
	AC_MSG_ERROR(xsltproc is required)
fi


82

Philip Van Hoof's avatar
Philip Van Hoof committed
83 84 85
dnl *******************************
dnl Internationalization
dnl ******************************* 
86
GETTEXT_PACKAGE=gnome-schedule
Philip Van Hoof's avatar
Philip Van Hoof committed
87 88
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE")
AC_SUBST(GETTEXT_PACKAGE)
89
dnl AC_CONFIG_MACRO_DIR([m4])
90
GNOME_DOC_INIT
Philip Van Hoof's avatar
Philip Van Hoof committed
91 92

dnl Add the languages which your application supports here.
93
ALL_LINGUAS="bg ca cs da de el en_CA en_GB es fi fr hu it lt ne nl nn pa pt pt_BR ru rw sq sv uk vi zh_CN zh_HK zh_TW"
Philip Van Hoof's avatar
Philip Van Hoof committed
94 95

AM_GLIB_GNU_GETTEXT
96
AC_PROG_INTLTOOL
Philip Van Hoof's avatar
Philip Van Hoof committed
97 98 99

AC_OUTPUT([
Makefile
100 101 102 103
src/config.py
src/Makefile
src/gnome-schedule
pixmaps/Makefile
Philip Van Hoof's avatar
Rename  
Philip Van Hoof committed
104
po/Makefile.in
105
desktop/Makefile
106
desktop/gnome-schedule.desktop.in
Gaute Hope's avatar
Gaute Hope committed
107
servers/Makefile
108
servers/GNOME_GnomeSchedule.server.in
109
help/Makefile
Philip Van Hoof's avatar
Rename  
Philip Van Hoof committed
110
])