| 1 |
dnl Process this file with autoconf to produce a configure script. |
|---|
| 2 |
AC_INIT([python-midgard2],[9.03.0beta1]) |
|---|
| 3 |
AC_CONFIG_SRCDIR(midgardmodule.c) |
|---|
| 4 |
AC_CONFIG_HEADERS([config.h]) |
|---|
| 5 |
|
|---|
| 6 |
dnl Automake is needed for the build system. |
|---|
| 7 |
dnl |
|---|
| 8 |
AM_INIT_AUTOMAKE([1.8]) |
|---|
| 9 |
AM_MAINTAINER_MODE |
|---|
| 10 |
|
|---|
| 11 |
dnl AC_PROG_YACC |
|---|
| 12 |
dnl AC_PROG_CC(gcc cc) |
|---|
| 13 |
dnl AM_PROG_CC_C_O |
|---|
| 14 |
dnl AC_LANG(C) |
|---|
| 15 |
|
|---|
| 16 |
AC_DISABLE_STATIC |
|---|
| 17 |
AM_PROG_LIBTOOL |
|---|
| 18 |
|
|---|
| 19 |
AM_PATH_PYTHON(2.3.4) |
|---|
| 20 |
|
|---|
| 21 |
dnl Check for pkg-config |
|---|
| 22 |
AC_ARG_WITH([pkg-config], |
|---|
| 23 |
AC_HELP_STRING([--with-pkg-config=PATH], [Location of the pkg-config executable]), |
|---|
| 24 |
[PKGCONFIG="$withval"], |
|---|
| 25 |
[AC_PATH_PROG([PKGCONFIG],["pkg-config"])]) |
|---|
| 26 |
|
|---|
| 27 |
dnl Check for python-config |
|---|
| 28 |
PY_CONFIG="" |
|---|
| 29 |
AC_ARG_WITH([python-config], |
|---|
| 30 |
AC_HELP_STRING([--with-python-config=PATH], [Location of the python-config executable]), |
|---|
| 31 |
[PY_CONFIG="$withval"], |
|---|
| 32 |
[AC_PATH_PROG([PY_CONFIG],["python-config"])]) |
|---|
| 33 |
|
|---|
| 34 |
if test "$PY_CONFIG" = ""; then |
|---|
| 35 |
PYTHON_INCLUDES="-I/usr/include/python2.4" |
|---|
| 36 |
exec_prefix="/usr" |
|---|
| 37 |
else |
|---|
| 38 |
PYTHON_INCLUDES=`$PY_CONFIG --includes` |
|---|
| 39 |
exec_prefix=`$PY_CONFIG --exec-prefix` |
|---|
| 40 |
fi |
|---|
| 41 |
|
|---|
| 42 |
PYGOBJECT_CFLAGS=`$PKGCONFIG --cflags pygobject-2.0` |
|---|
| 43 |
GLIB_CFLAGS=`$PKGCONFIG --cflags glib-2.0` |
|---|
| 44 |
|
|---|
| 45 |
MIDGARD_CFLAGS=`$PKGCONFIG --cflags midgard-2.0` |
|---|
| 46 |
MIDGARD_LIBS=`$PKGCONFIG --libs midgard-2.0` |
|---|
| 47 |
PYTHON_LIBS=`$PY_CONFIG --libs` |
|---|
| 48 |
|
|---|
| 49 |
AC_SUBST(MIDGARD_CFLAGS) |
|---|
| 50 |
AC_SUBST(MIDGARD_LIBS) |
|---|
| 51 |
AC_SUBST(PYTHON_INCLUDES) |
|---|
| 52 |
AC_SUBST(PYGOBJECT_CFLAGS) |
|---|
| 53 |
AC_SUBST(GLIB_CFLAGS) |
|---|
| 54 |
AC_SUBST(PYTHON_LIBS) |
|---|
| 55 |
|
|---|
| 56 |
AC_CONFIG_FILES([Makefile]) |
|---|
| 57 |
AC_OUTPUT |
|---|