From 2cdfa17091cc29835c8e8ab88630feb00d601ebf Mon Sep 17 00:00:00 2001 From: David Schleef Date: Wed, 4 Jun 2003 02:42:08 +0000 Subject: [PATCH] Fixes to make python and docs build correctly --- Makefile.am | 3 ++- configure.ac | 19 +++++++++++++++++++ doc/Makefile.am | 8 +++++++- python/Makefile.am | 2 +- python/comedi.i | 8 ++++---- python/comedi_wrap.c | 4 ++-- python/setup.py | 4 ++-- 7 files changed, 37 insertions(+), 11 deletions(-) diff --git a/Makefile.am b/Makefile.am index c79d188..61b5681 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,6 @@ -SUBDIRS = lib comedi_calibrate comedi_config man testing demo doc +SUBDIRS = lib comedi_calibrate comedi_config man testing demo doc python \ + include #pkgconfigdir = $(libdir)/pkgconfig #pkgconfig_DATA = comedilib.pc diff --git a/configure.ac b/configure.ac index 5df9d65..5a0ddb4 100644 --- a/configure.ac +++ b/configure.ac @@ -25,14 +25,33 @@ COMEDILIB_LIBS="$COMEDILIB_LIBS \$(top_builddir)/lib/libcomedi.la -lm" AC_SUBST(COMEDILIB_CFLAGS) AC_SUBST(COMEDILIB_LIBS) +AM_PATH_PYTHON +AC_MSG_CHECKING(for python >= 2.2) +prog=" +import sys, string +minver = (2,2,0,'final',0) +if sys.version_info < minver: + sys.exit(1) +sys.exit(0)" +if $PYTHON -c "$prog" 2>&AC_FD_CC 2>&AC_FD_CC +then + AC_MSG_RESULT(ok) +else + AC_MSG_ERROR(too old) +fi +AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)]) + + AC_CONFIG_FILES( Makefile comedi_calibrate/Makefile comedi_config/Makefile doc/Makefile demo/Makefile +include/Makefile lib/Makefile man/Makefile +python/Makefile testing/Makefile ) diff --git a/doc/Makefile.am b/doc/Makefile.am index 51e09d6..6f3552b 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -3,7 +3,7 @@ DOC=comedilib SGML= drivers.sgml funcref.sgml glossary.sgml \ install.sgml intro.sgml other.sgml reference.sgml tutorial.sgml -EXTRA_DIST=$(SGML) funcref mkref drivers.txt mkdr +EXTRA_DIST=$(SGML) comedilib.sgml funcref mkref drivers.txt mkdr all-local: html $(DOC).pdf man @@ -11,6 +11,12 @@ clean-local: rm -rf comedilib.pdf drivers.sgml funcref.sgml rm -rf html man +install-data-local: + $(INSTALL) -d $(mandir)/man3 + $(INSTALL) man/*.3 $(mandir)/man3 + $(INSTALL) -d $(pkgdatadir)/html + $(INSTALL) html/* $(pkgdatadir)/html + locales = de $(DOC).pdf: $(DOC).sgml $(SGML) diff --git a/python/Makefile.am b/python/Makefile.am index d86b2b7..a037023 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -7,7 +7,7 @@ pycomedi_la_LDFLAGS = -module -avoid-version $(COMEDILIB_LIBS) pyexec_SCRIPTS = comedi.py -EXTRA_DIST = comedi.i +EXTRA_DIST = comedi.i README.txt comedi.py setup.py test_comedi.py install-exec-local: diff --git a/python/comedi.i b/python/comedi.i index 24b8745..9afd540 100644 --- a/python/comedi.i +++ b/python/comedi.i @@ -11,8 +11,8 @@ ***********************************************************/ %module comedi %{ -#include "../comedilib-0.7.19/include/comedi.h" -#include "../comedilib-0.7.19/include/comedilib.h" +#include "../include/comedi.h" +#include "../include/comedilib.h" %} %include "carrays.i" @@ -36,5 +36,5 @@ static unsigned int cr_aref(unsigned int a){ %array_class(unsigned int, chanlist); -%include "../comedilib-0.7.19/include/comedi.h" -%include "../comedilib-0.7.19/include/comedilib.h" +%include "../include/comedi.h" +%include "../include/comedilib.h" diff --git a/python/comedi_wrap.c b/python/comedi_wrap.c index 9a7da01..0fc32c8 100644 --- a/python/comedi_wrap.c +++ b/python/comedi_wrap.c @@ -679,8 +679,8 @@ static swig_type_info *swig_types[27]; #define SWIG_name "_comedi" -#include "../comedilib-0.7.19/include/comedi.h" -#include "../comedilib-0.7.19/include/comedilib.h" +#include "../include/comedi.h" +#include "../include/comedilib.h" static unsigned int cr_pack(unsigned int chan, unsigned int rng, unsigned int aref){ diff --git a/python/setup.py b/python/setup.py index 1c77d1b..4c0c1eb 100644 --- a/python/setup.py +++ b/python/setup.py @@ -3,8 +3,8 @@ from distutils.core import setup, Extension module1 = Extension('_comedi', define_macros = [('MAJOR_VERSION','0'), ('MINOR_VERSION','1')], - include_dirs = ['../comedilib-0.7.19/include'], - library_dirs = ['../comedilib-0.7.19/lib'], + include_dirs = ['../include'], + library_dirs = ['../lib'], libraries = ['comedi'], sources = ['comedi_wrap.c']) -- 2.26.2