1 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2 # 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
3 # Free Software Foundation, Inc.
5 # This file is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; see the file COPYING3. If not see
17 # <http://www.gnu.org/licenses/>.
19 ##############################################################################
20 ### WARNING: this file contains embedded tabs. Do not run untabify on this file.
21 # Process this file with autoconf to produce a configure script, like so:
22 # aclocal && autoconf && autoheader && automake
25 AC_INIT([GNU Python Runtime Library], 0.1,,[libgpython])
26 AC_CONFIG_HEADER(config.h)
28 AC_CONFIG_AUX_DIR([config])
29 AC_CONFIG_MACRO_DIR([m4])
38 AC_CHECK_PROGS(AR, ar aal, ar)
56 # Just to make sure we dont do debug on default!
59 [AS_HELP_STRING([--with-libgpython-debug=yes/no],
60 [With Debug symbols, default no.])],
62 if test "x$debug" == "xyes"; then
63 AC_DEFINE([DEBUG], 1, [Debug Symbols Flag])
66 # a lang needs math functions...
67 AC_CHECK_LIB([m], [pow], ,
68 [AC_MSG_ERROR([System Math library is required!])])
70 # used for constant folding and rounding
71 AC_CHECK_LIB([gmp], [__gmpz_init], ,
72 [AC_MSG_ERROR([GNU MP not found, see http://gmplib.org/])])
73 AC_CHECK_LIB([mpfr],[mpfr_init] , ,
74 [AC_MSG_ERROR([MPFR not found, see http://www.mpfr.org/])])
75 AC_CHECK_SIZEOF(mp_limb_t, , [#include <gmp.h>])
78 AS_IF([test "x$vl_cv_lib_readline" = "xno"],
79 AC_MSG_ERROR([libreadline is required for Crules. \
80 On Debian this can be found in libreadline5-dev. On RedHat \
81 this can be found in readline-devel.]))
82 AC_CHECK_FUNCS(dlopen)
89 AC_PATH_PROG(MV, mv, mv)
90 AC_PATH_PROG(RM, rm, rm)
91 AC_PATH_PROG(CP, cp, cp)
92 AC_PATH_PROG(SED, sed, sed)
93 AC_PATH_PROG(CMP, cmp, cmp)
94 AC_PATH_PROG(CHMOD, chmod, chmod)
95 AC_PATH_PROG(HOSTNAME, hostname, hostname)
100 AC_CHECK_SIZEOF(char)
102 AC_CHECK_SIZEOF(void*)
103 AC_CHECK_SIZEOF(short)
104 AC_CHECK_SIZEOF(double)
105 AC_CHECK_SIZEOF(float)
106 AC_CHECK_SIZEOF(size_t)
107 AC_CHECK_SIZEOF(long int)
108 AC_CHECK_SIZEOF(long long)
110 # Checks for header files.
114 AC_CHECK_HEADERS([stdlib.h string.h stdarg.h unistd.h \
115 stdint.h stdio.h getopt.h \
116 assert.h sys/types.h signal.h \
117 fcntl.h pthread.h sys/wait.h \
120 # Checks for typedefs, structures, and compiler characteristics.
124 AC_CHECK_FUNCS([popen fopen fclose sprintf fprintf strdup \
125 strlen strcpy strcmp getopt_long \
126 memcpy calloc system sysconf atoi \
127 getpid execl fork wait exit atof \
128 vfprintf memcmp getc fgets pipe \
131 # Checks for library functions.
135 AC_CONFIG_FILES([Makefile])
138 dnl libtoolize scans configure.ac and needs to see some text
139 m4_define([LIBTOOLIZE_AC_INIT], [])