summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-06-28 02:57:42 +0300
committerAndrei Karas <akaras@inbox.ru>2011-06-28 02:57:42 +0300
commit72c39aee65ed88c81343c80bd5cbfbf1f4611218 (patch)
treed622458a039ff6644922d55c793bfd3d2c7676b9 /configure.ac
parentf902b4a3c13d1502bec17754f15fce03a21c5aaa (diff)
downloadmv-72c39aee65ed88c81343c80bd5cbfbf1f4611218.tar.gz
mv-72c39aee65ed88c81343c80bd5cbfbf1f4611218.tar.bz2
mv-72c39aee65ed88c81343c80bd5cbfbf1f4611218.tar.xz
mv-72c39aee65ed88c81343c80bd5cbfbf1f4611218.zip
More fixes for compilation under MacOS.
Add sample make script for fink. Possible broke support for dmg images.
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac28
1 files changed, 23 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index d28cd5202..9526cf5b8 100755
--- a/configure.ac
+++ b/configure.ac
@@ -109,15 +109,31 @@ fi
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h])
+# Enable mac build
+AC_ARG_ENABLE(applebuild,
+[ --enable-applebuild Turn on apple building],
+[case "${enableval}" in
+ yes) applebuild_enabled=true
+ ;;
+ no) applebuild_enabled=false
+ ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-applebuild) ;;
+esac],[applebuild_enabled=false])
+
+
# Option to enable OpenGL
AC_ARG_WITH(opengl,[ --without-opengl don't use OpenGL ] )
if test "x$with_opengl" == "xno"; then
with_opengl=no
else
with_opengl=yes
- AC_CHECK_LIB([GL], [glBegin], ,
- AC_MSG_ERROR([ *** Unable to find OpenGL library]))
- AC_DEFINE(USE_OPENGL, 1, [Defines if ManaPlus should have OpenGL support])
+ if test "x$applebuild_enabled" == "xfalse"; then
+ AC_CHECK_LIB([GL], [glBegin], ,
+ AC_MSG_ERROR([ *** Unable to find OpenGL library]))
+ AC_DEFINE(USE_OPENGL, 1, [Defines if ManaPlus should have OpenGL support])
+ else
+ LDFLAGS="$LDFLAGS -framework OpenGL"
+ fi
fi
# Option to enable internal guichan
@@ -153,8 +169,10 @@ AC_ARG_WITH(librt,[ --without-librt don't link to librt ] )
if test "x$with_librt" == "xno"; then
without_librt=yes
else
- AC_CHECK_LIB(rt, shm_open, ,
- AC_MSG_ERROR([ *** Unable to find librt library]))
+ if test "x$applebuild_enabled" == "xfalse"; then
+ AC_CHECK_LIB(rt, shm_open, ,
+ AC_MSG_ERROR([ *** Unable to find librt library]))
+ fi
without_librt=no
fi