-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.in
79 lines (62 loc) · 2.32 KB
/
configure.in
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
78
79
dnl -*- mode: autoconf -*-
AC_PREREQ(2.52)
m4_define(pymatecorba_major_version, 1)
m4_define(pymatecorba_minor_version, 4)
m4_define(pymatecorba_micro_version, 0)
m4_define(pymatecorba_version, pymatecorba_major_version.pymatecorba_minor_version.pymatecorba_micro_version)
m4_define(matecorba2_required_version, 1.2.0)
AC_INIT([pymatecorba], [pymatecorba_version],
[http://www.mate-desktop.org/])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/pymatecorba.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([PYMATECORBA_MAJOR_VERSION], [pymatecorba_major_version],
[PyMateCORBA major version])
AC_DEFINE([PYMATECORBA_MINOR_VERSION], [pymatecorba_minor_version],
[PyMateCORBA minor version])
AC_DEFINE([PYMATECORBA_MICRO_VERSION], [pymatecorba_micro_version],
[PyMateCORBA micro version])
# used in the spec file ...
AC_SUBST([MATECORBA2_REQUIRED_VERSION], [matecorba2_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)])
CC="$PYTHON_CC"
PKG_CHECK_MODULES([PYMATECORBA], [MateCORBA-2.0])
# MateCORBA-2.0 >= matecorba2_required_version
# link with the imodule service if it is available
AC_MSG_CHECKING([for the MateCORBA2 imodule service])
if AC_RUN_LOG([$PKG_CONFIG --print-errors --exists MateCORBA-imodule-2.0]); then
AC_MSG_RESULT([found])
PYMATECORBA_CFLAGS=`$PKG_CONFIG --cflags MateCORBA-imodule-2.0`
PYMATECORBA_LIBS=`$PKG_CONFIG --libs MateCORBA-imodule-2.0`
AC_DEFINE([HAVE_MATECORBA2_IMODULE],,
[have support for the MateCORBA2 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
PYMATECORBA_LIBS=`echo $PYMATECORBA_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
pymatecorba-2.pc
pymatecorba.spec
PKG-INFO
])
AC_OUTPUT