clean up and renames beginigs of a testsuite
[official-gcc.git] / libgpython / configure.ac
blobd653fdf0a2d6deff074632bdbdb406dd7c2c2212
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
24 AC_PREREQ(2.64)
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])
30 AM_SANITY_CHECK
32 AC_PROG_AWK
33 AC_PROG_CPP
34 AC_PROG_INSTALL
35 AC_PROG_LN_S
36 AC_PROG_MAKE_SET
37 AC_PROG_RANLIB
38 AC_CHECK_PROGS(AR, ar aal, ar)
39 AC_PROG_CC_C99
40 AC_PROG_CXX
42 AC_PROG_INSTALL
44 AC_LIBTOOL_DLOPEN
45 AC_PROG_LIBTOOL
46 AM_PROG_LIBTOOL
48 AM_PROG_CC_C_O
50 AC_C_BIGENDIAN
51 AC_C_INLINE
52 AC_C_VOLATILE
54 AC_CANONICAL_HOST
56 # Just to make sure we dont do debug on default!
57 debug=no
58 AC_ARG_WITH(debug,
59   [AS_HELP_STRING([--with-libgpython-debug=yes/no],
60     [With Debug symbols, default no.])],
61   [debug="$withval"])
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>])
77 VL_LIB_READLINE
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)
84 gl_VISIBILITY
86 AC_SUBST(CFLAGS)
87 AC_SUBST(LDFLAGS)
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)
97 AM_INIT_AUTOMAKE
99 AC_CHECK_SIZEOF(long)
100 AC_CHECK_SIZEOF(char)
101 AC_CHECK_SIZEOF(int)
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.
111 AC_HEADER_SYS_WAIT
112 AC_HEADER_STDBOOL
113 AC_HEADER_STDC
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 \
118                   gmp.h mpfr.h])
120 # Checks for typedefs, structures, and compiler characteristics.
121 AC_C_CONST
122 AC_TYPE_PID_T
123 AC_TYPE_SIZE_T
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 \
129                 waitpid fdopen])
131 # Checks for library functions.
132 AC_FUNC_MALLOC
133 AC_FUNC_UTIME_NULL
134 AC_FUNC_VPRINTF
135 AC_CONFIG_FILES([Makefile])
137 AC_OUTPUT
138 dnl libtoolize scans configure.ac  and needs to see some text
139 m4_define([LIBTOOLIZE_AC_INIT], [])