diff options
author | Yann Leboulanger <asterix@lagaule.org> | 2007-11-14 22:47:52 +0300 |
---|---|---|
committer | Yann Leboulanger <asterix@lagaule.org> | 2007-11-14 22:47:52 +0300 |
commit | 1f7a462788b27a83ea7e0660273e6864ed71e17f (patch) | |
tree | 2e7a2846876588d3a8f5cf9302e982fc38530b74 /configure.ac | |
parent | 819b3c733520c23127d00c47ea932c3d2271191a (diff) |
[James Newton] osx port for Gajim. a GREAT thanks!!!
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index f859ad970..0087842f7 100644 --- a/configure.ac +++ b/configure.ac @@ -6,6 +6,9 @@ AC_CONFIG_HEADER(config.h) AC_CONFIG_MACRO_DIR([m4]) AM_MAINTAINER_MODE +dnl Make Objective-C work with automake +AM_CONDITIONAL([am__fastdepOBJC], false) + IT_PROG_INTLTOOL([0.35.0]) PKG_PROG_PKG_CONFIG([0.19]) @@ -128,6 +131,75 @@ AC_ARG_ENABLE(trayicon, test "x$enable_trayicon" = "xyes" && have_trayicon=true || have_trayicon=false AM_CONDITIONAL(BUILD_TRAYICON, $have_trayicon) +dnl **** +dnl Cocoa +dnl **** +AC_ARG_ENABLE([cocoa], + [ --disable-cocoa build cocoa integration [default auto]], + enable_cocoa=$enableval, enable_cocoa=yes) + +if test "x$enable_cocoa" = "xyes";then + dnl There is no pkgconfig for cocoa; lets do a header check + temp_save_cflags="$CFLAGS" + CFLAGS="$CFLAGS -ObjC" + AC_CHECK_HEADER(Cocoa/Cocoa.h, [have_cocoa=true], [have_cocoa=false]) + AC_CHECK_HEADER(AppKit/AppKit.h, [have_appkit=true], [have_appkit=false]) + CFLAGS="$temp_save_cflags" + + if test "x$have_cocoa" = "xtrue";then + COCOA_LIBS="$COCOA_LIBS -Xlinker -framework -Xlinker Cocoa" + fi + if test "x$have_appkit" = "xtrue";then + COCOA_LIBS="$COCOA_LIBS -Xlinker -framework -Xlinker AppKit" + fi + if test "x$COCOA_LIBS" != "x";then + AC_SUBST(COCOA_LIBS) + true + fi +fi +AM_CONDITIONAL(BUILD_COCOA, $have_cocoa) + +dnl **** +dnl Carbon +dnl **** +AC_ARG_ENABLE([carbon], + [ --disable-carbon build with carbon [default auto]], + enable_carbon=$enableval, enable_carbon=yes) + +if test "x$enable_carbon" = "xyes";then + dnl There is no pkgconfig for carbon; lets do a header check + AC_CHECK_HEADER(Carbon/Carbon.h, [have_carbon=true], [have_carbon=false]) + AC_CHECK_HEADER(IOKit/IOKitLib.h, [have_iokit=true], [have_iokit=false]) + + if test "x$have_carbon" = "xtrue";then + CARBON_LIBS="$CARBON_LIBS -Xlinker -framework -Xlinker Carbon" + fi + if test "x$have_iokit" = "xtrue";then + CARBON_LIBS="$CARBON_LIBS -Xlinker -framework -Xlinker IOKit" + fi + if test "x$CARBON_LIBS" != "x";then + AC_SUBST(CARBON_LIBS) + have_idle_osx=true + dnl Disable X11 idle + have_idle=false + AM_CONDITIONAL(BUILD_IDLE, false) + dnl Disable custom trayicon + have_trayicon=gtk+ + AM_CONDITIONAL(BUILD_TRAYICON, false) + dnl Hack to work around failure in gettext package detection on OS/X + if test "x$GMSGFMT" = "x";then + AC_SUBST(GMSGFMT, msgfmt) + AC_SUBST(MSGFMT, msgfmt) + AC_SUBST(XGETTEXT, xgettext) + fi + else + have_carbon=false + have_idle_osx=false + fi +fi +AM_CONDITIONAL(BUILD_IDLE_OSX, $have_carbon) +AM_CONDITIONAL(BUILD_CARBON, $have_carbon) + ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}" AC_SUBST(ACLOCAL_AMFLAGS) @@ -159,6 +231,9 @@ AC_CONFIG_FILES([ data/defs.py src/Makefile src/common/Makefile + src/osx/Makefile + src/osx/growl/Makefile + src/osx/syncmenu/Makefile scripts/gajim scripts/gajim-remote po/Makefile.in @@ -171,4 +246,6 @@ echo " idle module ...... ${have_idle} remote control ... ${have_remote} trayicon ......... ${have_trayicon} + idle module OSX .. ${have_idle_osx} + cocoa ............ ${have_cocoa} *****************************" |