1# Configure script for libada. 2# Copyright 2003, 2004, 2009, 2012 Free Software Foundation, Inc. 3# 4# This file is free software; you can redistribute it and/or modify it 5# under the terms of the GNU General Public License as published by 6# the Free Software Foundation; either version 3 of the License, or 7# (at your option) any later version. 8# 9# This program is distributed in the hope that it will be useful, but 10# WITHOUT ANY WARRANTY; without even the implied warranty of 11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12# General Public License for more details. 13# 14# You should have received a copy of the GNU General Public License 15# along with this program; see the file COPYING3. If not see 16# <http://www.gnu.org/licenses/>. 17 18sinclude(../config/acx.m4) 19sinclude(../config/override.m4) 20 21AC_INIT 22AC_PREREQ([2.64]) 23 24AC_CONFIG_SRCDIR([Makefile.in]) 25 26# Command-line options. 27# Very limited version of AC_MAINTAINER_MODE. 28AC_ARG_ENABLE([maintainer-mode], 29 [AC_HELP_STRING([--enable-maintainer-mode], 30 [enable make rules and dependencies not useful (and 31 sometimes confusing) to the casual installer])], 32 [case ${enable_maintainer_mode} in 33 yes) MAINT='' ;; 34 no) MAINT='#' ;; 35 *) AC_MSG_ERROR([--enable-maintainer-mode must be yes or no]) ;; 36 esac 37 maintainer_mode=${enableval}], 38 [MAINT='#']) 39AC_SUBST([MAINT])dnl 40 41# Start of actual configure tests 42 43AC_PROG_INSTALL 44 45AC_CANONICAL_BUILD 46AC_CANONICAL_HOST 47AC_CANONICAL_TARGET 48 49ACX_NONCANONICAL_TARGET 50 51# Need to pass this down for now :-P 52AC_PROG_LN_S 53 54# Determine what to build for 'gnattools' 55if test $build = $target ; then 56 # Note that build=target is almost certainly the wrong test; FIXME 57 default_gnattools_target="gnattools-native" 58else 59 default_gnattools_target="gnattools-cross" 60fi 61AC_SUBST([default_gnattools_target]) 62 63# Target-specific stuff (defaults) 64TOOLS_TARGET_PAIRS= 65AC_SUBST(TOOLS_TARGET_PAIRS) 66EXTRA_GNATTOOLS= 67AC_SUBST(EXTRA_GNATTOOLS) 68 69# Per-target case statement 70# ------------------------- 71case "${target}" in 72 *-*-aix*) 73 TOOLS_TARGET_PAIRS="\ 74 mlib-tgt-specific.adb<mlib-tgt-specific-aix.adb \ 75 indepsw.adb<indepsw-aix.adb" 76 ;; 77 *-*-darwin*) 78 TOOLS_TARGET_PAIRS="\ 79 mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb \ 80 indepsw.adb<indepsw-darwin.adb" 81 ;; 82 *-*-freebsd*) 83 TOOLS_TARGET_PAIRS="\ 84 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \ 85 indepsw.adb<indepsw-gnu.adb" 86 ;; 87 *-*-linux*) 88 TOOLS_TARGET_PAIRS="\ 89 mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \ 90 indepsw.adb<indepsw-gnu.adb" 91 ;; 92 *-*-solaris*) 93 TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-solaris.adb" 94 ;; 95 *-*-vxworks*) 96 TOOLS_TARGET_PAIRS="\ 97 mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \ 98 indepsw.adb<indepsw-gnu.adb" 99 ;; 100 hppa*-hp-hpux10*) 101 ;; 102 hppa*-hp-hpux11*) 103 TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-hpux.adb" 104 ;; 105 ia64-hp-hpux11*) 106 TOOLS_TARGET_PAIRS="mlib-tgt-specific.adb<mlib-tgt-specific-ia64-hpux.adb" 107 ;; 108 alpha*-*-vms* | alpha*-*-openvms*) 109 TOOLS_TARGET_PAIRS="\ 110 mlib-tgt-specific.adb<mlib-tgt-specific-vms-alpha.adb \ 111 symbols.adb<symbols-vms.adb \ 112 symbols-processing.adb<symbols-processing-vms-alpha.adb" 113 EXTRA_GNATTOOLS='../../gnatlbr$(exeext) ../../gnatsym$(exeext)' 114 ;; 115 ia64-*-vms* | ia64-*-openvms*) 116 TOOLS_TARGET_PAIRS="\ 117 mlib-tgt-specific.adb<mlib-tgt-specific-vms-ia64.adb \ 118 symbols.adb<symbols-vms.adb \ 119 symbols-processing.adb<symbols-processing-vms-ia64.adb" 120 EXTRA_GNATTOOLS='../../gnatlbr$(exeext) ../../gnatsym$(exeext)' 121 ;; 122 *-*-cygwin32* | *-*-mingw32* | *-*-pe) 123 TOOLS_TARGET_PAIRS="\ 124 mlib-tgt-specific.adb<mlib-tgt-specific-mingw.adb \ 125 indepsw.adb<indepsw-mingw.adb" 126 EXTRA_GNATTOOLS='../../gnatdll$(exeext)' 127 ;; 128esac 129 130# From user or toplevel makefile. 131AC_SUBST(ADA_CFLAGS) 132 133AC_PROG_CC 134warn_cflags= 135if test "x$GCC" = "xyes"; then 136 warn_cflags='$(GCC_WARN_CFLAGS)' 137fi 138AC_SUBST(warn_cflags) 139 140# Output: create a Makefile. 141AC_CONFIG_FILES([Makefile]) 142 143AC_OUTPUT 144