Fixes to make python and docs build correctly
authorDavid Schleef <ds@schleef.org>
Wed, 4 Jun 2003 02:42:08 +0000 (02:42 +0000)
committerDavid Schleef <ds@schleef.org>
Wed, 4 Jun 2003 02:42:08 +0000 (02:42 +0000)
Makefile.am
configure.ac
doc/Makefile.am
python/Makefile.am
python/comedi.i
python/comedi_wrap.c
python/setup.py

index c79d188d0a7e5151090071a0a92c03593ecdf3ae..61b56816f3032e1f16e782fb2f593aae32277a69 100644 (file)
@@ -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
index 5df9d65d6585aeb9ef3f81a9b5719f4f44fbdb0d..5a0ddb40c0d0d6e7709328e03bef16c71157c8b2 100644 (file)
@@ -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
 )
 
index 51e09d66156ffefbeb0c7abac433b775d2505ecf..6f3552b71b7251df5d3d53f306007a18d742595d 100644 (file)
@@ -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)
index d86b2b71e8790d4d2d0fb2c84adcee617deb28df..a03702308be34a882eab5ace723f87ee94b012b7 100644 (file)
@@ -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:
 
index 24b8745d5f383c5866b945b7da1393c0eb7f37ef..9afd540154ac4bafd0d24de132977a43fb978111 100644 (file)
@@ -11,8 +11,8 @@
 ***********************************************************/
 %module comedi
 %{
-#include "../comedilib-0.7.19/include/comedi.h"
-#include "../comedilib-0.7.19/include/comedilib.h"\r
+#include "../include/comedi.h"
+#include "../include/comedilib.h"\r
 %}
 %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"
index 9a7da01554c521ab1593c2781acaec9a0d8a99c2..0fc32c8dd496dea86c45a646e57fd9c84ab0c59f 100644 (file)
@@ -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){
index 1c77d1b9c97f36e6688247c8d03971cd99807acc..4c0c1ebd0fb9d07a6c9cdf155285016952b94a81 100644 (file)
@@ -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'])