comparison configure.ac @ 418:a39b2e9112a0

build: reorganize and simplify configure script * configure.ac: Remove unnecessary macros. Call AC_USE_SYSTEM_EXTENSIONS. Reorganize remaining macro calls. Rewrite summary output to resemble Octave.
author Mike Miller <mtmiller@octave.org>
date Thu, 04 May 2017 08:52:53 -0700
parents 4e427ec1650a
children
comparison
equal deleted inserted replaced
417:4e427ec1650a 418:a39b2e9112a0
1 dnl Process this file with autoconf to produce a configure script. 1 dnl Process this file with autoconf to produce a configure script.
2 dnl 2 dnl
3 dnl Copyright (C) 2015-2016 Mike Miller 3 dnl Copyright (C) 2015-2017 Mike Miller
4 dnl Copyright (C) 2008 David Grundberg, HÃ¥kan Fors Nilsson
5 dnl Copyright (C) 2009 Jaroslav Hajek, VZLU Prague
6 ### 4 ###
7 ### This file is part of Pytave. 5 ### This file is part of Pytave.
8 ### 6 ###
9 ### Pytave is free software: you can redistribute it and/or modify it 7 ### Pytave is free software: you can redistribute it and/or modify it
10 ### under the terms of the GNU General Public License as published by the 8 ### under the terms of the GNU General Public License as published by the
21 ### <http://www.gnu.org/licenses/>. 19 ### <http://www.gnu.org/licenses/>.
22 20
23 AC_PREREQ(2.61) 21 AC_PREREQ(2.61)
24 AC_INIT(pytave, dev, [[https://bitbucket.org/mtmiller/pytave/issues]]) 22 AC_INIT(pytave, dev, [[https://bitbucket.org/mtmiller/pytave/issues]])
25 23
26 # Some important programs.
27 AC_LANG(C++)
28 AC_PROG_CXX
29 AC_PROG_CPP
30 AC_PROG_CC
31
32 AC_CONFIG_AUX_DIR([build-aux]) 24 AC_CONFIG_AUX_DIR([build-aux])
25 AC_CONFIG_FILES([Makefile])
26 AC_CONFIG_HEADER([config.h])
33 AC_CONFIG_MACRO_DIR([m4]) 27 AC_CONFIG_MACRO_DIR([m4])
34 AC_CONFIG_SRCDIR([oct-py-eval.cc]) 28 AC_CONFIG_SRCDIR([oct-py-eval.cc])
35 AC_CONFIG_HEADER([config.h])
36 AC_CONFIG_FILES([Makefile])
37 29
38 # Find Octave 30 AM_INIT_AUTOMAKE([foreign -Wno-portability])
31
32 AC_USE_SYSTEM_EXTENSIONS
33
34 LT_INIT
35
36 AC_PROG_CXX
37
38 AC_LANG(C++)
39
40 ### Check for Octave library and mkoctfile
41
39 AX_OCTAVE([OCTAVE_CONFIG], [], 42 AX_OCTAVE([OCTAVE_CONFIG], [],
40 [AC_MSG_FAILURE([unable to find Octave development files])]) 43 [AC_MSG_FAILURE([unable to find Octave development files])])
41 pytave_save_CPPFLAGS=$CPPFLAGS
42 CPPFLAGS=$OCTAVE_CPPFLAGS
43 CPPFLAGS=$pytave_save_CPPFLAGS
44 44
45 # Pick a Python library to use 45 ### Check for Python library and interpreter
46
46 AX_PYTHON_DEVEL 47 AX_PYTHON_DEVEL
47 for opt in $PYTHON_LIBS; do 48 for opt in $PYTHON_LIBS; do
48 case "$opt" in #( 49 case "$opt" in #(
49 -L/usr*) : ;; #( 50 -L/usr*) : ;; #(
50 -L*) PYTHON_LIBS="-R${opt#-L} $PYTHON_LIBS" ;; #( 51 -L*) PYTHON_LIBS="-R${opt#-L} $PYTHON_LIBS" ;; #(
51 *) : ;; 52 *) : ;;
52 esac 53 esac
53 done 54 done
54 55
55 AM_INIT_AUTOMAKE([foreign -Wno-portability])
56 LT_INIT
57
58 # Checks for typedefs, structures, and compiler characteristics.
59 AC_HEADER_STDBOOL
60 AC_C_CONST
61 AC_C_INLINE
62 AC_TYPE_INT8_T
63 AC_TYPE_INT16_T
64 AC_TYPE_INT32_T
65 AC_TYPE_INT64_T
66 AC_TYPE_SIZE_T
67 AC_TYPE_UINT8_T
68 AC_TYPE_UINT16_T
69 AC_TYPE_UINT32_T
70 AC_TYPE_UINT64_T
71
72 AC_OUTPUT 56 AC_OUTPUT
73 57
74 AC_MSG_NOTICE([ 58 AC_MSG_NOTICE([
75 ========================================================================
76 Pytave is configured with the following setup
77 59
78 Dependencies 60 Pytave is now configured for the following
79 Octave ............. $OCTAVE_INCLUDEDIR
80 Python ............. $PYTHON_CPPFLAGS
81 library .......... $PYTHON_LIBS
82 executable ....... $PYTHON
83 61
84 ========================================================================]) 62 Octave header files: $OCTAVE_INCLUDEDIR
63 Octave libraries: $OCTAVE_LIBRARYDIR
64 Python header files: $PYTHON_CPPFLAGS
65 Python library: $PYTHON_LIBS
66 Python executable: $PYTHON
67 ])