[geany/geany-plugins] c47162: Merge pull request #374 from eht16/extend_mingw_support

Frank Lanitz git-noreply at xxxxx
Sat Feb 27 12:44:21 UTC 2016


Branch:      refs/heads/master
Author:      Frank Lanitz <frank at frank.uvena.de>
Committer:   Frank Lanitz <frank at frank.uvena.de>
Date:        Sat, 27 Feb 2016 12:44:21 UTC
Commit:      c47162627cee5c84d0e8863caae703bd09867a6d
             https://github.com/geany/geany-plugins/commit/c47162627cee5c84d0e8863caae703bd09867a6d

Log Message:
-----------
Merge pull request #374 from eht16/extend_mingw_support

Extend mingw support


Modified Paths:
--------------
    build/common.m4
    build/vars.build.mk
    configure.ac

Modified: build/common.m4
17 lines changed, 17 insertions(+), 0 deletions(-)
===================================================================
@@ -64,3 +64,20 @@ AC_DEFUN([GP_COMMIT_PLUGIN_STATUS],
                    test "$m4_tolower(AS_TR_SH(enable_$1))" = yes)
     GP_STATUS_PLUGIN_ADD([$1], [$m4_tolower(AS_TR_SH(enable_$1))])
 ])
+
+dnl GEANY_CHECK_MINGW
+dnl Checks whether we're building for MinGW, and defines appropriate stuff
+dnl if it is the case.
+dnl Most importantly, AM_CODITIONALs MINGW
+AC_DEFUN([GP_CHECK_MINGW],
+[
+	case "${host}" in
+		*mingw*)
+			AC_DEFINE([WIN32], [1], [we are cross compiling for WIN32])
+			AM_CONDITIONAL([MINGW], true)
+			;;
+		*)
+			AM_CONDITIONAL([MINGW], false)
+			;;
+	esac
+])


Modified: build/vars.build.mk
19 lines changed, 17 insertions(+), 2 deletions(-)
===================================================================
@@ -1,13 +1,28 @@
-AM_CFLAGS = \
+if MINGW
+LOCAL_AM_CFLAGS = \
+	-DLOCALEDIR=\""share/locale"\" \
+	-DPREFIX=\"\" \
+	-DDOCDIR=\"\" \
+	-DGEANYPLUGINS_DATADIR=\"share\" \
+	-DPKGDATADIR=\""share/geany-plugins"\" \
+	-DLIBDIR=\""lib"\" \
+	-DPKGLIBDIR=\"\"
+else
+LOCAL_AM_CFLAGS = \
 	-DLOCALEDIR=\""$(LOCALEDIR)"\" \
 	-DPREFIX=\""$(prefix)"\" \
 	-DDOCDIR=\""$(docdir)"\" \
 	-DGEANYPLUGINS_DATADIR=\""$(datadir)"\" \
 	-DPKGDATADIR=\""$(pkgdatadir)"\" \
 	-DLIBDIR=\""$(libdir)"\" \
-	-DPKGLIBDIR=\""$(pkglibdir)"\" \
+	-DPKGLIBDIR=\""$(pkglibdir)"\"
+endif
+
+AM_CFLAGS = \
+	${LOCAL_AM_CFLAGS} \
 	$(GEANY_CFLAGS) \
 	$(GP_CFLAGS)
+	
 
 AM_LDFLAGS = -module -avoid-version -no-undefined $(GP_LDFLAGS)
 


Modified: configure.ac
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -26,6 +26,7 @@ GP_CHECK_GTK_VERSION
 GP_CHECK_CPPCHECK
 GP_CHECK_CFLAGS
 GP_CHECK_LDFLAGS
+GP_CHECK_MINGW
 
 dnl plugin checks
 GP_CHECK_ADDONS



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list