python: Include 'config.h'.
* lang/python/Makefile.am: Pass 'top_builddir' to 'setup.py'. * lang/python/gpgme.i: Include 'config.h'. * lang/python/helpers.c: Likewise. * lang/python/helpers.h: Likewise. * lang/python/setup.py.in: Make sure that 'config.h' can be found. -- Fixes build on 32 bit platforms with large file support. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
95f38652f6
commit
3703a47238
@ -56,6 +56,7 @@ copystamp: $(COPY_FILES) $(COPY_FILES_PYME)
|
|||||||
all-local: copystamp
|
all-local: copystamp
|
||||||
for PYTHON in $(PYTHONS); do \
|
for PYTHON in $(PYTHONS); do \
|
||||||
CFLAGS="$(CFLAGS) -I$(top_srcdir)" \
|
CFLAGS="$(CFLAGS) -I$(top_srcdir)" \
|
||||||
|
top_builddir="$(top_builddir)" \
|
||||||
$$PYTHON setup.py build --verbose ; \
|
$$PYTHON setup.py build --verbose ; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -547,6 +547,10 @@
|
|||||||
some structs, which we provide prior to including the version for
|
some structs, which we provide prior to including the version for
|
||||||
SWIG. */
|
SWIG. */
|
||||||
%{
|
%{
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <gpgme.h>
|
#include <gpgme.h>
|
||||||
%}
|
%}
|
||||||
|
|
||||||
@ -575,6 +579,10 @@ struct _gpgme_sig_notation
|
|||||||
|
|
||||||
/* Now include our local modified version. Any structs defined above
|
/* Now include our local modified version. Any structs defined above
|
||||||
are ignored. */
|
are ignored. */
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
%include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
%include "gpgme.h"
|
%include "gpgme.h"
|
||||||
|
|
||||||
%include "errors.i"
|
%include "errors.i"
|
||||||
|
@ -18,6 +18,10 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <gpgme.h>
|
#include <gpgme.h>
|
||||||
|
@ -18,6 +18,10 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <gpgme.h>
|
#include <gpgme.h>
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ gpg_error_config = ["gpg-error-config"]
|
|||||||
gpgme_config_flags = ["--thread=pthread"]
|
gpgme_config_flags = ["--thread=pthread"]
|
||||||
gpgme_config = ["gpgme-config"] + gpgme_config_flags
|
gpgme_config = ["gpgme-config"] + gpgme_config_flags
|
||||||
gpgme_h = ""
|
gpgme_h = ""
|
||||||
|
include_dirs = [os.getcwd()]
|
||||||
library_dirs = []
|
library_dirs = []
|
||||||
in_tree = False
|
in_tree = False
|
||||||
extra_swig_opts = []
|
extra_swig_opts = []
|
||||||
@ -38,8 +39,13 @@ if os.path.exists("../../src/gpgme-config"):
|
|||||||
in_tree = True
|
in_tree = True
|
||||||
gpgme_config = ["../../src/gpgme-config"] + gpgme_config_flags
|
gpgme_config = ["../../src/gpgme-config"] + gpgme_config_flags
|
||||||
gpgme_h = "../../src/gpgme.h"
|
gpgme_h = "../../src/gpgme.h"
|
||||||
|
if 'top_builddir' in os.environ:
|
||||||
|
include_dirs.append(os.environ['top_builddir'])
|
||||||
|
# Make sure that SWIG finds config.h when processing gpgme.i.
|
||||||
|
extra_swig_opts.append("-I{0}".format(os.environ['top_builddir']))
|
||||||
library_dirs = ["../../src/.libs"] # XXX uses libtool internals
|
library_dirs = ["../../src/.libs"] # XXX uses libtool internals
|
||||||
extra_macros.update(
|
extra_macros.update(
|
||||||
|
HAVE_CONFIG_H=1,
|
||||||
HAVE_DATA_H=1,
|
HAVE_DATA_H=1,
|
||||||
IN_TREE_BUILD=1,
|
IN_TREE_BUILD=1,
|
||||||
)
|
)
|
||||||
@ -94,7 +100,6 @@ subprocess.check_call([sys.executable, "gpgme-h-clean.py", gpgme_h],
|
|||||||
subprocess.check_call([sys.executable, "gpgme-h-clean.py", gpg_error_h],
|
subprocess.check_call([sys.executable, "gpgme-h-clean.py", gpg_error_h],
|
||||||
stdout=open("errors.i", "w"))
|
stdout=open("errors.i", "w"))
|
||||||
|
|
||||||
include_dirs = [os.getcwd()]
|
|
||||||
define_macros = []
|
define_macros = []
|
||||||
libs = getconfig('libs')
|
libs = getconfig('libs')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user