2001-04-16 17:16:57 +00:00
|
|
|
dnl
|
|
|
|
dnl Contains the following macros
|
2002-12-04 17:48:10 +00:00
|
|
|
dnl SANE_SET_CFLAGS(is_release)
|
|
|
|
dnl SANE_CHECK_MISSING_HEADERS
|
|
|
|
dnl SANE_SET_LDFLAGS
|
|
|
|
dnl SANE_CHECK_DLL_LIB
|
2001-04-16 17:16:57 +00:00
|
|
|
dnl SANE_CHECK_JPEG
|
2002-04-01 22:49:02 +00:00
|
|
|
dnl SANE_CHECK_IEEE1284
|
2003-10-07 07:38:37 +00:00
|
|
|
dnl SANE_CHECK_PTHREAD
|
2005-04-01 13:54:32 +00:00
|
|
|
dnl SANE_CHECK_LOCKING
|
2001-04-16 17:16:57 +00:00
|
|
|
dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present)
|
2001-04-16 17:23:37 +00:00
|
|
|
dnl SANE_LINKER_RPATH
|
2001-05-26 09:33:25 +00:00
|
|
|
dnl SANE_CHECK_U_TYPES
|
2001-09-10 23:07:15 +00:00
|
|
|
dnl SANE_CHECK_GPHOTO2
|
2003-03-30 19:07:18 +00:00
|
|
|
dnl SANE_CHECK_IPV6
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
dnl SANE_CHECK_BACKENDS
|
2003-01-24 14:06:08 +00:00
|
|
|
dnl SANE_PROTOTYPES
|
2002-01-13 14:44:54 +00:00
|
|
|
dnl AC_PROG_LIBTOOL
|
2001-04-16 17:16:57 +00:00
|
|
|
dnl
|
|
|
|
|
2002-12-04 17:48:10 +00:00
|
|
|
# SANE_SET_CFLAGS(is_release)
|
|
|
|
# Set CFLAGS. Enable/disable compilation warnings if we gcc is used.
|
|
|
|
# Warnings are enabled by default when in development cycle but disabled
|
|
|
|
# when a release is made. The argument is_release is either yes or no.
|
|
|
|
AC_DEFUN([SANE_SET_CFLAGS],
|
|
|
|
[
|
|
|
|
if test "${ac_cv_c_compiler_gnu}" = "yes"; then
|
|
|
|
NORMAL_CFLAGS="\
|
|
|
|
-W \
|
|
|
|
-Wall"
|
|
|
|
WARN_CFLAGS="\
|
|
|
|
-W \
|
|
|
|
-Wall \
|
|
|
|
-Wcast-align \
|
|
|
|
-Wcast-qual \
|
|
|
|
-Wmissing-declarations \
|
|
|
|
-Wmissing-prototypes \
|
|
|
|
-Wpointer-arith \
|
|
|
|
-Wreturn-type \
|
|
|
|
-Wstrict-prototypes \
|
|
|
|
-pedantic"
|
|
|
|
|
|
|
|
# OS/2 and others don't include some headers with -ansi enabled
|
|
|
|
ANSI_FLAG=-ansi
|
|
|
|
case "${host_os}" in
|
2004-04-18 14:35:37 +00:00
|
|
|
solaris* | hpux* | os2* | darwin* )
|
2002-12-04 17:48:10 +00:00
|
|
|
ANSI_FLAG=
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
WARN_CFLAGS="${WARN_CFLAGS} ${ANSI_FLAG}"
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(warnings,
|
|
|
|
AC_HELP_STRING([--enable-warnings],
|
|
|
|
[turn on tons of compiler warnings (GCC only)]),
|
|
|
|
[
|
|
|
|
if eval "test x$enable_warnings = xyes"; then
|
|
|
|
for flag in $WARN_CFLAGS; do
|
|
|
|
JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ])
|
|
|
|
done
|
|
|
|
else
|
|
|
|
for flag in $NORMAL_CFLAGS; do
|
|
|
|
JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ])
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
],
|
|
|
|
[if test x$1 = xno; then
|
|
|
|
# Warnings enabled by default (development)
|
|
|
|
for flag in $WARN_CFLAGS; do
|
|
|
|
JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ])
|
|
|
|
done
|
|
|
|
else
|
|
|
|
# Warnings disabled by default (release)
|
|
|
|
for flag in $NORMAL_CFLAGS; do
|
|
|
|
JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ])
|
|
|
|
done
|
|
|
|
fi])
|
|
|
|
fi # ac_cv_c_compiler_gnu
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl SANE_CHECK_MISSING_HEADERS
|
|
|
|
dnl Do some sanity checks. It doesn't make sense to proceed if those headers
|
|
|
|
dnl aren't present.
|
|
|
|
AC_DEFUN([SANE_CHECK_MISSING_HEADERS],
|
|
|
|
[
|
|
|
|
MISSING_HEADERS=
|
|
|
|
if test "${ac_cv_header_fcntl_h}" != "yes" ; then
|
|
|
|
MISSING_HEADERS="${MISSING_HEADERS}\"fcntl.h\" "
|
|
|
|
fi
|
|
|
|
if test "${ac_cv_header_sys_time_h}" != "yes" ; then
|
|
|
|
MISSING_HEADERS="${MISSING_HEADERS}\"sys/time.h\" "
|
|
|
|
fi
|
|
|
|
if test "${ac_cv_header_unistd_h}" != "yes" ; then
|
|
|
|
MISSING_HEADERS="${MISSING_HEADERS}\"unistd.h\" "
|
|
|
|
fi
|
|
|
|
if test "${ac_cv_header_stdc}" != "yes" ; then
|
|
|
|
MISSING_HEADERS="${MISSING_HEADERS}\"ANSI C headers\" "
|
|
|
|
fi
|
|
|
|
if test "${MISSING_HEADERS}" != "" ; then
|
|
|
|
echo "*** The following essential header files couldn't be found:"
|
|
|
|
echo "*** ${MISSING_HEADERS}"
|
|
|
|
echo "*** Maybe the compiler isn't ANSI C compliant or not properly installed?"
|
|
|
|
echo "*** For details on what went wrong see config.log."
|
|
|
|
AC_MSG_ERROR([Exiting now.])
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
|
|
|
# SANE_SET_LDFLAGS
|
|
|
|
# Add special LDFLAGS
|
|
|
|
AC_DEFUN([SANE_SET_LDFLAGS],
|
|
|
|
[
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
# Define stricter linking policy on GNU systems. This is not
|
|
|
|
# added to global LDFLAGS because we may want to create convenience
|
|
|
|
# libraries that don't require such strick linking.
|
|
|
|
if test "$GCC" = yes; then
|
|
|
|
case ${host_os} in
|
|
|
|
linux* | solaris*)
|
|
|
|
STRICT_LDFLAGS="-Wl,-z,defs"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
AC_SUBST(STRICT_LDFLAGS)
|
2002-12-04 17:48:10 +00:00
|
|
|
case "${host_os}" in
|
|
|
|
aix*) #enable .so libraries, disable archives
|
|
|
|
LDFLAGS="$LDFLAGS -Wl,-brtl"
|
|
|
|
;;
|
2003-04-30 23:00:15 +00:00
|
|
|
darwin*) #include frameworks
|
2003-05-15 11:01:14 +00:00
|
|
|
LIBS="$LIBS -framework CoreFoundation -framework IOKit"
|
2003-04-30 23:00:15 +00:00
|
|
|
;;
|
2002-12-04 17:48:10 +00:00
|
|
|
esac
|
|
|
|
])
|
|
|
|
|
|
|
|
# SANE_CHECK_DLL_LIB
|
|
|
|
# Find dll library
|
|
|
|
AC_DEFUN([SANE_CHECK_DLL_LIB],
|
|
|
|
[
|
|
|
|
dnl Checks for dll libraries: dl
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
DL_LIBS=""
|
2002-12-04 17:48:10 +00:00
|
|
|
if test "${enable_dynamic}" != "no"; then
|
2003-02-11 17:30:21 +00:00
|
|
|
# dlopen
|
|
|
|
AC_CHECK_HEADERS(dlfcn.h,
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
[AC_CHECK_LIB(dl, dlopen, DL_LIBS=-ldl)
|
2003-02-11 17:30:21 +00:00
|
|
|
saved_LIBS="${LIBS}"
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
LIBS="${LIBS} ${DL_LIBS}"
|
2003-02-11 17:30:21 +00:00
|
|
|
AC_CHECK_FUNCS(dlopen, enable_dynamic=yes,)
|
|
|
|
LIBS="${saved_LIBS}"
|
|
|
|
],)
|
|
|
|
# HP/UX DLL handling
|
|
|
|
AC_CHECK_HEADERS(dl.h,
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
[AC_CHECK_LIB(dld,shl_load, DL_LIBS=-ldld)
|
2003-02-11 17:30:21 +00:00
|
|
|
saved_LIBS="${LIBS}"
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
LIBS="${LIBS} ${DL_LIBS}"
|
2003-02-11 17:30:21 +00:00
|
|
|
AC_CHECK_FUNCS(shl_load, enable_dynamic=yes,)
|
|
|
|
LIBS="${saved_LIBS}"
|
|
|
|
],)
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
if test -z "$DL_LIBS" ; then
|
2007-11-10 07:12:55 +00:00
|
|
|
# old Mac OS X/Darwin (without dlopen)
|
|
|
|
AC_CHECK_HEADERS(mach-o/dyld.h,
|
|
|
|
[AC_CHECK_FUNCS(NSLinkModule, enable_dynamic=yes,)
|
|
|
|
],)
|
|
|
|
fi
|
2002-12-04 17:48:10 +00:00
|
|
|
fi
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
AC_SUBST(DL_LIBS)
|
2009-02-01 13:43:26 +00:00
|
|
|
|
|
|
|
DYNAMIC_FLAG=
|
|
|
|
if test "${enable_dynamic}" = yes ; then
|
|
|
|
DYNAMIC_FLAG=-module
|
|
|
|
fi
|
|
|
|
AC_SUBST(DYNAMIC_FLAG)
|
2000-03-05 13:57:25 +00:00
|
|
|
])
|
2000-08-12 15:11:46 +00:00
|
|
|
|
2002-04-01 22:49:02 +00:00
|
|
|
#
|
|
|
|
# Checks for ieee1284 library, needed for canon_pp backend.
|
2002-12-04 17:48:10 +00:00
|
|
|
AC_DEFUN([SANE_CHECK_IEEE1284],
|
2002-04-01 22:49:02 +00:00
|
|
|
[
|
2002-04-12 00:29:57 +00:00
|
|
|
AC_CHECK_HEADER(ieee1284.h, [
|
|
|
|
AC_CACHE_CHECK([for libieee1284 >= 0.1.5], sane_cv_use_libieee1284, [
|
|
|
|
AC_TRY_COMPILE([#include <ieee1284.h>], [
|
|
|
|
struct parport p; char *buf;
|
|
|
|
ieee1284_nibble_read(&p, 0, buf, 1);
|
|
|
|
],
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
[sane_cv_use_libieee1284="yes"; IEEE1284_LIBS="-lieee1284"
|
2002-04-12 00:29:57 +00:00
|
|
|
],[sane_cv_use_libieee1284="no"])
|
2002-04-01 22:49:02 +00:00
|
|
|
],)
|
|
|
|
],)
|
2003-05-08 09:58:14 +00:00
|
|
|
if test "$sane_cv_use_libieee1284" = "yes" ; then
|
|
|
|
AC_DEFINE(HAVE_LIBIEEE1284,1,[Define to 1 if you have the `ieee1284' library (-lcam).])
|
|
|
|
fi
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
AC_SUBST(IEEE1284_LIBS)
|
2002-04-01 22:49:02 +00:00
|
|
|
])
|
|
|
|
|
2003-10-07 07:38:37 +00:00
|
|
|
#
|
|
|
|
# Checks for pthread support
|
|
|
|
AC_DEFUN([SANE_CHECK_PTHREAD],
|
|
|
|
[
|
|
|
|
|
|
|
|
case "${host_os}" in
|
|
|
|
darwin*) # currently only enabled on MacOS X
|
|
|
|
use_pthread=yes
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
use_pthread=no
|
|
|
|
esac
|
|
|
|
|
|
|
|
#
|
|
|
|
# now that we have the systems preferences, we check
|
|
|
|
# the user
|
|
|
|
AC_ARG_ENABLE( [fork-process],
|
|
|
|
AC_HELP_STRING([--enable-fork-process],
|
2003-10-07 11:28:03 +00:00
|
|
|
[use fork instead of pthread (default=no for MacOS X, yes for everything else)]),
|
2003-10-07 07:38:37 +00:00
|
|
|
[
|
|
|
|
if test $enableval != yes ; then
|
|
|
|
use_pthread=yes
|
|
|
|
fi
|
|
|
|
])
|
2005-10-03 13:27:03 +00:00
|
|
|
AC_CHECK_HEADERS(pthread.h,
|
2003-10-07 11:28:03 +00:00
|
|
|
[
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIBS="-lpthread")
|
2005-10-17 17:50:16 +00:00
|
|
|
have_pthread=yes
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
save_LIBS="$LIBS"
|
|
|
|
LIBS="$LIBS $PTHREAD_LIBS"
|
2005-10-16 20:17:19 +00:00
|
|
|
AC_CHECK_FUNCS([pthread_create pthread_kill pthread_join pthread_detach pthread_cancel pthread_testcancel],
|
2005-10-17 17:50:16 +00:00
|
|
|
,[ have_pthread=no; use_pthread=no ])
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
LIBS="$save_LIBS"
|
2003-10-07 07:38:37 +00:00
|
|
|
],)
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
AC_SUBST(PTHREAD_LIBS)
|
2005-10-03 13:27:03 +00:00
|
|
|
|
2003-10-07 11:28:03 +00:00
|
|
|
if test $use_pthread = yes ; then
|
|
|
|
AC_DEFINE_UNQUOTED(USE_PTHREAD, "$use_pthread",
|
|
|
|
[Define if pthreads should be used instead of forked processes.])
|
2005-10-03 13:27:03 +00:00
|
|
|
fi
|
|
|
|
if test "$have_pthread" = "yes" ; then
|
2003-10-17 11:07:42 +00:00
|
|
|
CPPFLAGS="${CPPFLAGS} -D_REENTRANT"
|
2003-10-07 11:28:03 +00:00
|
|
|
fi
|
|
|
|
AC_MSG_CHECKING([whether to enable pthread support])
|
2005-10-17 17:50:16 +00:00
|
|
|
AC_MSG_RESULT([$have_pthread])
|
|
|
|
AC_MSG_CHECKING([whether to use pthread instead of fork])
|
2003-10-07 11:28:03 +00:00
|
|
|
AC_MSG_RESULT([$use_pthread])
|
2003-10-07 07:38:37 +00:00
|
|
|
])
|
2002-04-01 22:49:02 +00:00
|
|
|
|
2000-11-28 20:29:34 +00:00
|
|
|
#
|
2006-05-24 20:56:15 +00:00
|
|
|
# Checks for jpeg library >= v6B (61), needed for DC210, DC240,
|
|
|
|
# GPHOTO2 and dell1600n_net backends.
|
2002-12-04 17:48:10 +00:00
|
|
|
AC_DEFUN([SANE_CHECK_JPEG],
|
2000-11-28 20:29:34 +00:00
|
|
|
[
|
|
|
|
AC_CHECK_LIB(jpeg,jpeg_start_decompress,
|
|
|
|
[
|
|
|
|
AC_CHECK_HEADER(jconfig.h,
|
|
|
|
[
|
|
|
|
AC_MSG_CHECKING([for jpeglib - version >= 61 (6a)])
|
|
|
|
AC_EGREP_CPP(sane_correct_jpeg_lib_version_found,
|
|
|
|
[
|
|
|
|
#include <jpeglib.h>
|
|
|
|
#if JPEG_LIB_VERSION >= 61
|
|
|
|
sane_correct_jpeg_lib_version_found
|
|
|
|
#endif
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
], [sane_cv_use_libjpeg="yes"; JPEG_LIBS="-ljpeg";
|
2000-11-28 20:29:34 +00:00
|
|
|
AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
|
|
|
|
],)
|
|
|
|
],)
|
2009-02-01 15:21:46 +00:00
|
|
|
if test "$sane_cv_use_libjpeg" = "yes" ; then
|
|
|
|
AC_DEFINE(HAVE_LIBJPEG,1,[Define to 1 if you have the libjpeg library.])
|
|
|
|
fi
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
AC_SUBST(JPEG_LIBS)
|
2000-11-28 20:29:34 +00:00
|
|
|
])
|
2001-04-16 17:16:57 +00:00
|
|
|
|
2006-05-24 20:56:15 +00:00
|
|
|
# Checks for tiff library dell1600n_net backend.
|
|
|
|
AC_DEFUN([SANE_CHECK_TIFF],
|
|
|
|
[
|
|
|
|
AC_CHECK_LIB(tiff,TIFFFdOpen,
|
|
|
|
[
|
|
|
|
AC_CHECK_HEADER(tiffio.h,
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
[sane_cv_use_libtiff="yes"; TIFF_LIBS="-ltiff"],)
|
2006-05-24 20:56:15 +00:00
|
|
|
],)
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
AC_SUBST(TIFF_LIBS)
|
2006-05-24 20:56:15 +00:00
|
|
|
])
|
|
|
|
|
2005-04-01 13:54:32 +00:00
|
|
|
#
|
|
|
|
# Checks for pthread support
|
|
|
|
AC_DEFUN([SANE_CHECK_LOCKING],
|
|
|
|
[
|
|
|
|
LOCKPATH_GROUP=uucp
|
|
|
|
use_locking=yes
|
2005-08-08 07:41:10 +00:00
|
|
|
case "${host_os}" in
|
|
|
|
os2* )
|
|
|
|
use_locking=no
|
|
|
|
;;
|
|
|
|
esac
|
2005-04-01 13:54:32 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# we check the user
|
|
|
|
AC_ARG_ENABLE( [locking],
|
|
|
|
AC_HELP_STRING([--enable-locking],
|
|
|
|
[activate device locking (default=yes, but only used by some backends)]),
|
|
|
|
[
|
|
|
|
if test $enableval = yes ; then
|
|
|
|
use_locking=yes
|
|
|
|
else
|
|
|
|
use_locking=no
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
if test $use_locking = yes ; then
|
|
|
|
AC_ARG_WITH([group],
|
|
|
|
AC_HELP_STRING([--with-group],
|
|
|
|
[use the specified group for lock dir @<:@default=uucp@:>@]),
|
|
|
|
[LOCKPATH_GROUP="$withval"]
|
|
|
|
)
|
|
|
|
# check if the group does exist
|
|
|
|
lasterror=""
|
|
|
|
touch sanetest.file
|
2005-07-30 16:39:00 +00:00
|
|
|
chgrp $LOCKPATH_GROUP sanetest.file 2>/dev/null || lasterror=$?
|
2005-04-01 13:54:32 +00:00
|
|
|
rm -f sanetest.file
|
2005-07-30 16:39:00 +00:00
|
|
|
if test ! -z "$lasterror"; then
|
2005-04-11 07:49:14 +00:00
|
|
|
AC_MSG_WARN([Group $LOCKPATH_GROUP does not exist on this system.])
|
|
|
|
AC_MSG_WARN([Locking feature will be disabled.])
|
|
|
|
use_locking=no
|
2005-04-01 13:54:32 +00:00
|
|
|
fi
|
2005-09-07 16:50:02 +00:00
|
|
|
fi
|
|
|
|
if test $use_locking = yes ; then
|
|
|
|
INSTALL_LOCKPATH=install-lockpath
|
|
|
|
AC_DEFINE([ENABLE_LOCKING], 1,
|
|
|
|
[Define to 1 if device locking should be enabled.])
|
2005-04-01 13:54:32 +00:00
|
|
|
else
|
|
|
|
INSTALL_LOCKPATH=
|
|
|
|
fi
|
|
|
|
AC_MSG_CHECKING([whether to enable device locking])
|
|
|
|
AC_MSG_RESULT([$use_locking])
|
|
|
|
if test $use_locking = yes ; then
|
|
|
|
AC_MSG_NOTICE([Setting lockdir group to $LOCKPATH_GROUP])
|
|
|
|
fi
|
|
|
|
AC_SUBST(INSTALL_LOCKPATH)
|
|
|
|
AC_SUBST(LOCKPATH_GROUP)
|
|
|
|
])
|
|
|
|
|
2001-04-16 17:16:57 +00:00
|
|
|
dnl
|
|
|
|
dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present)
|
|
|
|
dnl
|
|
|
|
dnl From Japhar. Report changes to japhar@hungry.com
|
|
|
|
dnl
|
2002-12-04 17:48:10 +00:00
|
|
|
AC_DEFUN([JAPHAR_GREP_CFLAGS],
|
2001-04-16 17:16:57 +00:00
|
|
|
[case "$CFLAGS" in
|
|
|
|
"$1" | "$1 "* | *" $1" | *" $1 "* )
|
|
|
|
ifelse($#, 3, [$3], [:])
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
$2
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
])
|
2001-04-16 17:23:37 +00:00
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl SANE_LINKER_RPATH
|
|
|
|
dnl
|
|
|
|
dnl Detect how to set runtime link path (rpath). Set variable
|
|
|
|
dnl LINKER_RPATH. Typical content will be '-Wl,-rpath,' or '-R '. If
|
|
|
|
dnl set, add '${LINKER_RPATH}${libdir}' to $LDFLAGS
|
|
|
|
dnl
|
|
|
|
|
2002-12-04 17:48:10 +00:00
|
|
|
AC_DEFUN([SANE_LINKER_RPATH],
|
2001-04-16 17:23:37 +00:00
|
|
|
[dnl AC_REQUIRE([AC_SUBST])dnl This line resulted in an empty AC_SUBST() !!
|
2009-02-06 03:10:44 +00:00
|
|
|
AC_CACHE_CHECK([linker parameter to set runtime link path], my_cv_LINKER_RPATH,
|
|
|
|
[my_cv_LINKER_RPATH=
|
2001-04-16 17:23:37 +00:00
|
|
|
case "$host_os" in
|
2001-05-01 19:37:35 +00:00
|
|
|
linux* | freebsd* | netbsd* | openbsd* | irix*)
|
2001-04-16 17:23:37 +00:00
|
|
|
# I believe this only works with GNU ld [pere 2001-04-16]
|
2009-02-06 03:10:44 +00:00
|
|
|
my_cv_LINKER_RPATH="-Wl,-rpath,"
|
2001-04-16 17:23:37 +00:00
|
|
|
;;
|
|
|
|
solaris*)
|
2009-02-06 03:10:44 +00:00
|
|
|
my_cv_LINKER_RPATH="-R "
|
2001-04-16 17:23:37 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
])
|
2009-02-06 03:10:44 +00:00
|
|
|
LINKER_RPATH="$my_cv_LINKER_RPATH"
|
2001-04-16 17:23:37 +00:00
|
|
|
AC_SUBST(LINKER_RPATH)dnl
|
|
|
|
])
|
2001-05-26 09:33:25 +00:00
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl SANE_CHECK_U_TYPES
|
|
|
|
dnl
|
2002-12-04 17:48:10 +00:00
|
|
|
AC_DEFUN([SANE_CHECK_U_TYPES],
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
[
|
|
|
|
dnl Use new style of check types that doesn't take default to use.
|
|
|
|
dnl The old style would add an #undef of the type check on platforms
|
|
|
|
dnl that defined that type... That is not portable to platform that
|
|
|
|
dnl define it as a #define.
|
2009-02-26 03:15:43 +00:00
|
|
|
AC_CHECK_TYPES([u_char, u_int, u_long],,,)
|
2001-05-26 09:33:25 +00:00
|
|
|
])
|
2001-09-10 23:07:15 +00:00
|
|
|
|
|
|
|
#
|
2001-09-13 00:33:36 +00:00
|
|
|
# Checks for gphoto2 libs, needed by gphoto2 backend
|
2002-12-04 17:48:10 +00:00
|
|
|
AC_DEFUN([SANE_CHECK_GPHOTO2],
|
2001-09-10 23:07:15 +00:00
|
|
|
[
|
2001-09-13 00:33:36 +00:00
|
|
|
AC_ARG_WITH(gphoto2,
|
2002-12-04 17:48:10 +00:00
|
|
|
AC_HELP_STRING([--with-gphoto2],
|
2003-12-07 04:28:14 +00:00
|
|
|
[include the gphoto2 backend @<:@default=yes@:>@]),
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
[# If --with-gphoto2=no or --without-gphoto2, disable backend
|
|
|
|
# as "$with_gphoto2" will be set to "no"])
|
2003-12-07 04:28:14 +00:00
|
|
|
|
2004-07-03 18:08:15 +00:00
|
|
|
# If --with-gphoto2=yes (or not supplied), first check if
|
|
|
|
# pkg-config exists, then use it to check if libgphoto2 is
|
|
|
|
# present. If all that works, then see if we can actually link
|
|
|
|
# a program. And, if that works, then add the -l flags to
|
|
|
|
# LIBS and any other flags to GPHOTO2_LDFLAGS to pass to
|
|
|
|
# sane-config.
|
2003-12-07 04:28:14 +00:00
|
|
|
if test "$with_gphoto2" != "no" ; then
|
2004-05-30 18:55:35 +00:00
|
|
|
AC_CHECK_TOOL(HAVE_GPHOTO2, pkg-config, false)
|
2003-12-07 04:28:14 +00:00
|
|
|
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
if test ${HAVE_GPHOTO2} != "false" ; then
|
2004-05-30 18:55:35 +00:00
|
|
|
if pkg-config --exists libgphoto2 ; then
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
with_gphoto2="`pkg-config --modversion libgphoto2`"
|
|
|
|
GPHOTO2_CPPFLAGS="`pkg-config --cflags libgphoto2`"
|
2004-05-30 18:55:35 +00:00
|
|
|
GPHOTO2_LIBS="`pkg-config --libs libgphoto2`"
|
2004-06-19 19:16:54 +00:00
|
|
|
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
saved_CPPFLAGS="${CPPFLAGS}"
|
|
|
|
CPPFLAGS="${GPHOTO2_CPPFLAGS}"
|
2004-06-19 19:16:54 +00:00
|
|
|
saved_LIBS="${LIBS}"
|
2004-05-30 18:55:35 +00:00
|
|
|
LIBS="${LIBS} ${GPHOTO2_LIBS}"
|
2004-06-19 19:16:54 +00:00
|
|
|
# Make sure we an really use the library
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
AC_CHECK_FUNCS(gp_camera_init,
|
|
|
|
HAVE_GPHOTO2=true,
|
|
|
|
HAVE_GPHOTO2=false)
|
|
|
|
CPPFLAGS="${saved_CPPFLAGS}"
|
|
|
|
LIBS="${saved_LIBS}"
|
2004-05-30 18:55:35 +00:00
|
|
|
else
|
|
|
|
HAVE_GPHOTO2=false
|
|
|
|
fi
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
if test "${HAVE_GPHOTO2}" = "false"; then
|
|
|
|
GPHOTO2_CPPFLAGS=""
|
|
|
|
GPHOTO2_LIBS=""
|
2002-10-28 02:51:08 +00:00
|
|
|
fi
|
2003-12-07 04:28:14 +00:00
|
|
|
fi
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
fi
|
|
|
|
AC_SUBST(GPHOTO2_CPPFLAGS)
|
|
|
|
AC_SUBST(GPHOTO2_LIBS)
|
2001-09-10 23:07:15 +00:00
|
|
|
])
|
|
|
|
|
2003-03-30 19:07:18 +00:00
|
|
|
#
|
|
|
|
# Check for AF_INET6, determines whether or not to enable IPv6 support
|
2003-06-04 19:49:48 +00:00
|
|
|
# Check for ss_family member in struct sockaddr_storage
|
2003-03-30 19:07:18 +00:00
|
|
|
AC_DEFUN([SANE_CHECK_IPV6],
|
|
|
|
[
|
2003-04-02 16:21:07 +00:00
|
|
|
AC_MSG_CHECKING([whether to enable IPv6])
|
|
|
|
AC_ARG_ENABLE(ipv6,
|
|
|
|
AC_HELP_STRING([--disable-ipv6],[disable IPv6 support]),
|
|
|
|
[ if test "$enableval" = "no" ; then
|
|
|
|
AC_MSG_RESULT([no, manually disabled])
|
|
|
|
ipv6=no
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
|
|
|
if test "$ipv6" != "no" ; then
|
|
|
|
AC_TRY_COMPILE([
|
2003-03-30 19:07:18 +00:00
|
|
|
#define INET6
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h> ], [
|
|
|
|
/* AF_INET6 available check */
|
|
|
|
if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
|
|
|
|
exit(1);
|
|
|
|
else
|
|
|
|
exit(0);
|
2003-04-02 16:21:07 +00:00
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE([ENABLE_IPV6], 1, [Define to 1 if the system supports IPv6])
|
|
|
|
ipv6=yes
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT([no (couldn't compile test program)])
|
|
|
|
ipv6=no
|
|
|
|
])
|
|
|
|
fi
|
2003-06-04 19:49:48 +00:00
|
|
|
|
|
|
|
if test "$ipv6" != "no" ; then
|
|
|
|
AC_MSG_CHECKING([whether struct sockaddr_storage has an ss_family member])
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#define INET6
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h> ], [
|
|
|
|
/* test if the ss_family member exists in struct sockaddr_storage */
|
|
|
|
struct sockaddr_storage ss;
|
|
|
|
ss.ss_family = AF_INET;
|
|
|
|
exit (0);
|
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE([HAS_SS_FAMILY], 1, [Define to 1 if struct sockaddr_storage has an ss_family member])
|
|
|
|
], [
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#define INET6
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h> ], [
|
|
|
|
/* test if the __ss_family member exists in struct sockaddr_storage */
|
|
|
|
struct sockaddr_storage ss;
|
|
|
|
ss.__ss_family = AF_INET;
|
|
|
|
exit (0);
|
|
|
|
], [
|
|
|
|
AC_MSG_RESULT([no, but __ss_family exists])
|
|
|
|
AC_DEFINE([HAS___SS_FAMILY], 1, [Define to 1 if struct sockaddr_storage has __ss_family instead of ss_family])
|
|
|
|
], [
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
ipv6=no
|
|
|
|
])
|
|
|
|
])
|
|
|
|
fi
|
2003-03-30 19:07:18 +00:00
|
|
|
])
|
|
|
|
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
#
|
|
|
|
# Verifies that values in $BACKENDS and updates FILTERED_BACKEND
|
|
|
|
# with either backends that can be compiled or fails the script.
|
|
|
|
AC_DEFUN([SANE_CHECK_BACKENDS],
|
|
|
|
[
|
|
|
|
if test "${user_selected_backends}" = "yes"; then
|
|
|
|
DISABLE_MSG="aborting"
|
|
|
|
else
|
|
|
|
DISABLE_MSG="disabling"
|
|
|
|
fi
|
|
|
|
|
|
|
|
FILTERED_BACKENDS=""
|
|
|
|
for be in ${BACKENDS}; do
|
|
|
|
backend_supported="yes"
|
|
|
|
case $be in
|
|
|
|
plustek_pp)
|
|
|
|
case "$host_os" in
|
|
|
|
gnu*)
|
|
|
|
echo "*** $be backend not supported on GNU/Hurd - $DISABLE_MSG"
|
|
|
|
backend_supported="no"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
|
|
|
|
dc210|dc240)
|
|
|
|
if test "${sane_cv_use_libjpeg}" != "yes"; then
|
|
|
|
echo "*** $be backend requires JPEG library - $DISABLE_MSG"
|
|
|
|
backend_supported="no"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
canon_pp|hpsj5s)
|
|
|
|
if test "${sane_cv_use_libieee1284}" != "yes"; then
|
|
|
|
echo "*** $be backend requires libieee1284 library - $DISABLE_MSG"
|
|
|
|
backend_supported="no"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
mustek_pp)
|
|
|
|
if test "${sane_cv_use_libieee1284}" != "yes" && test "${enable_parport_directio}" != "yes"; then
|
|
|
|
echo "*** $be backend requires libieee1284 and paraport-directio libraries - DISABLE_MSG"
|
|
|
|
backend_supported="no"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
dell1600n_net)
|
|
|
|
if test "${sane_cv_use_libjpeg}" != "yes" || test "${sane_cv_use_libtiff}" != "yes"; then
|
|
|
|
echo "*** $be backend requires JPEG and/or TIFF library - $DISABLE_MSG"
|
|
|
|
backend_supported="no"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
gphoto2)
|
|
|
|
if test "${HAVE_GPHOTO2}" != "true" \
|
|
|
|
-o "${sane_cv_use_libjpeg}" != "yes"; then
|
|
|
|
echo "*** $be backend requires gphoto2 and JPEG libraries - $DISABLE_MSG"
|
|
|
|
backend_supported="no"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
pint)
|
|
|
|
if test "${ac_cv_header_sys_scanio_h}" = "no"; then
|
|
|
|
echo "*** $be backend requires sys/scanio.h - $DISABLE_MSG"
|
|
|
|
backend_supported="no"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
qcam)
|
|
|
|
if test "${ac_cv_func_ioperm}" = "no" \
|
|
|
|
&& test "${ac_cv_func__portaccess}" = "no"; then
|
|
|
|
echo "*** $be backend requires ioperm and portaccess functions - $DISABLE_MSG"
|
|
|
|
backend_supported="no"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
v4l)
|
|
|
|
if test "${have_linux_ioctl_defines}" != "yes" \
|
|
|
|
|| test "${have_libv4l1}" != "yes"; then
|
|
|
|
echo "*** $be backend requires v4l libraries - $DISABLE_MSG"
|
|
|
|
backend_supported="no"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
net)
|
|
|
|
if test "${ac_cv_header_sys_socket_h}" = "no"; then
|
|
|
|
echo "*** $be backend requires sys/socket.h - $DISABLE_MSG"
|
|
|
|
backend_supported="no"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
mustek_usb2)
|
|
|
|
if test "${have_pthread}" != "yes"; then
|
|
|
|
echo "*** $be backend requires pthread library - $DISABLE_MSG"
|
|
|
|
backend_supported="no"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
if test "${backend_supported}" = "no"; then
|
|
|
|
if test "${user_selected_backends}" = "yes"; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
FILTERED_BACKENDS="${FILTERED_BACKENDS} $be"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
])
|
|
|
|
|
2003-01-24 14:06:08 +00:00
|
|
|
#
|
|
|
|
# Generate prototypes for functions not available on the system
|
|
|
|
AC_DEFUN([SANE_PROTOTYPES],
|
|
|
|
[
|
|
|
|
AH_BOTTOM([
|
|
|
|
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
#ifndef HAVE_U_CHAR
|
|
|
|
#define u_char unsigned char
|
|
|
|
#endif
|
|
|
|
#ifndef HAVE_U_INT
|
|
|
|
#define u_int unsigned int
|
|
|
|
#endif
|
|
|
|
#ifndef HAVE_U_LONG
|
|
|
|
#define u_long unsigned long
|
|
|
|
#endif
|
|
|
|
|
2003-01-24 14:06:08 +00:00
|
|
|
/* Prototype for getenv */
|
|
|
|
#ifndef HAVE_GETENV
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
#define getenv sanei_getenv
|
2003-01-24 14:06:08 +00:00
|
|
|
char * getenv(const char *name);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Prototype for inet_ntop */
|
|
|
|
#ifndef HAVE_INET_NTOP
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
#define inet_ntop sanei_inet_ntop
|
2003-01-24 14:06:08 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
const char * inet_ntop (int af, const void *src, char *dst, size_t cnt);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Prototype for inet_pton */
|
|
|
|
#ifndef HAVE_INET_PTON
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
#define inet_pton sanei_inet_pton
|
2003-01-24 14:06:08 +00:00
|
|
|
int inet_pton (int af, const char *src, void *dst);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Prototype for isfdtype */
|
|
|
|
#ifndef HAVE_ISFDTYPE
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
#define isfdtype sanei_isfdtype
|
2003-01-24 14:06:08 +00:00
|
|
|
int isfdtype(int fd, int fdtype);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Prototype for sigprocmask */
|
|
|
|
#ifndef HAVE_SIGPROCMASK
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
#define sigprocmask sanei_sigprocmask
|
2003-01-24 14:06:08 +00:00
|
|
|
int sigprocmask (int how, int *new, int *old);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Prototype for snprintf */
|
|
|
|
#ifndef HAVE_SNPRINTF
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
#define snprintf sanei_snprintf
|
2003-01-24 14:06:08 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
int snprintf (char *str,size_t count,const char *fmt,...);
|
|
|
|
#endif
|
|
|
|
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
/* Prototype for strcasestr */
|
|
|
|
#ifndef HAVE_STRCASESTR
|
|
|
|
#define strcasestr sanei_strcasestr
|
2009-02-02 03:17:32 +00:00
|
|
|
char * strcasestr (const char *phaystack, const char *pneedle);
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
#endif
|
|
|
|
|
2003-01-24 14:06:08 +00:00
|
|
|
/* Prototype for strdup */
|
|
|
|
#ifndef HAVE_STRDUP
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
#define strdup sanei_strdup
|
2003-01-24 14:06:08 +00:00
|
|
|
char *strdup (const char * s);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Prototype for strndup */
|
|
|
|
#ifndef HAVE_STRNDUP
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
#define strndup sanei_strndup
|
2003-01-24 14:06:08 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
char *strndup(const char * s, size_t n);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Prototype for strsep */
|
|
|
|
#ifndef HAVE_STRSEP
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
#define strsep sanei_strsep
|
2003-01-24 14:06:08 +00:00
|
|
|
char *strsep(char **stringp, const char *delim);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Prototype for usleep */
|
|
|
|
#ifndef HAVE_USLEEP
|
2009-02-02 03:17:32 +00:00
|
|
|
#define usleep sanei_usleep
|
2003-01-24 14:06:08 +00:00
|
|
|
unsigned int usleep (unsigned int useconds);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Prototype for vsyslog */
|
|
|
|
#ifndef HAVE_VSYSLOG
|
* acinclude.m4, configure.in: Put all libraries into their
own *_LIB variables instead of $LIB so that we do not have to
link in the world to all executables. Modified SANE_CHECK_U_TYPES
to be a little more portable to platforms that use #define
for u_* types. Create SANE_CHECK_BACKENDS macro so that
PRELOADABLE_BACKENDS can also be valided. Auto-populated
PRELAODABLE_BACKENDS when detect dlopen() won't work.
Various protability cleanups.
* backend/dll.c: Make dll-preload.c a .h since its an include and
not compilable byitself.
* frontend/Makefile.in, frontend/scanimage.c, include/laaloca.h,
lib/Makefile.am, lib/alloca.c, strcasestr.c, tools/Makefile.in,
tools/sane-desc.c: Convert lib/ to automake. Create a liblib.la
for everyone to use and a libfelib.la for only frontend programs.
Make all internal programs be prefixed with sanei_ as not to conflict
with other programs libsane is linked in with that will also most
likely create similar internal utils on problem platforms.
* include/getopt.h, lib/getopt.c, lib/getopt1.c: Always compile
and link in getopt_long() but prefix it with sanei_. Its
easier to always use internal version then try to figure out what
platforms support getopt_long() and what header files to use.
* backend/Makefile.am: Convert backend makefile to automake.
Initial version that is feature parity with original but uses
specific rules instead of wildcards and only links in libraries/objs
really required. Room for more cleanup of whats linked in once
all makefiles have been converted to automake.
2009-01-31 03:12:18 +00:00
|
|
|
#define vsyslog sanei_vsyslog
|
2003-01-24 14:06:08 +00:00
|
|
|
#include <stdarg.h>
|
|
|
|
void vsyslog(int priority, const char *format, va_list args);
|
|
|
|
#endif
|
|
|
|
])
|
|
|
|
])
|
2002-01-13 14:44:54 +00:00
|
|
|
|
2007-11-10 07:12:55 +00:00
|
|
|
m4_include([m4/libtool.m4])
|
2007-01-20 09:55:10 +00:00
|
|
|
m4_include([m4/byteorder.m4])
|
|
|
|
m4_include([m4/stdint.m4])
|