geany/m4/geany-mac-integration.m4
Jiří Techet db4bf54b2f Compile prefix.c and osx.c only when needed to avoid warnings
When mac integration or binary relocation are disabled, the compiled
object file contains no symbols because the guards in the source files
hide all code. On OS X there's a warning during compilation saying:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
file: .libs/libgeany.a(libgeany_la-prefix.o) has no symbols

If these features are disabled, don't compile the corresponding
sources to avoid the warnings.

Interestingly, waf compilation works without warnings - it appears
linking is done through g++ which doesn't produce these warnings.
2015-04-14 22:21:34 +02:00

20 lines
711 B
Plaintext

dnl GEANY_CHECK_MAC_INTEGRATION
dnl Check for gtk-mac-integration to enable improved OS X integration
dnl
AC_DEFUN([GEANY_CHECK_MAC_INTEGRATION],
[
AC_ARG_ENABLE([mac-integration],
[AS_HELP_STRING([--enable-mac-integration],
[use gtk-mac-integration to enable improved OS X integration [default=no]])],
[geany_enable_mac_integration="$enableval"],
[geany_enable_mac_integration="no"])
AM_CONDITIONAL(ENABLE_MAC_INTEGRATION, [test "x$geany_enable_mac_integration" = "xyes"])
AM_COND_IF(ENABLE_MAC_INTEGRATION,
[
AS_IF([test "x$enable_gtk3" = xyes],
[PKG_CHECK_MODULES(MAC_INTEGRATION, gtk-mac-integration-gtk3)],
[PKG_CHECK_MODULES(MAC_INTEGRATION, gtk-mac-integration-gtk2)])
])
])