| # |
| # Copyright 2007 Sony Corp. |
| # |
| # This program is free software; you can redistribute it and/or modify |
| # it under the terms of the GNU General Public License as published by |
| # the Free Software Foundation; version 2 of the License. |
| # |
| # This program is distributed in the hope that it will be useful, |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| # GNU General Public License for more details. |
| # |
| # You should have received a copy of the GNU General Public License |
| # along with this program; if not, write to the Free Software |
| # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| # |
| |
| AC_INIT([ps3-utils], [@version@], [Geoff Levand <geoff@infradead.org>]) |
| |
| AC_CONFIG_MACRO_DIR([m4]) |
| |
| AC_PREFIX_DEFAULT([/usr/local]) |
| |
| AS_IF([test "x$CFLAGS" = "x"], [AC_SUBST([CFLAGS], [""])]) |
| |
| AC_PROG_CC |
| AC_PROG_INSTALL |
| AC_PROG_LIBTOOL |
| |
| AM_INIT_AUTOMAKE |
| LT_INIT |
| |
| default_cflags="--std=gnu99 -g \ |
| -Wall -W -Wunused -Wstrict-prototypes -Wmissing-prototypes \ |
| -Wmissing-declarations -Wredundant-decls" |
| |
| AC_ARG_ENABLE( |
| [werror], |
| [AS_HELP_STRING([--enable-werror], |
| [build programs with -Werror] |
| )], |
| [default_cflags="$default_cflags -Werror"] |
| ) |
| |
| AC_ARG_ENABLE( |
| [debug], |
| [AS_HELP_STRING([--enable-debug], |
| [build programs with extra debug info [default=no]] |
| )], |
| [], |
| [enable_debug=check] |
| ) |
| |
| AS_IF( |
| [test "x$enable_debug" = "xyes"], |
| [AC_SUBST([DEFAULT_CFLAGS], ["$default_cflags -O0 -DDEBUG"])], |
| [AC_SUBST([DEFAULT_CFLAGS], ["$default_cflags -O2 -DNDEBUG"])] |
| ) |
| |
| AC_SUBST([LIBTOOL_DEPS]) |
| AC_SUBST([DESTDIR]) |
| |
| AC_CONFIG_HEADERS([config.h]) |
| AC_CONFIG_FILES([Makefile]) |
| AC_CONFIG_SUBDIRS([lib]) |
| |
| AC_OUTPUT |