File: configure.ac

package info (click to toggle)
comedilib 0.7.22-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 5,348 kB
  • ctags: 2,465
  • sloc: ansic: 16,316; sh: 8,492; ruby: 1,360; makefile: 325; yacc: 262; perl: 257; lex: 79; python: 59
file content (156 lines) | stat: -rw-r--r-- 4,448 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156

AC_INIT
AC_CANONICAL_TARGET([])

AC_CONFIG_AUX_DIR([.])
AS_VERSION(comedilib, COMEDILIB, 0, 7, 22)
#COMEDILIB_DEBUG="-Wall -Werror"
COMEDILIB_DEBUG="-Wall"
AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
AS_LIBTOOL(COMEDILIB, 0, 7, 18, yes)

AM_CONFIG_HEADER(config.h)

ACLOCAL="$ACLOCAL -I m4"

AM_MAINTAINER_MODE

AC_PROG_CC
AM_PROG_CC_STDC
AC_ISC_POSIX
AM_PROG_LEX
AC_PROG_YACC

AC_HEADER_STDC([])

COMEDILIB_CFLAGS="$COMEDILIB_CFLAGS -I\$(top_srcdir)/include $COMEDILIB_DEBUG"
COMEDILIB_LIBS="$COMEDILIB_LIBS \$(top_builddir)/lib/libcomedi.la -lm"
AC_SUBST(COMEDILIB_CFLAGS)
AC_SUBST(COMEDILIB_LIBS)

#swig
AC_PATH_PROG(SWIG, swig, "no")
if test "$SWIG" == "no" ; then
	AC_MSG_WARN([swig not found, will not be able to build swig based bindings])
fi

#python
AC_ARG_ENABLE([python-binding],[  --disable-python-binding	Disable building of Python binding],
	[ENABLE_PYTHON=$enableval],[ENABLE_PYTHON="yes"])
if test "$ENABLE_PYTHON" == "yes" && test "$SWIG" != "no"; then
	AM_PATH_PYTHON
	AM_CHECK_PYTHON_HEADERS(HAVE_PYTHON=yes,[HAVE_PYTHON=no;AC_MSG_WARN([python headers not found, disabling python binding])])
else
	HAVE_PYTHON="no"
fi
AM_CONDITIONAL(HAVE_PYTHON, [test "$HAVE_PYTHON" == "yes" && test "$ENABLE_PYTHON" == "yes"])

AS_COMPILER_FLAG([-fno-strict-aliasing],[PYTHON_QUIET="$PYTHON_QUIET -fno-strict-aliasing"], true )
AS_COMPILER_FLAG([-Wno-unused-function],[PYTHON_QUIET="$PYTHON_QUIET -Wno-unused-function"], true )
AC_SUBST(PYTHON_QUIET)

# ruby
AC_ARG_ENABLE([ruby-binding], [  --disable-ruby-binding	Disable building of Ruby binding],
	[ENABLE_RUBY=$enableval], [ENABLE_RUBY="yes"])
if test "$ENABLE_RUBY" == "yes" && test "$SWIG" != "no"; then
	AC_PATH_PROG(RUBY, ruby, no)
	if test "$RUBY" != "no" ; then
		RUBY_INC_DIR=`$RUBY -e "require 'rbconfig'; c = ::Config::CONFIG; print c[['archdir']];"`
		AC_CHECK_HEADER([$RUBY_INC_DIR/ruby.h],[],[ENABLE_RUBY="no";AC_MSG_WARN([ruby.h not found, disabling Ruby binding])])
	else
		AC_MSG_WARN([ruby not found, disabling ruby binding])
		ENABLE_RUBY="no"
	fi
else
	ENABLE_RUBY="no"
fi

AM_CONDITIONAL(HAVE_RUBY, [test "$ENABLE_RUBY" == "yes"])

AC_ARG_VAR(RUBY_PREFIX,[path prefix for Ruby binding])
AC_ARG_VAR(RUBY_SO_DIR,[path for Ruby extensions])
if test "$RUBY_PREFIX" != "" ; then
	RUBY_CONFIG_OPTIONS="$RUBY_CONFIG_OPTIONS --prefix=\$(RUBY_PREFIX)"
fi
if test "$RUBY_SO_DIR" != "" ; then
	RUBY_CONFIG_OPTIONS="$RUBY_CONFIG_OPTIONS --so-dir=\$(RUBY_SO_DIR)"
fi
AC_SUBST(RUBY_CONFIG_OPTIONS)

# scxi
AC_ARG_ENABLE([scxi], [  --enable-scxi  Enable SCXI convenience library],
	[ENABLE_SCXI=$enableval], [ENABLE_SCXI="no"])
AM_CONDITIONAL(BUILD_SCXI, [test "$ENABLE_SCXI" == "yes"])

# docbook
AC_ARG_ENABLE([docbook-binding],[  --disable-docbook-binding        Disable docbook],[ENABLE_DOCBOOK=$enableval],[ENABLE_DOCBOOK="yes"])

if test "$ENABLE_DOCBOOK" == "yes"; then
	AC_PATH_PROG(DOCBOOK2MAN, docbook2man, no)
	if test "$DOCBOOK2MAN" = "no" ; then
  		AC_MSG_WARN([docbook2man not found, will not be able to rebuild man pages])
	fi
else
	DOCBOOK2MAN="no"
fi
AM_CONDITIONAL(HAVE_DOCBOOK2MAN, [test "$DOCBOOK2MAN" != "no"])

if test "$ENABLE_DOCBOOK" == "yes"; then
	AC_PATH_PROG(DOCBOOK2PDF, docbook2pdf, no)
	if test "$DOCBOOK2PDF" = "no" ; then
		AC_MSG_WARN([docbook2pdf not found, will not be able to rebuild pdf documentation])
	fi
else
	DOCBOOK2PDF="no"
fi
AM_CONDITIONAL(HAVE_DOCBOOK2PDF, [test "$DOCBOOK2PDF" != "no"])


if test "$ENABLE_DOCBOOK" == "yes"; then
	AC_PATH_PROG(DOCBOOK2HTML, docbook2html, no)
	if test "$DOCBOOK2HTML" = "no" ; then
		AC_MSG_WARN([docbook2html not found, will not be able to rebuild html documentation])
	fi
else
	DOCBOOK2HTML="no"
fi
AM_CONDITIONAL(HAVE_DOCBOOK2HTML, [test "$DOCBOOK2HTML" != "no"])


pcmciadir="\${sysconfdir}/pcmcia"
AC_SUBST(pcmciadir)

#see: http://linux-hotplug.sourceforge.net/
#the hotplug expects the device dependent scripts here:
usbhotplugdir="\${sysconfdir}/hotplug/usb"
AC_SUBST(usbhotplugdir)

#firmware for the hotplug script
#see: http://linux-hotplug.sourceforge.net/
usbfirmwaredir="\${datadir}/usb"
AC_SUBST(usbfirmwaredir)

AC_CONFIG_FILES(
Makefile
comedi_calibrate/Makefile
comedi_config/Makefile
etc/Makefile
etc/pcmcia/Makefile
etc/hotplug/Makefile
etc/hotplug/usb/Makefile
etc/hotplug/usb/usbdux/Makefile
doc/Makefile
demo/Makefile
include/Makefile
lib/Makefile
man/Makefile
scxi/Makefile
swig/Makefile
swig/python/Makefile
swig/ruby/Makefile
testing/Makefile
comedilib.spec
comedilib.pc
)

AC_OUTPUT