1# 2# configure.in - used by autoconf to generate the configure script. 3# 4# Copyright (c) 1997 Phil Maker 5# All rights reserved. 6# 7# Redistribution and use in source and binary forms, with or without 8# modification, are permitted provided that the following conditions 9# are met: 10# 1. Redistributions of source code must retain the above copyright 11# notice, this list of conditions and the following disclaimer. 12# 2. Redistributions in binary form must reproduce the above copyright 13# notice, this list of conditions and the following disclaimer in the 14# documentation and/or other materials provided with the distribution. 15# 16# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26# SUCH DAMAGE. 27# 28# Id: configure.in,v 1.9 1998/07/08 10:56:11 pjm Exp 29# 30 31AC_INIT(src/nana.h) 32 33AC_CANONICAL_SYSTEM 34 35PREV_VERSION=2.4 36AM_INIT_AUTOMAKE(nana, 2.5) 37AC_SUBST(PREV_VERSION) 38 39## 40# 41# The nana_DEFINE macro is to use to generate the default values 42# for various architecture/os specific macros which are then used 43# by nana. These default values are based on the canonical 44# system name ($target), e.g. i386-unknown-freesd2.2.2 45# 46# For example if the new m0086 has a assembler instruction 47# called hcf (halt+catch fire) which we want to use for assert 48# failures since it is efficient (1 byte) we would 49# add an extra rule to I_DEFAULT_HANDLER. 50# 51# m0086-*-*) 52# I_DEFAULT_HANDLER='asm("hcf")' 53# ;; 54# 55# If no default is selected here, a mostly standard C one will be 56# selected by the header files. 57# 58# Note: a few more values from different machine types would be 59# useful. Submissions encouraged! 60# 61## 62 63# default code to call when a I(..) failure occurs 64# 65# The I_DEFAULT variable is used to select between 66# fast which does a core dump ASAP versus verbose 67# which prints a nice message before core dumping. 68 69nana_DEFINE(I_DEFAULT_HANDLER,(exprn,file,line,param), 70[ 71 case "$I_DEFAULT" in 72 fast) 73 case "$target" in 74 i?86-*-*) 75 I_DEFAULT_HANDLER='asm("hlt")' 76 ;; 77 sparc-*-*) 78 # note the sparc handler used to be asm("stp") 79 I_DEFAULT_HANDLER='asm("unimp")' 80 ;; 81 *) 82 I_DEFAULT_HANDLER='abort()' 83 ;; 84 esac 85 ;; 86 verbose) 87 ;; 88 *) 89 ;; 90 esac 91 92]) 93 94# code to emit to ensure a breakpoint can be set at this location 95# 96# e.g. if(f>1) { f--; I(f>=0);} I(f>-1); 97# needs to have a nop inserted so the first I(..) can be checked. 98# 99 100nana_DEFINE(DI_MAKE_VALID_BREAKPOINT,(exprn), 101[ 102 case "$target" in 103 sparc-*-*|i?86-*-*) 104 DI_MAKE_VALID_BREAKPOINT='asm("nop")' 105 ;; 106 esac 107]) 108 109# code to emit to ensure a DL breakpoint can be set at this location 110nana_DEFINE(DL_MAKE_VALID_BREAKPOINT,(), 111[ 112 case "$target" in 113 sparc-*-*|i?86-*-*) 114 DL_MAKE_VALID_BREAKPOINT='asm("nop")' 115 ;; 116 esac 117]) 118 119# on some systems we need to generate a dummy reference to malloc 120# since it isn't normally linked in and is required by gdb 121 122nana_DEFINE(ALWAYS_INCLUDE_MALLOC, /* no arguments */, 123[ 124 case "$target" in 125 *-*-*BSD*) 126 ALWAYS_INCLUDE_MALLOC='0' 127 ;; 128 i?86-*-linux*) 129 ALWAYS_INCLUDE_MALLOC='1' 130 ;; 131 *) 132 ALWAYS_INCLUDE_MALLOC='0' 133 ;; 134 esac 135]) 136 137 138 139# support for cycle level counting for various machines 140# 141# Note: autodiscovery is a bit dubious for these things since they 142# are machine version specific (ie not all i386s have them) 143# 144 145AC_ARG_ENABLE(rdtsc,--enable-rdtsc use pentium rdtsc cycle timing,HAVE_RDTSC=1,HAVE_RDTSC=0) 146AC_SUBST(HAVE_RDTSC) 147 148AC_PROG_CC 149AC_PROG_AWK 150AC_PROG_CPP 151AC_PROG_CXX 152AC_PROG_CXXCPP 153AC_PROG_INSTALL 154AC_PROG_MAKE_SET 155AC_PROG_RANLIB 156AC_CHECK_PROG(FMT, fmt, fmt, cat) 157AC_ARG_PROGRAM 158AC_PATH_PROG(TAR,gtar,tar) 159AC_PATH_PROG(FIND,gfind,find) 160AC_PATH_PROG(GDB,gdb) 161AC_C_INLINE 162AC_C_CONST 163 164 165 166AC_CHECK_FUNCS(vsprintf vsnprintf gettimeofday) 167 168AC_OUTPUT([Makefile doc/Makefile examples/Makefile man/Makefile src/Makefile test/Makefile gdb/Makefile tcl/Makefile emacs/Makefile perf/Makefile src/nana-config.h src/nana src/nana-run src/nana-clg gdb/nana-trace gdb/nana-libtrace src/nana-c++lg shortform/Makefile shortform/nana-sfg shortform/nana-sfdir gnuware test/gammon], [chmod +x src/nana src/nana-clg src/nana-c++lg src/nana-run test/gammon gnuware]) 169 170echo "* Displaying configure variables for C code" 171make showconfig 172