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 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT([linux-gpib-user],[4.3.7])
# libtool version: current:revision:age
#
# If the library source code has changed at all since the last update, then
# increment revision (`c:r:a' becomes `c:r+1:a').
#
# If any interfaces have been added, removed, or changed since the last update,
# increment current, and set revision to 0.
#
# If any interfaces have been added since the last public release, then
# increment age.
#
# If any interfaces have been removed since the last public release, then set
# age to 0.
GPIB_SO_VERSION=4:0:4
AC_CONFIG_SRCDIR([lib/ibask.c])
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
AC_CONFIG_MACRO_DIR([m4])
dnl create a config.h file (Automake will add -DHAVE_CONFIG_H)
AC_CONFIG_HEADERS([config.h])
AC_SUBST([VERSION])
AC_SUBST([GPIB_SO_VERSION])
[ISODATE=`date +%Y-%m-%d`]
AC_SUBST([ISODATE])
AC_CANONICAL_HOST
AC_ENABLE_SHARED([yes])
AC_ENABLE_STATIC([no])
AC_ARG_ENABLE([all-bindings],[ --disable-all-bindings Disable all language binding to libgpib],
[BINDING_DEFAULT=$enableval],[BINDING_DEFAULT="yes"])
AC_ARG_ENABLE([guile-binding],[ --disable-guile-binding Disable Guile binding to libgpib],
[BIND_GUILE=$enableval],[BIND_GUILE=$BINDING_DEFAULT])
AC_ARG_ENABLE([perl-binding],[ --disable-perl-binding Disable Perl binding to libgpib],
[BIND_PERL=$enableval],[BIND_PERL=$BINDING_DEFAULT])
AC_ARG_ENABLE([php-binding],[ --disable-php-binding Disable PHP binding to libgpib],
[BIND_PHP=$enableval],[BIND_PHP=$BINDING_DEFAULT])
AC_ARG_ENABLE([python-binding],[ --disable-python-binding Disable Python binding to libgpib],
[BIND_PYTHON=$enableval],[BIND_PYTHON=$BINDING_DEFAULT])
AC_ARG_ENABLE([tcl-binding],[ --disable-tcl-binding Disable TCL binding to libgpib],
[BIND_TCL=$enableval],[BIND_TCL=$BINDING_DEFAULT])
AC_ARG_ENABLE([documentation],[ --disable-documentation Disable building pdf documentation from SGML sources],
[BUILD_DOCS=$enableval],[BUILD_DOCS="yes"])
AC_ARG_ENABLE([html-docs],[ --disable-html-docs Disable building html documentation from SGML sources],
[BUILD_HTML=$enableval],[BUILD_HTML="yes"])
AC_ARG_ENABLE([manpages],[ --disable-manpages Disable building man pages from SGML sources],
[BUILD_MANPAGES=$enableval],[BUILD_MANPAGES="yes"])
dnl udev lib dir
AC_ARG_WITH([udev-libdir],
[AS_HELP_STRING([--with-udev-libdir=DIR], [location to install udev scripts [PREFIX/lib/udev]])],
[UDEV_LIBDIR=$withval], [UDEV_LIBDIR='${prefix}'/lib/udev])
AC_SUBST([UDEV_LIBDIR])
dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_CC
AM_PROG_CC_C_O
dnl Cannot use AM_PROG_LEX since it does not pass the [noyywrap] option
AC_PROG_LEX([noyywrap])
if test "$LEX" = ":" ; then
LEX="$SHELL "$srcdir"/../missing flex"
fi
AM_MISSING_PROG(YACC,bison)
LT_INIT
#docs and manpages
AC_PATH_PROGS([SGML2PDF_PATH], [dblatex jw], [no])
if test "$SGML2PDF_PATH" = "no" ; then
AC_MSG_NOTICE([docbook-tools neither dblatex nor jw found, disabling pdf documentation])
BUILD_DOCS="no"
fi
AC_PATH_PROG([JW_PATH], [jw], [no])
if test "$JW_PATH" = "no" ; then
AC_MSG_NOTICE([docbook-tools jw not found, disabling html documentation])
BUILD_HTML="no"
fi
# look for manpage xsl file in various locations
AC_CHECK_FILE(/usr/share/sgml/docbook/xsl-ns-stylesheets/manpages/docbook.xsl, AC_SUBST([DOCBOOK_XSL],
["/usr/share/sgml/docbook/xsl-ns-stylesheets/manpages/docbook.xsl"]))
AC_CHECK_FILE(/usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl, AC_SUBST([DOCBOOK_XSL],
["/usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl"]))
AC_CHECK_FILE(/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/manpages/docbook.xsl, AC_SUBST([DOCBOOK_XSL],
["/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/manpages/docbook.xsl"]))
AC_PATH_PROGS([SGML2XML_PATH], [sgml2xml osx], [no])
AC_PATH_PROG([XSLTPROC_PATH], [xsltproc], [no])
if test "$SGML2XML_PATH" = "no" || test "$XSLTPROC_PATH" = "no" || test -z $DOCBOOK_XSL ; then
AC_MSG_NOTICE([sgml-man tools not found, disabling building man pages])
BUILD_MANPAGES="no"
fi
if test "$BIND_PYTHON" = "yes"; then
AM_PATH_PYTHON([3.0],,[:])
if test "$PYTHON" = :; then
AC_MSG_NOTICE([no usable python found, disabling python binding])
BIND_PYTHON="no"
fi
fi
if test "$BIND_PERL" = "yes"; then
AC_PATH_PROG([PERL], [perl], [no], [])
if test "$PERL" = "no"; then
AC_MSG_NOTICE([perl not found, disabling perl binding])
BIND_PERL="no"
fi
fi
if test "$BIND_TCL" = "yes"; then
SC_PATH_TCLCONFIG
if [[ $no_tcl ]]; then
AC_MSG_NOTICE([TCL config not found, disabling TCL binding])
BIND_TCL="no"
else
SC_LOAD_TCLCONFIG
fi
fi
if test "$BIND_PHP" = "yes"; then
AC_PATH_PROG([PHP_CONFIG], [php-config], [no],[])
if test "$PHP_CONFIG" = "no"; then
AC_MSG_NOTICE([php-config not found, disabling PHP binding])
BIND_PHP="no"
fi
else
PHP_CONFIG="no"
fi
dnl Checks for libraries.
if test "$BIND_GUILE" = "yes"; then
AC_CHECK_LIB([guile],[gh_define],[echo this prevents default actions from occurring > /dev/null],
[BIND_GUILE="no";AC_MSG_NOTICE([libguile not found, disabling guile binding])],[])
fi
AC_CHECK_LIB([readline], [readline],
[readline_lib=yes;AC_SUBST([LIB_READLINE_LDFLAGS], ["-lreadline -lncurses"])],
[],
[-lncurses])
dnl Checks for header files.
AC_CHECK_HEADERS(unistd.h sys/param.h sys/time.h time.h sys/mkdev.h sys/sysmacros.h string.h memory.h fcntl.h dirent.h sys/ndir.h ndir.h alloca.h locale.h )
if test "$BIND_PYTHON" = "yes"; then
AM_CHECK_PYTHON_HEADERS([],[BIND_PYTHON=no;AC_MSG_NOTICE([python headers not found, disabling python binding])])
fi
if test "$BIND_GUILE" = "yes"; then
AC_CHECK_HEADER([libguile.h],[],[BIND_GUILE="no";AC_MSG_NOTICE([libguile headers not found, disabling guile binding])])
fi
AC_CHECK_HEADER(readline/readline.h,[readline_h=yes])
AC_CHECK_HEADER(readline/history.h,[history_h=yes])
if test "$readline_lib" = "yes" && test "$readline_h" = "yes" && test "$history_h" = "yes"; then
AC_SUBST([LIB_READLINE_CFLAGS], ["-DREADLINE"])
fi
if test "$BIND_TCL" != "no"; then
SAVE_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC"
AC_CHECK_HEADER([tcl.h],[],[BIND_TCL="no";AC_MSG_NOTICE([TCL headers not found, disabling TCL binding])])
CPPFLAGS=$SAVE_CPPFLAGS
fi
if test "$PHP_CONFIG" != "no"; then
SAVE_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $($PHP_CONFIG --includes) -D_GNU_SOURCE"
AC_CHECK_HEADER([php.h],[],[BIND_PHP="no";AC_MSG_NOTICE([PHP headers not found, disabling PHP binding])])
CPPFLAGS=$SAVE_CPPFLAGS
fi
AC_HEADER_MAJOR
AC_FUNC_ALLOCA
AC_STRUCT_TM
AC_STRUCT_ST_BLOCKS
AC_FUNC_CLOSEDIR_VOID
AC_CHECK_FUNCS([mkfifo])
AC_CHECK_FUNC([mknod])
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for library functions.
LIBGPIB_CFLAGS="-I\$(top_srcdir)/include -D_REENTRANT"
LIBGPIB_LDFLAGS="\$(top_builddir)/lib/libgpib.la -lpthread"
AC_SUBST([LIBGPIB_CFLAGS])
AC_SUBST([LIBGPIB_LDFLAGS])
IBMAJOR=160
AC_SUBST([IBMAJOR])
AC_DEFINE([IBMAJOR],[160],[Major number of device files])
echo
echo Configuration:
AM_CONDITIONAL([BUILD_DOCS], [test "$BUILD_DOCS" = "yes"])
echo "pdf documentation: $BUILD_DOCS"
AM_CONDITIONAL([BUILD_HTML], [test "$BUILD_HTML" = "yes"])
echo "html documentation: $BUILD_HTML"
AM_CONDITIONAL([BUILD_MANPAGES], [test "$BUILD_MANPAGES" = "yes"])
echo "man pages: $BUILD_MANPAGES"
AM_CONDITIONAL([BIND_GUILE], [test "$BIND_GUILE" = "yes"])
echo "Guile binding: $BIND_GUILE"
AM_CONDITIONAL([BIND_PERL], [test "$BIND_PERL" = "yes"])
echo "Perl binding: $BIND_PERL"
AM_CONDITIONAL([BIND_PHP], [test "$BIND_PHP" = "yes"])
echo "PHP binding: $BIND_PHP"
AM_CONDITIONAL([BIND_PYTHON], [test "$BIND_PYTHON" = "yes"])
echo "Python binding: $BIND_PYTHON"
AM_CONDITIONAL([BIND_TCL], [test "$BIND_TCL" = "yes"])
echo "TCL binding: $BIND_TCL"
AX_DEFINE_DIR([SYSCONFDIR], [sysconfdir], [System configuration directory])
AS_ECHO "sysconfdir: [$SYSCONFDIR]"
AS_ECHO ""
AC_CONFIG_FILES([\
Makefile \
drivers/Makefile \
lib/Makefile \
lib/libgpib.pc \
lib/gpib_config/Makefile \
examples/Makefile \
test/Makefile \
doc/Makefile \
include/Makefile \
include/gpib/Makefile \
language/Makefile \
language/guile/Makefile \
language/php/Makefile \
language/php/TESTS/Makefile \
language/python/Makefile \
language/tcl/Makefile \
usb/Makefile \
usb/ni_usb_gpib/Makefile \
usb/agilent_82357a/Makefile \
usb/lpvo_usb_gpib/Makefile \
])
AC_OUTPUT
|