~ubuntu-branches/ubuntu/precise/pyorbit/precise

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
dnl -*- mode: autoconf -*-
AC_PREREQ(2.52)

m4_define(pyorbit_major_version, 2)
m4_define(pyorbit_minor_version, 14)
m4_define(pyorbit_micro_version, 1)
m4_define(pyorbit_version, pyorbit_major_version.pyorbit_minor_version.pyorbit_micro_version)

m4_define(orbit2_required_version, 2.12)

AC_INIT([pyorbit], [pyorbit_version],
        [http://bugzilla.gnome.org/enter_bug.cgi?product=pyorbit])

AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/pyorbit.h])
AC_CONFIG_HEADERS([config.h])

AM_INIT_AUTOMAKE

# make sure $ACLOCAL_FLAGS are used during a rebuild.
AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \${ACLOCAL_FLAGS}"])

AC_DEFINE([PYORBIT_MAJOR_VERSION], [pyorbit_major_version],
          [PyORBit major version])
AC_DEFINE([PYORBIT_MINOR_VERSION], [pyorbit_minor_version],
          [PyORBit minor version])
AC_DEFINE([PYORBIT_MICRO_VERSION], [pyorbit_micro_version],
          [PyORBit micro version])

# used in the spec file ...
AC_SUBST([ORBIT2_REQUIRED_VERSION], [orbit2_required_version])

AC_DISABLE_STATIC
AC_PROG_LIBTOOL

AM_PATH_PYTHON([2.4])

AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])

PKG_CHECK_MODULES([PYORBIT], [ORBit-2.0 >= orbit2_required_version])

# link with the imodule service if it is available
AC_MSG_CHECKING([for the ORBit2 imodule service])
if AC_RUN_LOG([$PKG_CONFIG --print-errors --exists ORBit-imodule-2.0]); then
   AC_MSG_RESULT([found])
   PYORBIT_CFLAGS=`$PKG_CONFIG --cflags ORBit-imodule-2.0`
   PYORBIT_LIBS=`$PKG_CONFIG --libs ORBit-imodule-2.0`
   AC_DEFINE([HAVE_ORBIT2_IMODULE],,
             [have support for the ORBit2 imodule service])
else
   AC_MSG_RESULT([not found])
fi

# get rid of the -export-dynamic stuff from the configure flags ...
export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
if test -n "$export_dynamic"; then
  PYORBIT_LIBS=`echo $PYORBIT_LIBS | sed -e "s/$export_dynamic//"`
fi

dnl add required cflags ...
JH_ADD_CFLAG([-Wall])
JH_ADD_CFLAG([-std=c9x])
JH_ADD_CFLAG([-fno-strict-aliasing])

AC_CONFIG_FILES([
  Makefile
  src/Makefile
  tests/Makefile
  tests/c-inproc/Makefile
  examples/Makefile
  examples/threaded/Makefile
  pyorbit-2.pc
  pyorbit.spec
  PKG-INFO
])

AC_OUTPUT