configure.ac 3.46 KB
Newer Older
1
AC_INIT(src/gnome-schedule.py)
Gaute Hope's avatar
Gaute Hope committed
2
AM_INIT_AUTOMAKE(gnome-schedule, 2.2.2)
3

4 5
dnl check for python
dnl AM_PATH_PYTHON
6 7
dnl Until PyGtk supports Python 3 we look for Python 2 first
AC_PATH_PROG(PYTHON, python2 python2.7 python2.6 python2.5 python)
8 9
AM_PATH_PYTHON

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

14 15 16 17 18 19 20 21 22

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

23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
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

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)
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

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

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
AC_PATH_PROG(XSLTPROC, xsltproc, no)
if test "$XSLTPROC" = "no"; then
	AC_MSG_ERROR(xsltproc is required)
fi

102 103 104 105 106 107 108 109 110 111 112 113 114 115
dnl Enable applet, the applet is not compatible with GNOME 3
dnl and should be explicitily enabled.
AC_MSG_CHECKING(for whether to include GNOME panel applet..)
AC_ARG_ENABLE(applet,
              [  --enable-applet         enable applet for the GNOME panel (GNOME 2 only)],
              [applet=yes])

AM_CONDITIONAL([APPLET], [test x$applet = xyes])

if test "$applet" = "yes"; then
  AC_MSG_RESULT(yes)
else
  AC_MSG_RESULT(no)
fi
116

117

118 119
dnl *******************************
dnl Internationalization
120
dnl *******************************
121
GETTEXT_PACKAGE=gnome-schedule
122 123
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE")
AC_SUBST(GETTEXT_PACKAGE)
124
dnl AC_CONFIG_MACRO_DIR([m4])
125
GNOME_DOC_INIT
126 127

dnl Add the languages which your application supports here.
Piotr Drąg's avatar
Piotr Drąg committed
128
ALL_LINGUAS="ar bg bs ca cs da de dz el en_CA en_GB es eu fi fr gl gu hu id it ja lt nb ne nl nn oc pa pl pt pt_BR ro ru rw sl sq sr sr@latin sv uk vi zh_CN zh_HK zh_TW"
129 130

AM_GLIB_GNU_GETTEXT
131
AC_PROG_INTLTOOL
132 133 134

AC_OUTPUT([
Makefile
135 136 137
src/config.py
src/Makefile
src/gnome-schedule
138 139
src/gnome-schedule-export
src/gnome-schedule-import
Gaute Hope's avatar
Gaute Hope committed
140
icons/Makefile
Philip Van Hoof's avatar
Philip Van Hoof committed
141
po/Makefile.in
142
desktop/Makefile
143
desktop/gnome-schedule.desktop.in
Gaute Hope's avatar
Gaute Hope committed
144
servers/Makefile
145
servers/GNOME_GnomeSchedule.server.in
146
help/Makefile
Philip Van Hoof's avatar
Philip Van Hoof committed
147
])
148