Permalink
Browse files

Autoconf fixes for Mac

  • Loading branch information...
paulcbetts committed Feb 28, 2010
1 parent cbaec8c commit 3aa624518a30ad1af7c65c57c016c8dec7c95c76
Showing with 65 additions and 31 deletions.
  1. +10 −0 autogen_mac.sh
  2. +55 −0 configure.ac
  3. +0 −31 configure.in
View
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig"
+
+/opt/local/bin/aclocal -I /opt/local/share/aclocal
+/opt/local/bin/glibtoolize --force --copy
+/opt/local/bin/automake --add-missing --gnu --include-deps
+/opt/local/bin/autoconf
+/opt/local/bin/autoheader
+./configure --enable-maintainer-mode $*
View
@@ -0,0 +1,55 @@
+AC_PREREQ(2.51)
+
+AC_INIT(README)
+AC_CANONICAL_HOST
+AM_INIT_AUTOMAKE(vcachefs, 0.1)
+
+AM_PROG_LIBTOOL
+
+AC_ISC_POSIX
+AC_PROG_CC
+AC_C_INLINE
+AC_STDC_HEADERS
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+
+AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")
+AC_CONFIG_SRCDIR(src)
+AC_CONFIG_HEADERS(config.h)
+
+AM_MAINTAINER_MODE
+
+dnl -------------- Add the debug flag ----------------------
+AC_ARG_ENABLE([debug],
+ AC_HELP_STRING([--enable-debug], [Enable Debug Mode (default disabled)]),
+ enable_debug=$enableval,
+ enable_debug=no)
+ENABLE_DEBUG=$enable_debug
+if test "x$enable_debug" = "xno"; then
+ DEBUG_CFLAGS=""
+else
+ DEBUG_CFLAGS="-Wall -g"
+fi
+AC_SUBST(DEBUG_CFLAGS)
+AC_SUBST(ENABLE_DEBUG)
+
+dnl pkg-config
+AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+if test "x$PKG_CONFIG" = "xno"; then
+ AC_MSG_ERROR([You need to install pkg-config])
+fi
+
+GLIB_REQUIRED=2.9.0
+
+PKG_CHECK_MODULES(VCACHEFS, glib-2.0 >= $GLIB_REQUIRED
+ fuse )
+
+AC_SUBST(VCACHEFS_CFLAGS)
+AC_SUBST(VCACHEFS_LIBS)
+
+AC_OUTPUT([
+Makefile
+src/Makefile
+])
+
View
@@ -1,31 +0,0 @@
-AC_INIT(README)
-AC_PREREQ(2.59)
-AC_CONFIG_MACRO_DIR([m4])
-
-AC_CANONICAL_HOST
-
-AC_CONFIG_SRCDIR(src)
-AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(vcachefs, 0.1)
-
-AM_MAINTAINER_MODE
-
-AC_ISC_POSIX
-AC_PROG_CC
-AC_HEADER_STDC
-
-AM_PROG_LIBTOOL
-
-GLIB_REQUIRED=2.9.0
-
-PKG_CHECK_MODULES(VCACHEFS,
- glib-2.0 >= $GLIB_REQUIRED
- fuse )
-AC_SUBST(VCACHEFS_CFLAGS)
-AC_SUBST(VCACHEFS_LIBS)
-
-AC_OUTPUT([
-Makefile
-src/Makefile
-])
-

0 comments on commit 3aa6245

Please sign in to comment.