Revision: 754 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=754&view=rev Author: hyperair Date: 2009-06-19 21:20:57 +0000 (Fri, 19 Jun 2009)
Log Message: ----------- Add geanylua to the common build system
Modified Paths: -------------- trunk/geany-plugins/Makefile.am trunk/geany-plugins/configure.ac trunk/geany-plugins/geanylua/Makefile.am
Added Paths: ----------- trunk/geany-plugins/build/geanylua.m4 trunk/geany-plugins/geanylua/oldbuildsys/ trunk/geany-plugins/geanylua/oldbuildsys/Makefile.am trunk/geany-plugins/geanylua/oldbuildsys/configure.in
Removed Paths: ------------- trunk/geany-plugins/geanylua/configure.in
Modified: trunk/geany-plugins/Makefile.am =================================================================== --- trunk/geany-plugins/Makefile.am 2009-06-19 16:16:33 UTC (rev 753) +++ trunk/geany-plugins/Makefile.am 2009-06-19 21:20:57 UTC (rev 754) @@ -1,4 +1,12 @@ -plugins = addons geanygdb geanylatex geanylipsum geanysendmail shiftcolumn spellcheck +plugins = \ + addons \ + geanygdb \ + geanylatex \ + geanylipsum \ + geanylua \ + geanysendmail \ + shiftcolumn \ + spellcheck
ACLOCAL_AMFLAGS = -I build/cache -I build --install
Added: trunk/geany-plugins/build/geanylua.m4 =================================================================== --- trunk/geany-plugins/build/geanylua.m4 (rev 0) +++ trunk/geany-plugins/build/geanylua.m4 2009-06-19 21:20:57 UTC (rev 754) @@ -0,0 +1,19 @@ +AC_DEFUN([GP_CHECK_GEANYLUA], +[ + AC_ARG_WITH([lua-pkg], + AC_HELP_STRING([--with-lua-pkg=ARG], + [name of Lua pkg-config script [[default=lua5.1]]]), + [LUA_PKG_NAME=${withval%.pc}], + [LUA_PKG_NAME=lua5.1 + + for L in lua5.1 lua51 lua-5.1 lua; do + PKG_CHECK_EXISTS([$L], + [LUA_PKG_NAME=$L],[]) + done]) + + PKG_CHECK_MODULES(LUA, [${LUA_PKG_NAME} >= 5.1]) + + AC_CONFIG_FILES([ + geanylua/Makefile + ]) +])
Modified: trunk/geany-plugins/configure.ac =================================================================== --- trunk/geany-plugins/configure.ac 2009-06-19 16:16:33 UTC (rev 753) +++ trunk/geany-plugins/configure.ac 2009-06-19 21:20:57 UTC (rev 754) @@ -36,6 +36,7 @@ GP_CHECK_GEANYGDB GP_CHECK_GEANYLATEX GP_CHECK_GEANYLIPSUM +GP_CHECK_GEANYLUA GP_CHECK_GEANYSENDMAIL GP_CHECK_SHIFTCOLUMN GP_CHECK_SPELLCHECK
Modified: trunk/geany-plugins/geanylua/Makefile.am =================================================================== --- trunk/geany-plugins/geanylua/Makefile.am 2009-06-19 16:16:33 UTC (rev 753) +++ trunk/geany-plugins/geanylua/Makefile.am 2009-06-19 21:20:57 UTC (rev 754) @@ -1,187 +1,34 @@ +include $(top_srcdir)/build/vars.docs.mk +include $(top_srcdir)/build/vars.build.mk
-EXTRA_DIST = COPYRIGHT.LUA keywords.list docs examples util \ - win32-install.vbs win32-uninstall.vbs +plugin = geanylua
-noinst_HEADERS = glspi.h glspi_keycmd.h glspi_sci.h glspi_ver.h gsdlg.h gsdlg.c +geanyplugins_LTLIBRARIES = geanylua.la
+geanylua_la_SOURCES = \ + geanylua.c \ + glspi_app.c \ + glspi_dlg.c \ + glspi_doc.c \ + glspi_init.c \ + glspi_kfile.c \ + glspi_run.c \ + glspi_sci.c \ + gsdlg.c \ + gsdlg_lua.c \ + glspi.h \ + glspi_keycmd.h \ + glspi_sci.h \ + glspi_ver.h \ + gsdlg.h
-AUTOMAKE_OPTIONS = gnu +geanylua_la_CFLAGS = \ + $(AM_CFLAGS) \ + $(LUA_CFLAGS)
+geanylua_la_LIBADD = \ + $(COMMONLIBS) \ + $(LUA_LIBS)
-SNAPSHOT_NAME=date +$(PACKAGE)-%Y-%m-%d - -AM_CFLAGS = \ - -DGEANY_DISABLE_DEPRECATED \ - -Wall -g \ - @OS_FLAGS@ \ - @GEANY_CFLAGS@ \ - @LUA_CFLAGS@ - - -AM_LDFLAGS = -module -avoid-version @GEANY_LIBS@ @OS_FLAGS@ - - -plugindir = $(PLUGIN_DEST_DIR) -plugin_LTLIBRARIES = geanylua.la -geanylua_la_LDFLAGS = $(AM_LDFLAGS) - -geanylua_la_SOURCES = geanylua.c -geanylua_objects = geanylua.o - -libgeanyluadir = $(DATA_DEST_DIR) -libgeanylua_LTLIBRARIES = libgeanylua.la -libgeanylua_la_LDFLAGS = $(AM_LDFLAGS) @LUA_LIBS@ - -libgeanylua_la_SOURCES = \ -glspi_init.c \ -glspi_app.c \ -glspi_dlg.c \ -glspi_doc.c \ -glspi_kfile.c \ -glspi_run.c \ -glspi_sci.c \ -gsdlg_lua.c - -libgeanylua_objects = \ -.libs/glspi_init.o \ -.libs/glspi_app.o \ -.libs/glspi_dlg.o \ -.libs/glspi_doc.o \ -.libs/glspi_kfile.o \ -.libs/glspi_run.o \ -.libs/glspi_sci.o \ -.libs/gsdlg_lua.o - - - - - -# Libtool complains about unresolved symbols -# and refuses to build the windows plugin - -# but manual linking seems to work just fine... -.libs/$(LIBRARY).dll: $(libgeanylua_objects) - $(CC) $^ $(libgeanylua_la_LDFLAGS) --shared -o $@ - -.libs/$(PACKAGE).dll: $(geanylua_objects) - $(CC) $^ $(AM_LDFLAGS) --shared -o $@ - - -win32: all .libs/$(LIBRARY).dll .libs/$(PACKAGE).dll - - - -.libs/$(PACKAGE).so: $(PACKAGE).la - -.libs/$(LIBRARY).so: $(LIBRARY).la - - - -install-library: .libs/$(LIBRARY_FILENAME) - $(mkdir_p) $(DATA_DEST_DIR) - $(INSTALL) $< $(DATA_DEST_DIR) - - -install-plugin: .libs/$(PLUGIN_FILENAME) - $(mkdir_p) $(PLUGIN_DEST_DIR) - $(INSTALL) $< $(PLUGIN_DEST_DIR) - - -install-scripts: - $(mkdir_p) $(DATA_DEST_DIR)/examples - DIRS=`find examples -maxdepth 1 -mindepth 1 -type d -not -name .svn`; \ - for DIR in $$DIRS; do \ - $(mkdir_p) $(DATA_DEST_DIR)/$$DIR; \ - cp $$DIR/*.lua $(DATA_DEST_DIR)/$$DIR; \ - done - - -install-docs: - $(mkdir_p) $(DOC_DEST_DIR) - cp ./docs/*.html $(DOC_DEST_DIR)/. - - -keywords.list: all - cp .libs/$(LIBRARY_FILENAME) . - ./util/keywords.lua > keywords.list - rm -f $(LIBRARY_FILENAME) - - -install: install-plugin install-library install-scripts install-docs - - -uninstall: - rm -f $(DOC_DEST_DIR)/$(PACKAGE)-*.html - rmdir $(DOC_DEST_DIR) || true - rm -f $(PLUGIN_DEST_DIR)/$(PLUGIN_FILENAME) - rm -f $(DATA_DEST_DIR)/$(LIBRARY_FILENAME) - rm -rf $(DATA_DEST_DIR)/examples - rmdir $(DATA_DEST_DIR) || true - - -snapshot: - ./util/real-clean.sh - ln -sf $${PWD} ../`$(SNAPSHOT_NAME)` - rm -f ../`$(SNAPSHOT_NAME)`.tar.gz - find ../`$(SNAPSHOT_NAME)`/ -type f > ../`$(SNAPSHOT_NAME)`.list - tar --owner=0 --group=0 -zcf ../`$(SNAPSHOT_NAME)`.tar.gz -T ../`$(SNAPSHOT_NAME)`.list - rm -f ../`$(SNAPSHOT_NAME)`{.list,} - - - - -RELEASE_DIR=../$(PACKAGE)-$(VERSION)-release -WIN32_ZIP_DIR=$(PACKAGE)-$(VERSION)-win32 -WIN32_DLL_ZIP=$(RELEASE_DIR)/$(WIN32_ZIP_DIR).zip -LINUX_TAR_DIR=$(PACKAGE)-$(VERSION)-linux-x86 -LINUX_X86_SO_TAR_GZ=$(RELEASE_DIR)/$(LINUX_TAR_DIR).tar.gz - - -PKG_NOTES=docs examples AUTHORS COPYING ChangeLog INSTALL THANKS keywords.list - -win32-dll-zip: - w32-config - w32-make clean win32 - rm -f $(WIN32_DLL_ZIP) - rm -rf $(WIN32_ZIP_DIR) - mkdir $(WIN32_ZIP_DIR) - w32-strip --strip-debug .libs/$(PACKAGE).dll - w32-strip --strip-debug .libs/$(LIBRARY).dll - cp .libs/$(PACKAGE).dll .libs/$(LIBRARY).dll win32-*install.vbs $(WIN32_ZIP_DIR) - cp -ai $(PKG_NOTES) $(WIN32_ZIP_DIR) - zip -XKr -9 $(WIN32_DLL_ZIP) $(WIN32_ZIP_DIR) - rm -rf $(WIN32_ZIP_DIR) - w32-make clean - - - - -linux-x86-so-gz: - ./configure - $(MAKE) clean all - rm -f $(LINUX_X86_SO_TAR_GZ) - rm -rf $(LINUX_TAR_DIR) - mkdir $(LINUX_TAR_DIR) - strip --strip-debug .libs/$(PACKAGE).so - strip --strip-debug .libs/$(LIBRARY).so - cp .libs/$(PACKAGE).so .libs/$(LIBRARY).so util/install.sh $(LINUX_TAR_DIR) - cp -ai $(PKG_NOTES) $(LINUX_TAR_DIR) - tar --owner=0 --group=0 -zvcf $(LINUX_X86_SO_TAR_GZ) $(LINUX_TAR_DIR) - rm -rf $(LINUX_TAR_DIR) - - -release-dir: - mkdir -p $(RELEASE_DIR) - rm -f $(RELEASE_DIR)/$(distdir).tar.gz $(WIN32_DLL_ZIP) $(LINUX_X86_SO_TAR_GZ) - rmdir $(RELEASE_DIR) - mkdir $(RELEASE_DIR) - - -release: $(PKG_NOTES) release-dir win32-dll-zip linux-x86-so-gz dist - mv -v $(PACKAGE)-$(VERSION).tar.gz $(RELEASE_DIR)/ - - -pathcheck: - @echo "Install plugin: $(PLUGIN_DEST_DIR)" - @echo "Install support files: $(DATA_DEST_DIR)" - @echo "Install documentation: $(DOC_DEST_DIR)" - +# TODO: figure out where to install these +EXTRA_DIST = docs util examples
Deleted: trunk/geany-plugins/geanylua/configure.in =================================================================== --- trunk/geany-plugins/geanylua/configure.in 2009-06-19 16:16:33 UTC (rev 753) +++ trunk/geany-plugins/geanylua/configure.in 2009-06-19 21:20:57 UTC (rev 754) @@ -1,144 +0,0 @@ - -AC_INIT([geanylua],0.7.0, [yetanothergeek@gmail.com]) - -PACKAGE="geanylua" -VERSION=0.7.0 -GEANY_MIN_VER=0.13 - -AC_SUBST([VERSION]) -AC_SUBST([PACKAGE]) - -AM_INIT_AUTOMAKE([${PACKAGE}], ${VERSION} ) - - -AC_PROG_CC -AC_LANG_C -AC_PROG_MAKE_SET -AC_HEADER_STDC - -AC_DISABLE_STATIC -AM_PROG_LIBTOOL - - -PKG_CHECK_MODULES(GEANY, [geany]) -AC_SUBST(GEANY_CFLAGS) -AC_SUBST(GEANY_LIBS) - - -AC_ARG_WITH([lua-pkg], - AC_HELP_STRING([--with-lua-pkg=ARG],[name of Lua pkg-config script [[default=lua5.1]]]), - [LUA_PKG_NAME=${withval%.pc}], -[ -LUA_PKG_NAME=lua5.1 - -for L in lua5.1 lua51 lua-5.1 lua -do - AC_MSG_CHECKING([for $L.pc]) - if ${PKG_CONFIG} --exists ${L} - then - AC_MSG_RESULT([yes]) - LUA_PKG_NAME=${L} - break - else - AC_MSG_RESULT([no]) - fi -done -] -) - - -PKG_CHECK_MODULES([LUA], [${LUA_PKG_NAME} >= 5.1]) -AC_SUBST(LUA_CFLAGS) -AC_SUBST(LUA_LIBS) - - -AC_ARG_ENABLE([hidden-symbols], - AC_HELP_STRING([--enable-hidden-symbols],[Hide internal symbols in library [[default=no]]]), - [ - if ${CC} --help --verbose 2> /dev/null | grep "-fvisibility>" > /dev/null - then - AC_DEFINE([PLUGIN_EXPORT], [__attribute__ ((visibility ("default")))], [to make a symbol visible]) - OS_FLAGS="${OS_FLAGS} -fvisibility=hidden" - HIDE_SYMS="yes" - else - AC_MSG_ERROR([--enable-hidden-symbols option is not supported by compiler!]) - HIDE_SYMS="no" - fi - ], - [ - OS_FLAGS= - ] -) - - -AC_ARG_ENABLE([sys-install], -AC_HELP_STRING([--enable-sys-install],[install plugin for all users [[default=no]]]), - [ - if test "x${prefix}" = "xNONE"; then - prefix=${ac_default_prefix} - fi - SYS_INSTALL=yes - PLUGIN_DEST_DIR="${prefix}/lib/geany" - DATA_DEST_DIR="${prefix}/share/geany/plugins/${PACKAGE}" - DOC_DEST_DIR="${prefix}/share/doc/geany-plugins/${PACKAGE}" - ], - [ - SYS_INSTALL=no - PLUGIN_DEST_DIR="${HOME}/.geany/plugins" - DATA_DEST_DIR="${HOME}/.geany/plugins/${PACKAGE}" - DOC_DEST_DIR="${HOME}/.geany/plugins/${PACKAGE}/support" - ] -) - -AC_SUBST(SYS_INSTALL) -AC_SUBST(PLUGIN_DEST_DIR) -AC_SUBST(DATA_DEST_DIR) -AC_SUBST(DOC_DEST_DIR) - -case "${host_os}" in - cygwin* | mingw*) - if test "x${SYS_INSTALL}" = "xyes" - then - AC_MSG_ERROR([--enable-sys-install option is not supported on windows!]) - fi - if test "x${HIDE_SYMS}" = "xyes" - then - AC_MSG_ERROR([--enable-hidden-symbols option is not supported on windows!]) - fi - LIBEXT="dll" - OS_FLAGS="${OS_FLAGS} -mms-bitfields" - USER_CMD="'make win32'" - AC_DEFINE([PLUGIN_EXPORT], [__declspec(dllexport)], [to make a symbol visible]) - ;; - *) - LIBEXT="so" - USER_CMD="'make'" - ;; -esac - -LIBRARY="libgeanylua" - -PLUGIN_FILENAME="${PACKAGE}.${LIBEXT}" -LIBRARY_FILENAME="${LIBRARY}.${LIBEXT}" - -AC_SUBST(OS_FLAGS) -AC_SUBST(PLUGIN_FILENAME) -AC_SUBST(LIBRARY) -AC_SUBST(LIBRARY_FILENAME) - - -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT - -echo -echo "========================================" -make pathcheck - -echo -echo "Plugin filename: ${PLUGIN_FILENAME}" -echo "System-wide install: ${SYS_INSTALL}" -echo -echo "Configuration complete, now type ${USER_CMD}" -echo - -
Copied: trunk/geany-plugins/geanylua/oldbuildsys/Makefile.am (from rev 753, trunk/geany-plugins/geanylua/Makefile.am) =================================================================== --- trunk/geany-plugins/geanylua/oldbuildsys/Makefile.am (rev 0) +++ trunk/geany-plugins/geanylua/oldbuildsys/Makefile.am 2009-06-19 21:20:57 UTC (rev 754) @@ -0,0 +1,187 @@ + +EXTRA_DIST = COPYRIGHT.LUA keywords.list docs examples util \ + win32-install.vbs win32-uninstall.vbs + +noinst_HEADERS = glspi.h glspi_keycmd.h glspi_sci.h glspi_ver.h gsdlg.h gsdlg.c + + +AUTOMAKE_OPTIONS = gnu + + +SNAPSHOT_NAME=date +$(PACKAGE)-%Y-%m-%d + +AM_CFLAGS = \ + -DGEANY_DISABLE_DEPRECATED \ + -Wall -g \ + @OS_FLAGS@ \ + @GEANY_CFLAGS@ \ + @LUA_CFLAGS@ + + +AM_LDFLAGS = -module -avoid-version @GEANY_LIBS@ @OS_FLAGS@ + + +plugindir = $(PLUGIN_DEST_DIR) +plugin_LTLIBRARIES = geanylua.la +geanylua_la_LDFLAGS = $(AM_LDFLAGS) + +geanylua_la_SOURCES = geanylua.c +geanylua_objects = geanylua.o + +libgeanyluadir = $(DATA_DEST_DIR) +libgeanylua_LTLIBRARIES = libgeanylua.la +libgeanylua_la_LDFLAGS = $(AM_LDFLAGS) @LUA_LIBS@ + +libgeanylua_la_SOURCES = \ +glspi_init.c \ +glspi_app.c \ +glspi_dlg.c \ +glspi_doc.c \ +glspi_kfile.c \ +glspi_run.c \ +glspi_sci.c \ +gsdlg_lua.c + +libgeanylua_objects = \ +.libs/glspi_init.o \ +.libs/glspi_app.o \ +.libs/glspi_dlg.o \ +.libs/glspi_doc.o \ +.libs/glspi_kfile.o \ +.libs/glspi_run.o \ +.libs/glspi_sci.o \ +.libs/gsdlg_lua.o + + + + + +# Libtool complains about unresolved symbols +# and refuses to build the windows plugin - +# but manual linking seems to work just fine... +.libs/$(LIBRARY).dll: $(libgeanylua_objects) + $(CC) $^ $(libgeanylua_la_LDFLAGS) --shared -o $@ + +.libs/$(PACKAGE).dll: $(geanylua_objects) + $(CC) $^ $(AM_LDFLAGS) --shared -o $@ + + +win32: all .libs/$(LIBRARY).dll .libs/$(PACKAGE).dll + + + +.libs/$(PACKAGE).so: $(PACKAGE).la + +.libs/$(LIBRARY).so: $(LIBRARY).la + + + +install-library: .libs/$(LIBRARY_FILENAME) + $(mkdir_p) $(DATA_DEST_DIR) + $(INSTALL) $< $(DATA_DEST_DIR) + + +install-plugin: .libs/$(PLUGIN_FILENAME) + $(mkdir_p) $(PLUGIN_DEST_DIR) + $(INSTALL) $< $(PLUGIN_DEST_DIR) + + +install-scripts: + $(mkdir_p) $(DATA_DEST_DIR)/examples + DIRS=`find examples -maxdepth 1 -mindepth 1 -type d -not -name .svn`; \ + for DIR in $$DIRS; do \ + $(mkdir_p) $(DATA_DEST_DIR)/$$DIR; \ + cp $$DIR/*.lua $(DATA_DEST_DIR)/$$DIR; \ + done + + +install-docs: + $(mkdir_p) $(DOC_DEST_DIR) + cp ./docs/*.html $(DOC_DEST_DIR)/. + + +keywords.list: all + cp .libs/$(LIBRARY_FILENAME) . + ./util/keywords.lua > keywords.list + rm -f $(LIBRARY_FILENAME) + + +install: install-plugin install-library install-scripts install-docs + + +uninstall: + rm -f $(DOC_DEST_DIR)/$(PACKAGE)-*.html + rmdir $(DOC_DEST_DIR) || true + rm -f $(PLUGIN_DEST_DIR)/$(PLUGIN_FILENAME) + rm -f $(DATA_DEST_DIR)/$(LIBRARY_FILENAME) + rm -rf $(DATA_DEST_DIR)/examples + rmdir $(DATA_DEST_DIR) || true + + +snapshot: + ./util/real-clean.sh + ln -sf $${PWD} ../`$(SNAPSHOT_NAME)` + rm -f ../`$(SNAPSHOT_NAME)`.tar.gz + find ../`$(SNAPSHOT_NAME)`/ -type f > ../`$(SNAPSHOT_NAME)`.list + tar --owner=0 --group=0 -zcf ../`$(SNAPSHOT_NAME)`.tar.gz -T ../`$(SNAPSHOT_NAME)`.list + rm -f ../`$(SNAPSHOT_NAME)`{.list,} + + + + +RELEASE_DIR=../$(PACKAGE)-$(VERSION)-release +WIN32_ZIP_DIR=$(PACKAGE)-$(VERSION)-win32 +WIN32_DLL_ZIP=$(RELEASE_DIR)/$(WIN32_ZIP_DIR).zip +LINUX_TAR_DIR=$(PACKAGE)-$(VERSION)-linux-x86 +LINUX_X86_SO_TAR_GZ=$(RELEASE_DIR)/$(LINUX_TAR_DIR).tar.gz + + +PKG_NOTES=docs examples AUTHORS COPYING ChangeLog INSTALL THANKS keywords.list + +win32-dll-zip: + w32-config + w32-make clean win32 + rm -f $(WIN32_DLL_ZIP) + rm -rf $(WIN32_ZIP_DIR) + mkdir $(WIN32_ZIP_DIR) + w32-strip --strip-debug .libs/$(PACKAGE).dll + w32-strip --strip-debug .libs/$(LIBRARY).dll + cp .libs/$(PACKAGE).dll .libs/$(LIBRARY).dll win32-*install.vbs $(WIN32_ZIP_DIR) + cp -ai $(PKG_NOTES) $(WIN32_ZIP_DIR) + zip -XKr -9 $(WIN32_DLL_ZIP) $(WIN32_ZIP_DIR) + rm -rf $(WIN32_ZIP_DIR) + w32-make clean + + + + +linux-x86-so-gz: + ./configure + $(MAKE) clean all + rm -f $(LINUX_X86_SO_TAR_GZ) + rm -rf $(LINUX_TAR_DIR) + mkdir $(LINUX_TAR_DIR) + strip --strip-debug .libs/$(PACKAGE).so + strip --strip-debug .libs/$(LIBRARY).so + cp .libs/$(PACKAGE).so .libs/$(LIBRARY).so util/install.sh $(LINUX_TAR_DIR) + cp -ai $(PKG_NOTES) $(LINUX_TAR_DIR) + tar --owner=0 --group=0 -zvcf $(LINUX_X86_SO_TAR_GZ) $(LINUX_TAR_DIR) + rm -rf $(LINUX_TAR_DIR) + + +release-dir: + mkdir -p $(RELEASE_DIR) + rm -f $(RELEASE_DIR)/$(distdir).tar.gz $(WIN32_DLL_ZIP) $(LINUX_X86_SO_TAR_GZ) + rmdir $(RELEASE_DIR) + mkdir $(RELEASE_DIR) + + +release: $(PKG_NOTES) release-dir win32-dll-zip linux-x86-so-gz dist + mv -v $(PACKAGE)-$(VERSION).tar.gz $(RELEASE_DIR)/ + + +pathcheck: + @echo "Install plugin: $(PLUGIN_DEST_DIR)" + @echo "Install support files: $(DATA_DEST_DIR)" + @echo "Install documentation: $(DOC_DEST_DIR)" +
Copied: trunk/geany-plugins/geanylua/oldbuildsys/configure.in (from rev 753, trunk/geany-plugins/geanylua/configure.in) =================================================================== --- trunk/geany-plugins/geanylua/oldbuildsys/configure.in (rev 0) +++ trunk/geany-plugins/geanylua/oldbuildsys/configure.in 2009-06-19 21:20:57 UTC (rev 754) @@ -0,0 +1,144 @@ + +AC_INIT([geanylua],0.7.0, [yetanothergeek@gmail.com]) + +PACKAGE="geanylua" +VERSION=0.7.0 +GEANY_MIN_VER=0.13 + +AC_SUBST([VERSION]) +AC_SUBST([PACKAGE]) + +AM_INIT_AUTOMAKE([${PACKAGE}], ${VERSION} ) + + +AC_PROG_CC +AC_LANG_C +AC_PROG_MAKE_SET +AC_HEADER_STDC + +AC_DISABLE_STATIC +AM_PROG_LIBTOOL + + +PKG_CHECK_MODULES(GEANY, [geany]) +AC_SUBST(GEANY_CFLAGS) +AC_SUBST(GEANY_LIBS) + + +AC_ARG_WITH([lua-pkg], + AC_HELP_STRING([--with-lua-pkg=ARG],[name of Lua pkg-config script [[default=lua5.1]]]), + [LUA_PKG_NAME=${withval%.pc}], +[ +LUA_PKG_NAME=lua5.1 + +for L in lua5.1 lua51 lua-5.1 lua +do + AC_MSG_CHECKING([for $L.pc]) + if ${PKG_CONFIG} --exists ${L} + then + AC_MSG_RESULT([yes]) + LUA_PKG_NAME=${L} + break + else + AC_MSG_RESULT([no]) + fi +done +] +) + + +PKG_CHECK_MODULES([LUA], [${LUA_PKG_NAME} >= 5.1]) +AC_SUBST(LUA_CFLAGS) +AC_SUBST(LUA_LIBS) + + +AC_ARG_ENABLE([hidden-symbols], + AC_HELP_STRING([--enable-hidden-symbols],[Hide internal symbols in library [[default=no]]]), + [ + if ${CC} --help --verbose 2> /dev/null | grep "-fvisibility>" > /dev/null + then + AC_DEFINE([PLUGIN_EXPORT], [__attribute__ ((visibility ("default")))], [to make a symbol visible]) + OS_FLAGS="${OS_FLAGS} -fvisibility=hidden" + HIDE_SYMS="yes" + else + AC_MSG_ERROR([--enable-hidden-symbols option is not supported by compiler!]) + HIDE_SYMS="no" + fi + ], + [ + OS_FLAGS= + ] +) + + +AC_ARG_ENABLE([sys-install], +AC_HELP_STRING([--enable-sys-install],[install plugin for all users [[default=no]]]), + [ + if test "x${prefix}" = "xNONE"; then + prefix=${ac_default_prefix} + fi + SYS_INSTALL=yes + PLUGIN_DEST_DIR="${prefix}/lib/geany" + DATA_DEST_DIR="${prefix}/share/geany/plugins/${PACKAGE}" + DOC_DEST_DIR="${prefix}/share/doc/geany-plugins/${PACKAGE}" + ], + [ + SYS_INSTALL=no + PLUGIN_DEST_DIR="${HOME}/.geany/plugins" + DATA_DEST_DIR="${HOME}/.geany/plugins/${PACKAGE}" + DOC_DEST_DIR="${HOME}/.geany/plugins/${PACKAGE}/support" + ] +) + +AC_SUBST(SYS_INSTALL) +AC_SUBST(PLUGIN_DEST_DIR) +AC_SUBST(DATA_DEST_DIR) +AC_SUBST(DOC_DEST_DIR) + +case "${host_os}" in + cygwin* | mingw*) + if test "x${SYS_INSTALL}" = "xyes" + then + AC_MSG_ERROR([--enable-sys-install option is not supported on windows!]) + fi + if test "x${HIDE_SYMS}" = "xyes" + then + AC_MSG_ERROR([--enable-hidden-symbols option is not supported on windows!]) + fi + LIBEXT="dll" + OS_FLAGS="${OS_FLAGS} -mms-bitfields" + USER_CMD="'make win32'" + AC_DEFINE([PLUGIN_EXPORT], [__declspec(dllexport)], [to make a symbol visible]) + ;; + *) + LIBEXT="so" + USER_CMD="'make'" + ;; +esac + +LIBRARY="libgeanylua" + +PLUGIN_FILENAME="${PACKAGE}.${LIBEXT}" +LIBRARY_FILENAME="${LIBRARY}.${LIBEXT}" + +AC_SUBST(OS_FLAGS) +AC_SUBST(PLUGIN_FILENAME) +AC_SUBST(LIBRARY) +AC_SUBST(LIBRARY_FILENAME) + + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT + +echo +echo "========================================" +make pathcheck + +echo +echo "Plugin filename: ${PLUGIN_FILENAME}" +echo "System-wide install: ${SYS_INSTALL}" +echo +echo "Configuration complete, now type ${USER_CMD}" +echo + +
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org