140123Sdes# Copyright (c) 2011-2012, Linaro Limited
266830Sobrien# All rights reserved.
3126310Smtm#
466830Sobrien# Redistribution and use in source and binary forms, with or without
566830Sobrien# modification, are permitted provided that the following conditions are met:
666830Sobrien#     * Redistributions of source code must retain the above copyright
766830Sobrien#       notice, this list of conditions and the following disclaimer.
866830Sobrien#     * Redistributions in binary form must reproduce the above copyright
966830Sobrien#       notice, this list of conditions and the following disclaimer in the
1066830Sobrien#       documentation and/or other materials provided with the distribution.
1166830Sobrien#     * Neither the name of the Linaro nor the
1266830Sobrien#       names of its contributors may be used to endorse or promote products
1366830Sobrien#       derived from this software without specific prior written permission.
1466830Sobrien#
1566830Sobrien# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1666830Sobrien# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1766830Sobrien# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1866830Sobrien# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
1966830Sobrien# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2066830Sobrien# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2166830Sobrien# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2266830Sobrien# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2366830Sobrien# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2466830Sobrien# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2566830Sobrien
2666830SobrienAC_INIT(cortex-strings, 1.1-2012.06~dev)
2783871SobrienAM_INIT_AUTOMAKE(foreign subdir-objects color-tests dist-bzip2)
2850472SpeterAC_CONFIG_HEADERS([config.h])
2966830SobrienAC_CONFIG_FILES(Makefile)
3037SrgrimesAC_CANONICAL_HOST
3137SrgrimesAM_PROG_AS
3237SrgrimesAC_PROG_CC
3337SrgrimesAC_PROG_LIBTOOL
3437Srgrimes
3537Srgrimesdefault_submachine=
3651231Ssheldonh
3751231Ssheldonhcase $host in
3851231Ssheldonhaarch64*-*-*)
3951231Ssheldonh  arch=aarch64
408460Sjkh  ;;
41232976Sedarm*-*-*)
4237Srgrimes  arch=aarch32
4337Srgrimes  default_submachine=cortex-a9
44130161Smtm  ;;
4551231Ssheldonhx86_64-*-*-*)
4637Srgrimes  arch=generic
47130161Smtm  ;;
4837Srgrimes*)
4951231Ssheldonh  AC_MSG_ERROR([unknown architecture $host])
5092441Scjc  ;;
5151231Ssheldonhesac
5237Srgrimes
53114492SdougbAM_CONDITIONAL([HOST_AARCH32], [test x$arch = xaarch32])
54114492SdougbAM_CONDITIONAL([HOST_AARCH64], [test x$arch = xaarch64])
55114492SdougbAM_CONDITIONAL([HOST_GENERIC], [test x$arch = xgeneric])
56114492Sdougb
57108200SdillonAC_ARG_WITH([cpu],
58114492Sdougb	    AS_HELP_STRING([--with-cpu=CPU],
59175676Smtm                           [select code for CPU variant @<:@default=cortex-a9@:>@]]),
6098189Sgordon	    [dnl
6198189Sgordon  case "$withval" in
62145693Sbrooks  yes|'') AC_MSG_ERROR([--with-cpu requires an argument]) ;;
63145693Sbrooks  no) ;;
64145693Sbrooks  *) submachine="$withval" ;;
65145693Sbrooks  esac
66145693Sbrooks],
67153298Sdougb[submachine=$default_submachine])
68153298Sdougb
69153298SdougbAC_SUBST(submachine)
70153298SdougbAM_CONDITIONAL([WITH_SUBMACHINE], [test x$submachine != x])
71153298Sdougb
72275360SdesAC_ARG_WITH([neon],
73153298Sdougb            AC_HELP_STRING([--with-neon],
74258894Scperciva                           [include NEON specific routines @<:@default=yes@:>@]),
75258894Scperciva	    [with_neon=$withval],
76258894Scperciva	    [with_neon=yes])
77275360SdesAC_SUBST(with_neon)
78258894ScpercivaAM_CONDITIONAL(WITH_NEON, test x$with_neon = xyes)
79126743Spjd
80155866SdougbAC_ARG_WITH([vfp],
81155866Sdougb            AC_HELP_STRING([--with-vfp],
82250804Sjamie                           [include VFP specific routines @<:@default=yes@:>@]),
83250804Sjamie	    [with_vfp=$withval],
84250804Sjamie	    [with_vfp=yes])
85155866SdougbAC_SUBST(with_vfp)
86153027SdougbAM_CONDITIONAL(WITH_VFP, test x$with_vfp = xyes)
87256775Scperciva
88256775ScpercivaAC_OUTPUT
89256775Scperciva