2001-10-04 Lutz M�ller <urc8@rz.uni-karlsruhe.de>
* acconfig.h:
* configure.in:
* serial/unix.c: Use baudboy.h if available (Red Hat)
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2373 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2001-10-04 Lutz Müller <urc8@rz.uni-karlsruhe.de>
|
||||
|
||||
* acconfig.h:
|
||||
* configure.in:
|
||||
* serial/unix.c: Use baudboy.h if available (Red Hat)
|
||||
|
||||
2001-10-04 Lutz Müller <urc8@rz.uni-karlsruhe.de>
|
||||
|
||||
Thanks to Bill Richardson <bill@riverstonenet.com>:
|
||||
|
||||
@@ -14,5 +14,6 @@
|
||||
#undef HAVE_RTS_IOCTL
|
||||
|
||||
/* Serial port locking */
|
||||
#undef HAVE_BAUDBOY
|
||||
#undef HAVE_TTYLOCK
|
||||
#undef HAVE_LOCKDEV
|
||||
|
||||
@@ -74,13 +74,21 @@ IOLIB_CFLAGS="-DGP_PORT_SUPPORTED_SERIAL"
|
||||
|
||||
dnl -----------------------------------------
|
||||
dnl Serial port locking: We try to use either
|
||||
dnl (1) ttylock.h
|
||||
dnl (2) lockdev.h
|
||||
dnl (1) baudboy.h
|
||||
dnl (2) ttylock.h
|
||||
dnl (3) lockdev.h
|
||||
dnl -----------------------------------------
|
||||
baudboy_msg=no
|
||||
ttylock_msg=no
|
||||
lockdev_msg=no
|
||||
try_baudboy_msg=true
|
||||
try_ttylock=true
|
||||
try_lockdev=true
|
||||
AC_ARG_WITH(baudboy, [ --without-baudboy Use baudboy library],
|
||||
if test x$withval = xno; then
|
||||
try_baudboy=false
|
||||
fi
|
||||
)
|
||||
AC_ARG_WITH(ttylock, [ --without-ttylock Use ttylock library],
|
||||
if test x$withval = xno; then
|
||||
try_ttylock=false
|
||||
@@ -91,6 +99,14 @@ AC_ARG_WITH(lockdev, [ --without-lockdev Use lockdev library],
|
||||
try_lockdev=false
|
||||
fi
|
||||
)
|
||||
if $try_baudboy; then
|
||||
AC_CHECK_HEADER(baudboy.h,
|
||||
baudboy_msg=yes
|
||||
try_ttylock=false
|
||||
try_lockdev=false
|
||||
AC_DEFINE(HAVE_BAUDBOY)
|
||||
)
|
||||
fi
|
||||
if $try_ttylock; then
|
||||
AC_CHECK_HEADER(ttylock.h,
|
||||
AC_MSG_CHECKING(if ttylock needs lockdev)
|
||||
@@ -200,6 +216,7 @@ Configuration
|
||||
Source code location: ${srcdir}
|
||||
Compiler: ${CC}
|
||||
|
||||
Use baudboy: $baudboy_msg
|
||||
Use ttylock: $ttylock_msg
|
||||
Use lockdev: $lockdev_msg
|
||||
"
|
||||
|
||||
@@ -50,7 +50,9 @@
|
||||
#include <sgtty.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_TTYLOCK
|
||||
#if HAVE_BAUDBOY
|
||||
# include <baudboy.h>
|
||||
#elif HAVE_TTYLOCK
|
||||
# include <ttylock.h>
|
||||
#elif HAVE_LOCKDEV
|
||||
# include <lockdev.h>
|
||||
@@ -138,7 +140,7 @@ gp_port_operations *gp_port_library_operations () {
|
||||
static int
|
||||
gp_port_serial_lock (gp_port *dev)
|
||||
{
|
||||
#if HAVE_TTYLOCK
|
||||
#if HAVE_TTYLOCK || HAVE_BAUDBOY
|
||||
const char *port;
|
||||
|
||||
port = strchr (dev->settings.serial.port, ':');
|
||||
@@ -295,7 +297,7 @@ gp_port_serial_lock (gp_port *dev)
|
||||
static int
|
||||
gp_port_serial_unlock (gp_port *dev)
|
||||
{
|
||||
#if HAVE_TTYLOCK
|
||||
#if HAVE_TTYLOCK || HAVE_BAUDBOY
|
||||
const char *port;
|
||||
|
||||
port = strchr (dev->settings.serial.port, ':');
|
||||
|
||||
Reference in New Issue
Block a user