configure.ac 2.88 KB
Newer Older
1
AC_INIT(src/gnome-schedule.py)
Gaute Hope's avatar
Gaute Hope committed
2
AM_INIT_AUTOMAKE(gnome-schedule, 2.1.1)
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
PKG_CHECK_MODULES(GNOMEPYTHON, gnome-python-2.0 >= 2.12.0)

Gaute Hope's avatar
Gaute Hope committed
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
export PYTHONPATH=$PYGTK_DIR:$PYTHONPATH
dnl check for python-gconf
AC_MSG_CHECKING(for python gconf)
prog="
import sys
try:
  import gconf
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 gconf bindings installed])
fi
66

67
AC_PATH_PROG(CRONTAB_CONFIG, crontab, no)
Philip Van Hoof's avatar
Philip Van Hoof committed
68
if test x$CRONTAB_CONFIG = xno; then
69 70 71
  AC_MSG_ERROR(Please install the application crontab)
fi

Philip Van Hoof's avatar
Philip Van Hoof committed
72 73 74 75 76
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
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
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
92 93 94 95 96
AC_PATH_PROG(SU_CONFIG, su, no)
if test x$BATCH_CONFIG = xno; then
  AC_MSG_ERROR(Please install the application su)
fi

97 98 99 100 101 102
AC_PATH_PROG(XSLTPROC, xsltproc, no)
if test "$XSLTPROC" = "no"; then
	AC_MSG_ERROR(xsltproc is required)
fi


103

Philip Van Hoof's avatar
Philip Van Hoof committed
104 105 106
dnl *******************************
dnl Internationalization
dnl ******************************* 
107
GETTEXT_PACKAGE=gnome-schedule
Philip Van Hoof's avatar
Philip Van Hoof committed
108 109
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE")
AC_SUBST(GETTEXT_PACKAGE)
110
dnl AC_CONFIG_MACRO_DIR([m4])
111
GNOME_DOC_INIT
Philip Van Hoof's avatar
Philip Van Hoof committed
112 113

dnl Add the languages which your application supports here.
Fran Dieguez's avatar
Fran Dieguez committed
114
ALL_LINGUAS="ar bg ca cs da de dz el en_CA en_GB es fi fr gl gu hu it lt nb ne nl nn oc pa pt pt_BR ru rw sl sq sv uk vi zh_CN zh_HK zh_TW"
Philip Van Hoof's avatar
Philip Van Hoof committed
115 116

AM_GLIB_GNU_GETTEXT
117
AC_PROG_INTLTOOL
Philip Van Hoof's avatar
Philip Van Hoof committed
118 119 120

AC_OUTPUT([
Makefile
121 122 123
src/config.py
src/Makefile
src/gnome-schedule
Gaute Hope's avatar
Gaute Hope committed
124
icons/Makefile
Philip Van Hoof's avatar
Rename  
Philip Van Hoof committed
125
po/Makefile.in
126
desktop/Makefile
127
desktop/gnome-schedule.desktop.in
Gaute Hope's avatar
Gaute Hope committed
128
servers/Makefile
129
servers/GNOME_GnomeSchedule.server.in
130
help/Makefile
Philip Van Hoof's avatar
Rename  
Philip Van Hoof committed
131
])