Branch: refs/heads/master Author: Frank Lanitz frank@frank.uvena.de Committer: Frank Lanitz frank@frank.uvena.de Date: Mon, 13 Oct 2014 16:09:50 UTC Commit: c5ebab2d9affca66514276591f1c71444bdd6736 https://github.com/geany/geany-plugins/commit/c5ebab2d9affca66514276591f1c71...
Log Message: ----------- Merge pull request #159 from b4n/autotools-various
Two Autotools improvements
Modified Paths: -------------- build/ldflags.m4 build/vars.build.mk configure.ac
Modified: build/ldflags.m4 40 lines changed, 40 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,40 @@ +dnl GP_CHECK_LDFLAG(FLAG, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) +dnl Checks whether the linker understands FLAG +AC_DEFUN([GP_CHECK_LDFLAG], +[ + gp_check_ldflag_LDFLAGS="$LDFLAGS" + LDFLAGS="$1" + AC_MSG_CHECKING([whether the linker understands $LDFLAGS]) + AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) {return 0;}])], + [AC_MSG_RESULT([yes]) + $2], + [AC_MSG_RESULT([no]) + $3]) + AC_LANG_POP(C) + LDFLAGS="$gp_check_ldflag_LDFLAGS" +]) + +dnl GP_CHECK_LDFLAGS +dnl Checks for default Geany-Plugins LDFLAGS and defines GP_LDFLAGS +AC_DEFUN([GP_CHECK_LDFLAGS], +[ + AC_ARG_ENABLE([extra-ld-flags], + AS_HELP_STRING([--disable-extra-ld-flags], + [Disable extra linker flags]), + [enable_extra_ld_flags=$enableval], + [enable_extra_ld_flags=yes]) + + GP_LDFLAGS= + AS_IF([test "x$enable_extra_ld_flags" != xno], + [ + enable_extra_ld_flags=yes + for flag in -Wl,-z,defs # do not allow undefined symbols in object files + do + GP_CHECK_LDFLAG([$flag], [GP_LDFLAGS="${GP_LDFLAGS} $flag"]) + done + ]) + AC_SUBST([GP_LDFLAGS]) + GP_STATUS_BUILD_FEATURE_ADD([Extra linker options], + [$enable_extra_c_warnings]) +])
Modified: build/vars.build.mk 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -9,7 +9,7 @@ AM_CFLAGS = \ $(GEANY_CFLAGS) \ $(GP_CFLAGS)
-AM_LDFLAGS = -module -avoid-version +AM_LDFLAGS = -module -avoid-version $(GP_LDFLAGS)
COMMONLIBS = \ $(GEANY_LIBS) \
Modified: configure.ac 3 lines changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -1,7 +1,7 @@ AC_PREREQ([2.61]) dnl Don't forget when updating version number to do GP_CHECK_GEANY also AC_INIT([geany-plugins], [1.25]) -AM_INIT_AUTOMAKE([1.8 foreign dist-bzip2 tar-ustar]) +AM_INIT_AUTOMAKE([1.8 foreign dist-bzip2 tar-ustar subdir-objects])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
@@ -23,6 +23,7 @@ GP_CHECK_UNITTESTS(0.9.4) GP_CHECK_GTK_VERSION GP_CHECK_CPPCHECK GP_CHECK_CFLAGS +GP_CHECK_LDFLAGS
dnl plugin checks GP_CHECK_ADDONS
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org