michael@0: # Copyright (c) 2006, Google Inc. michael@0: # All rights reserved. michael@0: # michael@0: # Redistribution and use in source and binary forms, with or without michael@0: # modification, are permitted provided that the following conditions are michael@0: # met: michael@0: # michael@0: # * Redistributions of source code must retain the above copyright michael@0: # notice, this list of conditions and the following disclaimer. michael@0: # * Redistributions in binary form must reproduce the above michael@0: # copyright notice, this list of conditions and the following disclaimer michael@0: # in the documentation and/or other materials provided with the michael@0: # distribution. michael@0: # * Neither the name of Google Inc. nor the names of its michael@0: # contributors may be used to endorse or promote products derived from michael@0: # this software without specific prior written permission. michael@0: # michael@0: # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS michael@0: # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT michael@0: # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR michael@0: # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT michael@0: # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@0: # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@0: # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, michael@0: # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY michael@0: # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT michael@0: # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE michael@0: # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. michael@0: michael@0: michael@0: AC_PREREQ(2.57) michael@0: michael@0: AC_INIT(breakpad, 0.1, google-breakpad-dev@googlegroups.com) michael@0: dnl Sanity check: the argument is just a file that should exist. michael@0: AC_CONFIG_SRCDIR(README) michael@0: AC_CONFIG_AUX_DIR(autotools) michael@0: AC_CONFIG_MACRO_DIR([m4]) michael@0: AC_CANONICAL_HOST michael@0: michael@0: AM_INIT_AUTOMAKE(subdir-objects tar-ustar 1.11.1) michael@0: AM_CONFIG_HEADER(src/config.h) michael@0: michael@0: AM_PROG_AS michael@0: AC_PROG_CC michael@0: AM_PROG_CC_C_O michael@0: AC_PROG_CPP michael@0: AC_PROG_CXX michael@0: AC_PROG_RANLIB michael@0: AM_CONDITIONAL(GCC, test "$GCC" = yes) # let the Makefile know if we're gcc michael@0: michael@0: AC_HEADER_STDC michael@0: m4_include(m4/ax_pthread.m4) michael@0: AX_PTHREAD michael@0: AC_CHECK_HEADERS([a.out.h]) michael@0: michael@0: # Only build Linux client libs when compiling for Linux michael@0: case $host in michael@0: *-*-linux* | *-android* ) michael@0: LINUX_HOST=true michael@0: ;; michael@0: esac michael@0: AM_CONDITIONAL(LINUX_HOST, test x$LINUX_HOST = xtrue) michael@0: michael@0: # Only use Android support headers when compiling for Android michael@0: case $host in michael@0: *-android*) michael@0: ANDROID_HOST=true michael@0: ;; michael@0: esac michael@0: AM_CONDITIONAL(ANDROID_HOST, test x$ANDROID_HOST = xtrue) michael@0: michael@0: AC_ARG_ENABLE(m32, michael@0: AS_HELP_STRING([--enable-m32], michael@0: [Compile/build with -m32] michael@0: [(default is no)]), michael@0: [case "${enableval}" in michael@0: yes) michael@0: CFLAGS="${CFLAGS} -m32" michael@0: CXXFLAGS="${CXXFLAGS} -m32" michael@0: usem32=true michael@0: ;; michael@0: no) michael@0: usem32=false michael@0: ;; michael@0: *) michael@0: AC_MSG_ERROR(bad value ${enableval} for --enable-m32) michael@0: ;; michael@0: esac], michael@0: [usem32=false]) michael@0: michael@0: AC_ARG_ENABLE(processor, michael@0: AS_HELP_STRING([--disable-processor], michael@0: [Don't build processor library] michael@0: [(default is no)]), michael@0: [case "${enableval}" in michael@0: yes) michael@0: disable_processor=false michael@0: ;; michael@0: no) michael@0: disable_processor=true michael@0: ;; michael@0: *) michael@0: AC_MSG_ERROR(bad value ${enableval} for --disable-processor) michael@0: ;; michael@0: esac], michael@0: [disable_processor=false]) michael@0: AM_CONDITIONAL(DISABLE_PROCESSOR, test x$disable_processor = xtrue) michael@0: michael@0: AC_ARG_ENABLE(tools, michael@0: AS_HELP_STRING([--disable-tools], michael@0: [Don't build tool binaries] michael@0: [(default is no)]), michael@0: [case "${enableval}" in michael@0: yes) michael@0: disable_tools=false michael@0: ;; michael@0: no) michael@0: disable_tools=true michael@0: ;; michael@0: *) michael@0: AC_MSG_ERROR(bad value ${enableval} for --disable-tools) michael@0: ;; michael@0: esac], michael@0: [disable_tools=false]) michael@0: AM_CONDITIONAL(DISABLE_TOOLS, test x$disable_tools = xtrue) michael@0: michael@0: if test x$LINUX_HOST = xfalse -a x$disable_processor = xtrue -a x$disable_tools = xtrue; then michael@0: AC_MSG_ERROR([--disable-processor and --disable-tools were specified, and not building for Linux. Nothing to build!]) michael@0: fi michael@0: michael@0: AC_ARG_ENABLE(selftest, michael@0: AS_HELP_STRING([--enable-selftest], michael@0: [Run extra tests with "make check" ] michael@0: [(may conflict with optimizations) ] michael@0: [(default is no)]), michael@0: [case "${enableval}" in michael@0: yes) michael@0: selftest=true michael@0: ;; michael@0: no) michael@0: selftest=false michael@0: ;; michael@0: *) michael@0: AC_MSG_ERROR(bad value ${enableval} for --enable-selftest) michael@0: ;; michael@0: esac], michael@0: [selftest=false]) michael@0: AM_CONDITIONAL(SELFTEST, test x$selftest = xtrue) michael@0: michael@0: AC_CONFIG_FILES([Makefile]) michael@0: AC_OUTPUT