diff --git a/Makefile.in b/Makefile.in index 7b71021..0a98954 100644 --- a/Makefile.in +++ b/Makefile.in @@ -288,7 +288,7 @@ install-application: \ install-icons @$(MKDIR) \ - $(DESTDIR)$(libdir)/$(PRODUCT_NAME)-plugins + $(DESTDIR)@PLUGIN_DIR@ @$(INSTALL_DATA) \ $(srcdir)/ui/@OSNAME@.ui.xml \ @@ -300,7 +300,7 @@ install-application: \ install-linux-application: \ $(BINRLS)/$(PACKAGE_NAME)@EXEEXT@ - @$(MKDIR) \ + @$(MKDIR) \ $(DESTDIR)$(bindir) @$(INSTALL_PROGRAM) \ diff --git a/autogen.sh b/autogen.sh index f85ca87..f25ca55 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,45 +1,19 @@ #!/bin/bash -# SPDX-License-Identifier: LGPL-3.0-or-later -# -# Copyright (C) 2008 Banco do Brasil S.A. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published -# by the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see . -# builddir=${PWD} -test -n "$srcdir" || srcdir=`dirname "$0"` -test -n "$srcdir" || srcdir=. +test -n "$srcdir" || srcdir=$(readlink -f $(dirname "$0")) +test -n "$srcdir" || srcdir=$(readlink -f .) -cd "$srcdir" +cd ${srcdir} -mkdir -p scripts +mkdir -p ./scripts mkdir -p m4 -LIBTOOLIZE=$(which libtoolize) -if [ -z ${LIBTOOLIZE} ]; then - LIBTOOLIZE=$(which glibtoolize) -fi -if [ -z ${LIBTOOLIZE} ]; then - echo "Can't find libtoolize" - exit -1 -fi - -${LIBTOOLIZE} --force +libtoolize --force if test $? != 0 ; then - echo "libtoolize failed." - exit -1 + echo "libtoolize failed." + exit -1 fi aclocal @@ -48,11 +22,11 @@ if test $? != 0 ; then exit -1 fi -#autoheader --force -#if test $? != 0 ; then -# echo "autoheader failed." -# exit -1 -#fi +autoheader --force +if test $? != 0 ; then + echo "autoheader failed." + exit -1 +fi autoconf --force if test $? != 0 ; then @@ -64,10 +38,9 @@ automake --add-missing 2> /dev/null | true autopoint -cd "${builddir}" - -test -n "$NOCONFIGURE" || "$srcdir/configure" --srcdir=${srcdir} $@ +cd ${builddir} +test -n "$NOCONFIGURE" || "./configure" "$@" diff --git a/configure.ac b/configure.ac index c37c258..2157c7c 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ AC_PREREQ(2.61) dnl Initialise automake with the package name, version and dnl bug-reporting address. -AC_INIT([pw3270], [5.4], [perry.werneck@gmail.com]) +AC_INIT([pw3270], [5.5], [perry.werneck@gmail.com]) dnl Place auxilliary scripts here. AC_CONFIG_AUX_DIR([scripts]) @@ -40,6 +40,8 @@ AC_CONFIG_HEADER([src/include/config.h]) dnl Initialise automake stuff. AM_INIT_AUTOMAKE +LT_INIT + dnl Set gettext version AM_GNU_GETTEXT_VERSION([0.14]) @@ -171,8 +173,8 @@ AC_SUBST(PACKAGE_DESCRIPTION,"IBM 3270 Terminal emulator") app_vrs_major=$(echo $VERSION | cut -d. -f1) app_vrs_minor=$(echo $VERSION | cut -d. -f2) -AC_DEFINE_UNQUOTED(PACKAGE_MAJOR_VERSION, $app_vrs_major) -AC_DEFINE_UNQUOTED(PACKAGE_MINOR_VERSION, $app_vrs_minor) +AC_DEFINE_UNQUOTED(PACKAGE_MAJOR_VERSION, $app_vrs_major, [The package major version]) +AC_DEFINE_UNQUOTED(PACKAGE_MINOR_VERSION, $app_vrs_minor, [The package minor version]) AC_SUBST(PACKAGE_MAJOR_VERSION,$app_vrs_major) AC_SUBST(PACKAGE_MINOR_VERSION,$app_vrs_minor) @@ -182,9 +184,9 @@ AC_ARG_WITH([release], [AS_HELP_STRING([--with-release], [Set release])], [ app_ app_rls_major=$(echo $app_cv_release.0.0 | cut -d. -f1) app_rls_minor=$(echo $app_cv_release.0.0 | cut -d. -f2) -AC_DEFINE_UNQUOTED(PACKAGE_RELEASE, "$app_cv_release") -AC_DEFINE_UNQUOTED(PACKAGE_MAJOR_RELEASE, $app_rls_major) -AC_DEFINE_UNQUOTED(PACKAGE_MINOR_RELEASE, $app_rls_minor) +AC_DEFINE_UNQUOTED(PACKAGE_RELEASE, "$app_cv_release",[The package release]) +AC_DEFINE_UNQUOTED(PACKAGE_MAJOR_RELEASE, $app_rls_major,[The package major release]) +AC_DEFINE_UNQUOTED(PACKAGE_MINOR_RELEASE, $app_rls_minor,[The package minor release]) AC_SUBST(PACKAGE_RELEASE,$app_cv_release) AC_SUBST(PACKAGE_MAJOR_RELEASE,$app_rls_major) @@ -195,14 +197,18 @@ dnl Set application id & product name dnl --------------------------------------------------------------------------- AC_ARG_WITH([product-name], [AS_HELP_STRING([--with-product-name], [Set product name])], [ app_cv_product="$withval" ],[ app_cv_product=`pkg-config --variable=product_name lib3270` ]) -AC_DEFINE_UNQUOTED(PRODUCT_NAME, $app_cv_product) +AC_DEFINE_UNQUOTED(PRODUCT_NAME, $app_cv_product,[The product name]) AC_SUBST(PRODUCT_NAME,$app_cv_product) AC_ARG_WITH([application-id], [AS_HELP_STRING([--application-id], [Set the application ID])], [ app_cv_application_id="$withval" ],[ app_cv_application_id=`pkg-config --variable=product_id lib3270`.terminal ]) -AC_DEFINE_UNQUOTED(APPLICATION_ID, $app_cv_application_id) +AC_DEFINE_UNQUOTED(APPLICATION_ID, $app_cv_application_id,[The application ID]) AC_SUBST(APPLICATION_ID,$app_cv_application_id) +AC_ARG_WITH([plugin-dir], [AS_HELP_STRING([--with-plugin-dir], [The application plugin dir])], [ app_cv_plugin_path="$withval" ],[ app_cv_plugin_path=`pkg-config --variable=plugin_path lib3270` ]) +AC_DEFINE_UNQUOTED(PLUGIN_DIR, "$app_cv_plugin_path", [The product name]) +AC_SUBST(PLUGIN_DIR,$app_cv_plugin_path) + dnl --------------------------------------------------------------------------- dnl Check for unstable version dnl --------------------------------------------------------------------------- @@ -217,7 +223,7 @@ AC_ARG_ENABLE([unstable], ]) if test "$app_cv_unstable" == "yes"; then - AC_DEFINE(ENABLE_UNSTABLE_FEATURES) + AC_DEFINE(ENABLE_UNSTABLE_FEATURES,,[Are we using the unstable features?]) AC_MSG_NOTICE([Enabling unstable features]) else AC_MSG_NOTICE([Using only stable features]) @@ -228,13 +234,13 @@ dnl --------------------------------------------------------------------------- dnl Check for LIBV3270 dnl --------------------------------------------------------------------------- -PKG_CHECK_MODULES( [LIBV3270], [libv3270], AC_DEFINE(HAVE_LIBV3270), AC_MSG_ERROR([LIBV3270 not present.])) +PKG_CHECK_MODULES( [LIBV3270], [libv3270], AC_DEFINE(HAVE_LIBV3270,,[Do we have libv3270?]), AC_MSG_ERROR([LIBV3270 not present.])) AC_SUBST(LIBV3270_LIBS) AC_SUBST(LIBV3270_CFLAGS) AC_ARG_WITH([library-name], [AS_HELP_STRING([--with-library-name], [Set protocol library name])], [ app_cv_library="$withval" ],[ app_cv_library=`pkg-config --variable=library_name lib3270` ]) -AC_DEFINE_UNQUOTED(LIBRARY_NAME, $app_cv_library) +AC_DEFINE_UNQUOTED(LIBRARY_NAME, $app_cv_library,[The tn3270 library name]) AC_SUBST(LIBRARY_NAME,$app_cv_library) dnl --------------------------------------------------------------------------- @@ -243,19 +249,7 @@ dnl --------------------------------------------------------------------------- GLIB_GSETTINGS -case "$host" in - *-mingw32|*-pc-msys) - PKG_CHECK_MODULES( [GTK], [gtk+-3.0 glib-2.0 gmodule-2.0], AC_DEFINE(HAVE_GTK), AC_MSG_ERROR([GTK not present.])) - ;; - - *-apple-darwin*) - PKG_CHECK_MODULES( [GTK], [gtk+-3.0 glib-2.0 gmodule-2.0], AC_DEFINE(HAVE_GTK), AC_MSG_ERROR([GTK not present.])) - ;; - - *) - PKG_CHECK_MODULES( [GTK], [gtk+-3.0 glib-2.0 gmodule-2.0], AC_DEFINE(HAVE_GTK), AC_MSG_ERROR([GTK not present.])) - -esac +PKG_CHECK_MODULES( [GTK], [gtk+-3.0 glib-2.0 gmodule-2.0], AC_DEFINE(HAVE_GTK,1,[Do we have gtk?]), AC_MSG_ERROR([GTK not present.])) AC_SUBST(GTK_LIBS) AC_SUBST(GTK_CFLAGS) diff --git a/pw3270.cbp b/pw3270.cbp index 449b3c5..08165fd 100644 --- a/pw3270.cbp +++ b/pw3270.cbp @@ -46,6 +46,7 @@ + @@ -67,6 +68,7 @@ + @@ -89,6 +91,9 @@ + + @@ -116,6 +121,9 @@ + + + + @@ -173,6 +184,9 @@ + + @@ -210,6 +224,9 @@ + + diff --git a/src/include/config.h.in b/src/include/config.h.in index d79ac38..5768846 100644 --- a/src/include/config.h.in +++ b/src/include/config.h.in @@ -1,45 +1,106 @@ -/* - * "Software G3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a - * aplicativos mainframe. Registro no INPI sob o nome G3270. - * - * Copyright (C) <2008> - * - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela - * Free Software Foundation. - * - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para - * obter mais detalhes. - * - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin - * St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Este programa está nomeado como config.h e possui - linhas de código. - * - * Contatos: - * - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) - * erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) - * - */ - -#ifndef PW3270_CONFIG_H_INCLUDED - - #define PW3270_CONFIG_H_INCLUDED 1 - - #undef PACKAGE_NAME - #undef PACKAGE_VERSION - #undef PACKAGE_RELEASE - #undef PRODUCT_NAME - #undef APPLICATION_ID - #undef ENABLE_UNSTABLE_FEATURES - #undef HAVE_MALLOC_H - #undef HAVE_STRTOK_R - #undef HAVE_LOCALTIME_R - -#endif /* PW3270_CONFIG_H_INCLUDED */ +/* src/include/config.h.in. Generated from configure.ac by autoheader. */ +/* The application ID */ +#undef APPLICATION_ID + +/* Are we using the unstable features? */ +#undef ENABLE_UNSTABLE_FEATURES + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Do we have gtk? */ +#undef HAVE_GTK + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Do we have libv3270? */ +#undef HAVE_LIBV3270 + +/* Do we have localtime_r? */ +#undef HAVE_LOCALTIME_R + +/* do we have malloc.h? */ +#undef HAVE_MALLOC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Do we have strtok_r? */ +#undef HAVE_STRTOK_R + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* The tn3270 library name */ +#undef LIBRARY_NAME + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#undef LT_OBJDIR + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* The package major release */ +#undef PACKAGE_MAJOR_RELEASE + +/* The package major version */ +#undef PACKAGE_MAJOR_VERSION + +/* The package minor release */ +#undef PACKAGE_MINOR_RELEASE + +/* The package minor version */ +#undef PACKAGE_MINOR_VERSION + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* The package release */ +#undef PACKAGE_RELEASE + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* The product name */ +#undef PLUGIN_DIR + +/* The product name */ +#undef PRODUCT_NAME + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION diff --git a/src/objects/application/application.c b/src/objects/application/application.c index c786b16..50169de 100644 --- a/src/objects/application/application.c +++ b/src/objects/application/application.c @@ -302,7 +302,7 @@ static void pw3270Application_init(pw3270Application *app) { g_settings_bind(app->settings, "ui-style", app, "ui-style", G_SETTINGS_BIND_DEFAULT); } - pw3270_load_plugins_from_path(app, G_STRINGIFY(LIBDIR) G_DIR_SEPARATOR_S G_STRINGIFY(PRODUCT_NAME) "-plugins"); + pw3270_load_plugins_from_path(app, PLUGIN_DIR); #endif // _WIN32 -- libgit2 0.21.2