diff options
Diffstat (limited to 'lib/configure.ac')
-rw-r--r-- | lib/configure.ac | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/lib/configure.ac b/lib/configure.ac new file mode 100644 index 0000000..e332c57 --- /dev/null +++ b/lib/configure.ac @@ -0,0 +1,68 @@ +# +# Copyright 2007 Sony Corp. +# + +AC_INIT([libps3-utils], + [m4_esyscmd_s([./version.sh])], + [Geoff Levand <geoff@infradead.org>]) + +AC_CONFIG_MACRO_DIRS([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_CHECK_HEADERS([asm/ps3av.h]) +AC_CHECK_DECLS([PS3AV_MODE_MASK, \ + PS3AV_MODE_RGB, \ + PS3AV_MODE_FULL, \ + PS3AV_MODE_WHITE, \ + PS3AV_MODE_COLOR, \ + PS3AV_MODE_DITHER, \ + PS3AV_MODE_HDCP_OFF], + [], + [], + [#include <asm/ps3av.h>] +) + +AC_SUBST([LIBTOOL_DEPS]) +AC_SUBST([DESTDIR]) + +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_FILES([Makefile]) + +AC_OUTPUT |