Reexport allegro_main on OS X.

This commit is contained in:
Jonathan Schleifer 2012-08-26 14:34:16 +02:00
parent 0ba7bef243
commit b88e005477
3 changed files with 12 additions and 1 deletions

View file

@ -1,6 +1,8 @@
AC_INIT(ObjGameKit, 0.1, js@webkeks.org)
AC_CONFIG_SRCDIR(src)
AC_CANONICAL_HOST
AC_CHECK_TOOL(OBJFW_CONFIG, objfw-config)
AS_IF([test x"$OBJFW_CONFIG" = x""], [
AC_MSG_ERROR(You need ObjFW and objfw-config installed!)
@ -44,6 +46,12 @@ PKG_CHECK_MODULES(allegro5, [allegro-5.0 allegro_main-5.0 allegro_image-5.0], [
AC_MSG_ERROR(You need allegro{_main,_image}-5.0 installed!)
])
case "$host_os" in
darwin*)
AC_SUBST(REEXPORT_ALLEGRO, ["-Wl,-reexport-lallegro_main"])
;;
esac
# We add -Werror after all tests in case some tests emit warnings
OBJCFLAGS="$OBJCFLAGS -Werror"
@ -57,5 +65,5 @@ AC_SUBST(CPP)
AC_SUBST(CPPFLAGS)
AC_SUBST(PACKAGE, ObjGameKit)
AC_CONFIG_FILES(buildsys.mk)
AC_CONFIG_FILES([buildsys.mk extra.mk])
AC_OUTPUT

1
extra.mk.in Normal file
View file

@ -0,0 +1 @@
REEXPORT_ALLEGRO = @REEXPORT_ALLEGRO@

View file

@ -11,6 +11,8 @@ INCLUDES = ${SRCS:.m=.h} \
ObjGameKit.h
include ../buildsys.mk
include ../extra.mk
CPPFLAGS += -DOGK_INTERNAL
LD = ${OBJC}
LDFLAGS += ${REEXPORT_ALLEGRO}