comparison configure.ac @ 3043:cbfe5d38ff2c

use configure script to generate Makefile
author John W. Eaton <jwe@octave.org>
date Wed, 12 Jun 2013 13:50:50 -0400
parents
children eb1a22446662
comparison
equal deleted inserted replaced
3042:ace9dd211c99 3043:cbfe5d38ff2c
1 dnl Process this file with autoconf to produce a configure script.
2
3 AC_PREREQ([2.62])
4 AC_INIT([MXE-Octave], [0.0.1], [http://octave.org/bugs.html], [mxe-octave])
5
6 AC_CONFIG_SRCDIR([src/octave.mk])
7 AC_CONFIG_AUX_DIR([tools])
8
9 ### Check for bootstrap tools. This list is probably not complete yet.
10
11 AC_PROG_AWK
12 AC_PROG_GREP
13 AC_PROG_LN_S
14 AC_PROG_MKDIR_P
15 AC_PROG_INSTALL
16 AC_PROG_CC
17 AC_PROG_CPP
18 AC_PROG_GCC_TRADITIONAL
19
20 dnl PKG_PROG_PKG_CONFIG
21 dnl OCTAVE_PROG_FIND
22 dnl OCTAVE_PROG_SED
23 dnl OCTAVE_PROG_PERL
24 dnl OCTAVE_PROG_GPERF
25 dnl OCTAVE_PROG_FLEX
26 dnl OCTAVE_PROG_BISON
27 dnl OCTAVE_PROG_MAKEINFO
28 dnl OCTAVE_PROG_TEXI2DVI
29 dnl OCTAVE_PROG_TEXI2PDF
30 dnl OCTAVE_PROG_GHOSTSCRIPT
31 dnl OCTAVE_PROG_GNUPLOT
32 dnl OCTAVE_PROG_PAGER
33 dnl OCTAVE_PROG_PYTHON
34 dnl OCTAVE_CHECK_LIB_TERMLIB
35
36 ### Define the path to the shell on the host system. Most systems will
37 ### ensure /bin/sh is the default shell so this can be safely ignored by
38 ### almost everyone. However, when building for Android, for example,
39 ### this will need to be set.
40 SHELL_PATH=/bin/sh
41 AC_ARG_WITH([shell],
42 [AS_HELP_STRING([--with-shell=SHELL],
43 [use SHELL as the shell interpreter (default: /bin/sh)])])
44 case $with_shell in
45 no)
46 AC_MSG_ERROR([A shell interpreter is required])
47 ;;
48 yes | "")
49 ;;
50 *)
51 SHELL_PATH=$with_shell
52 ;;
53 esac
54 AC_DEFINE_UNQUOTED([SHELL_PATH], ["$SHELL_PATH"],
55 [Define this to be the path to the shell command interpreter.])
56
57 ### If possible, use a 64-bit integer type for array dimensions and indexing.
58
59 ENABLE_64=no
60 AC_ARG_ENABLE(64,
61 [AS_HELP_STRING([--enable-64],
62 [(EXPERIMENTAL) use 64-bit integers for array dimensions and indexing])],
63 [if test "$enableval" = yes; then ENABLE_64=yes; fi], [])
64 AC_SUBST(ENABLE_64)
65
66 BUILD_SHARED=yes
67 AC_ARG_ENABLE(shared,
68 [AS_HELP_STRING([--disable-shared], [Disable shared libraries])],
69 [], [if test "$enableval" = no; then BUILD_SHARED=no; fi])
70 AC_SUBST(BUILD_SHARED)
71
72 BUILD_STATIC=no
73 AC_ARG_ENABLE(static,
74 [AS_HELP_STRING([--enable-static], [Enable static libraries])],
75 [if test "$enableval" = yes; then BUILD_STATIC=yes; fi], [])
76 AC_SUBST(BUILD_STATIC)
77
78 ENABLE_JIT=yes
79 AC_ARG_ENABLE([jit],
80 [AS_HELP_STRING([--enable-jit],
81 [(EXPERIMENTAL) enable Octave JIT compiler])],
82 [if test "$enableval" = yes; then ENABLE_JIT=yes; fi], [])
83 AC_SUBST(ENABLE_JIT)
84
85 MXE_NATIVE_BUILD=false
86 AC_ARG_ENABLE([native-build],
87 [AS_HELP_STRING([--enable-native-build],
88 [Enable native build (default is cross compile)])],
89 [if test "$enableval" = yes; then MXE_NATIVE_BUILD=yes; fi], [])
90 AC_SUBST(MXE_NATIVE_BUILD)
91
92 USE_SYSTEM_GCC=$MXE_NATIVE_BUILD
93 AC_ARG_ENABLE([system-gcc],
94 [AS_HELP_STRING([--enable-system-gcc],
95 [Use GCC already installed on system])],
96 [if test "$enableval" = yes; then USE_SYSTEM_GCC=yes; fi], [])
97 AC_SUBST(USE_SYSTEM_GCC)
98
99 USE_PIC_FLAG=no
100 AC_ARG_ENABLE([pic-flag],
101 [AS_HELP_STRING([--enable-pic-flag], [Compile with PIC flag])],
102 [if test "$enableval" = yes; then USE_PIC_FLAG=yes; fi], [])
103 AC_SUBST(USE_PIC_FLAG)
104
105 ### Default is to cross compile for mingw.
106
107 echo $host_alias
108 if test -n "$host_alias"; then
109 MXE_SYSTEM=$host_alias
110 else
111 MXE_SYSTEM=mingw
112 fi
113 AC_SUBST(MXE_SYSTEM)
114
115 AC_CONFIG_FILES([Makefile])
116
117 AC_OUTPUT
118
119 ### End of configure.