blob: 2e08169ac333238c3809670bc9a8c852ae0ce961 [file] [log] [blame]
mmentovai7daf2462006-09-20 21:16:16 +00001# Copyright (c) 2006, Google Inc.
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met:
7#
8# * Redistributions of source code must retain the above copyright
9# notice, this list of conditions and the following disclaimer.
10# * Redistributions in binary form must reproduce the above
11# copyright notice, this list of conditions and the following disclaimer
12# in the documentation and/or other materials provided with the
13# distribution.
14# * Neither the name of Google Inc. nor the names of its
15# contributors may be used to endorse or promote products derived from
16# this software without specific prior written permission.
17#
18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mmentovai425d2562006-08-30 20:05:05 +000029
30
brynercb91a2f2006-08-25 21:14:45 +000031AC_PREREQ(2.57)
32
thestig@chromium.org43e6db72010-11-08 19:49:41 +000033AC_INIT(breakpad, 0.1, google-breakpad-dev@googlegroups.com)
mmentovai425d2562006-08-30 20:05:05 +000034dnl Sanity check: the argument is just a file that should exist.
brynercb91a2f2006-08-25 21:14:45 +000035AC_CONFIG_SRCDIR(README)
mmentovai425d2562006-08-30 20:05:05 +000036AC_CONFIG_AUX_DIR(autotools)
ted.mielczarek53a8b1a2010-08-31 15:09:01 +000037AC_CONFIG_MACRO_DIR([m4])
38AC_CANONICAL_HOST
mmentovai425d2562006-08-30 20:05:05 +000039
jimblandy71f75802010-02-11 19:31:48 +000040AM_INIT_AUTOMAKE(subdir-objects tar-ustar 1.11.1)
brynercb91a2f2006-08-25 21:14:45 +000041AM_CONFIG_HEADER(src/config.h)
42
brynercb91a2f2006-08-25 21:14:45 +000043AC_PROG_CC
ted.mielczarekd192a712010-10-05 19:38:51 +000044AM_PROG_CC_C_O
brynercb91a2f2006-08-25 21:14:45 +000045AC_PROG_CPP
46AC_PROG_CXX
ted.mielczarekd192a712010-10-05 19:38:51 +000047AC_PROG_RANLIB
brynercb91a2f2006-08-25 21:14:45 +000048
brynercb91a2f2006-08-25 21:14:45 +000049AC_HEADER_STDC
nealsidde545c02010-03-02 00:39:48 +000050m4_include(m4/ax_pthread.m4)
51AX_PTHREAD
ted.mielczarekdbf409c2011-02-28 14:05:22 +000052AC_CHECK_HEADERS([a.out.h])
nealsidde545c02010-03-02 00:39:48 +000053
ted.mielczarek53a8b1a2010-08-31 15:09:01 +000054# Only build Linux client libs when compiling for Linux
55case $host in
ted.mielczarekcfc86282010-10-20 15:51:38 +000056 *-*-linux* | *-android* )
ted.mielczarek53a8b1a2010-08-31 15:09:01 +000057 LINUX_HOST=true
58 ;;
59esac
60AM_CONDITIONAL(LINUX_HOST, test x$LINUX_HOST = xtrue)
61
nealsidde545c02010-03-02 00:39:48 +000062AC_ARG_ENABLE(m32,
63 AS_HELP_STRING([--enable-m32],
64 [Compile/build with -m32]
65 [(default is no)]),
66 [case "${enableval}" in
67 yes)
thestig@chromium.orgc40bcc72010-09-16 23:29:13 +000068 CFLAGS="${CFLAGS} -m32"
69 CXXFLAGS="${CXXFLAGS} -m32"
nealsidde545c02010-03-02 00:39:48 +000070 usem32=true
71 ;;
72 no)
73 usem32=false
74 ;;
75 *)
76 AC_MSG_ERROR(bad value ${enableval} for --enable-m32)
77 ;;
78 esac],
79 [usem32=false])
brynercb91a2f2006-08-25 21:14:45 +000080
ted.mielczareke574a2a2010-10-05 19:38:22 +000081AC_ARG_ENABLE(processor,
82 AS_HELP_STRING([--disable-processor],
83 [Don't build processor library]
84 [(default is no)]),
85 [case "${enableval}" in
86 yes)
87 disable_processor=false
88 ;;
89 no)
90 disable_processor=true
91 ;;
92 *)
93 AC_MSG_ERROR(bad value ${enableval} for --disable-processor)
94 ;;
95 esac],
96 [disable_processor=false])
97AM_CONDITIONAL(DISABLE_PROCESSOR, test x$disable_processor = xtrue)
98
ted.mielczarekdbf409c2011-02-28 14:05:22 +000099AC_ARG_ENABLE(tools,
100 AS_HELP_STRING([--disable-tools],
101 [Don't build tool binaries]
102 [(default is no)]),
103 [case "${enableval}" in
104 yes)
105 disable_tools=false
106 ;;
107 no)
108 disable_tools=true
109 ;;
110 *)
111 AC_MSG_ERROR(bad value ${enableval} for --disable-tools)
112 ;;
113 esac],
114 [disable_tools=false])
115AM_CONDITIONAL(DISABLE_TOOLS, test x$disable_tools = xtrue)
116
117if test x$LINUX_HOST = xfalse -a x$disable_processor = xtrue -a x$disable_tools = xtrue; then
118 AC_MSG_ERROR([--disable-processor and --disable-tools were specified, and not building for Linux. Nothing to build!])
ted.mielczareke574a2a2010-10-05 19:38:22 +0000119fi
120
mmentovai0dbedc92006-09-25 21:16:15 +0000121AC_ARG_ENABLE(selftest,
122 AS_HELP_STRING([--enable-selftest],
123 [Run extra tests with "make check" ]
124 [(may conflict with optimizations) ]
125 [(default is no)]),
126 [case "${enableval}" in
127 yes)
128 selftest=true
129 ;;
130 no)
131 selftest=false
132 ;;
133 *)
134 AC_MSG_ERROR(bad value ${enableval} for --enable-selftest)
135 ;;
136 esac],
137 [selftest=false])
138AM_CONDITIONAL(SELFTEST, test x$selftest = xtrue)
139
brynercb91a2f2006-08-25 21:14:45 +0000140AC_CONFIG_FILES([Makefile])
141AC_OUTPUT