Mercurial > pytave
annotate configure.ac @ 30:28e77b24209d task
trace cleanup
author | David Grundberg <individ@acc.umu.se> |
---|---|
date | Tue, 05 May 2009 15:13:10 +0200 |
parents | 6d75691c5c07 |
children | 798efee55cd0 |
rev | line source |
---|---|
0
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
1 # -*- Autoconf -*- |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
2 # Process this file with autoconf to produce a configure script. |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
3 |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
4 AC_PREREQ(2.61) |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
5 AC_INIT(pytave, 0.1.1, c04dgg@cs.umu.se) |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
6 |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
7 # Some important programs. |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
8 AC_LANG(C++) |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
9 AC_PROG_CXX |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
10 AC_PROG_CPP |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
11 AC_PROG_CC |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
12 |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
13 # Load our custom m4 scripts (from the m4 directory) |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
14 AC_CONFIG_MACRO_DIR(m4) |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
15 AC_CONFIG_SRCDIR([pytave.cc]) |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
16 AC_CONFIG_HEADER([config.h]) |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
17 |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
18 AC_PRESERVE_HELP_ORDER |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
19 |
29
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
20 pytave_libs_ok= |
0
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
21 |
30 | 22 AX_OCTAVE([], [], [pytave_libs_ok=no]) |
23 AX_PYTHON_DEVEL([], [], [pytave_libs_ok=no]) | |
0
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
24 |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
25 # Look for boost::python |
29
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
26 pytave_old_libs="$LIBS" |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
27 pytave_old_ldflags="$LDFLAGS" |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
28 pytave_old_cppflags="$CPPFLAGS" |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
29 LIBS="$LIBS $PYTHON_LIBS" |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
30 LDFLAGS="$LDFLAGS $PYTHON_LDFLAGS" |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
31 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" |
0
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
32 |
30 | 33 AX_BOOST_PYTHON([], [pytave_libs_ok=no]) |
0
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
34 |
29
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
35 LIBS="$pytave_old_libs" |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
36 LDFLAGS="$pytave_old_ldflags" |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
37 CPPFLAGS="$pytave_old_cppflags" |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
38 |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
39 # Now check the libs, if they have problems, halt. |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
40 AS_IF(test -n "$pytave_libs_ok", |
0
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
41 [ |
29
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
42 AC_MSG_ERROR([ |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
43 ======================================================================== |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
44 One or more library dependencies could not be resolved. |
0
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
45 |
29
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
46 Configuration failed. Halt. |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
47 ========================================================================]) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
48 ]) |
0
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
49 |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
50 # Do some more initializations |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
51 |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
52 AM_INIT_AUTOMAKE() |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
53 |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
54 # Checks for programs. |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
55 AC_PROG_LIBTOOL |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
56 AC_PROG_RANLIB |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
57 AC_PROG_INSTALL |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
58 AC_PROG_LN_S |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
59 AC_PROG_MAKE_SET |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
60 |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
61 # Checks for libraries. |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
62 |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
63 # Checks for header files. |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
64 |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
65 # Checks for typedefs, structures, and compiler characteristics. |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
66 AC_HEADER_STDBOOL |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
67 AC_C_CONST |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
68 |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
69 # Checks for library functions. |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
70 |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
71 # This needs a more usable, less unusual solution. |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
72 AS_IF(test "x${prefix}" == "xNONE", |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
73 [ |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
74 PYTAVE_MODULE_INSTALL_PATH=/../invalidpath, |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
75 ], |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
76 [ |
12
a0c819a31e02
Better checking for Python dependencies.
David Grundberg <individ@acc.umu.se>
parents:
0
diff
changeset
|
77 PYTAVE_MODULE_INSTALL_PATH=${prefix} |
0
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
78 ]) |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
79 |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
80 # Substitutes for the Makefile/Jamfile |
29
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
81 #AC_SUBST(OCTAVE_INCLUDEDIR) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
82 #AC_SUBST(OCTAVE_LIBRARYDIR) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
83 PYTAVE_OCTAVE_RPATH="$OCTAVE_LIBRARYDIR" |
0
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
84 AC_SUBST(PYTAVE_OCTAVE_RPATH) |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
85 AC_SUBST(PYTAVE_MODULE_INSTALL_PATH) |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
86 |
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
87 # Substitutes for the Jamfile. XXX: Replace lib*.so with OS independent name. |
29
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
88 AC_SUBST(JAM_LIBOCTAVE, $OCTAVE_LIBRARYDIR/liboctave.so) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
89 AC_SUBST(JAM_LIBCRUFT, $OCTAVE_LIBRARYDIR/libcruft.so) |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
90 AC_SUBST(JAM_LIBOCTINTERP, $OCTAVE_LIBRARYDIR/liboctinterp.so) |
0
4da14cce0890
First launchpad.net check in.
David Grundberg <c04dgg@cs.umu.se>
parents:
diff
changeset
|
91 |
29
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
92 # Substitute in these files, copy project-root.jam to VPATH too |
6d75691c5c07
Modified build configuration in the hope that it will be more stable.
David Grundberg <individ@acc.umu.se>
parents:
12
diff
changeset
|
93 AC_OUTPUT([Makefile Jamfile setup.py project-root.jam]) |