From 809c67120998c06f21372d4e8a97d6749e576fb5 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Sun, 8 May 2005 19:42:23 +0000 Subject: [PATCH] remove double code (ALL HAIL CVS), and check lockdev before ttylock (new AC_CHECK_HEADER semantics since autoconf 2.56) git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@7979 67ed7778-7388-44ab-90cf-0a291f65f57c --- libgphoto2_port/configure.in | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/libgphoto2_port/configure.in b/libgphoto2_port/configure.in index f6447e606..2cfb6b2e3 100644 --- a/libgphoto2_port/configure.in +++ b/libgphoto2_port/configure.in @@ -128,16 +128,6 @@ AC_CHECK_HEADERS(stdlib.h unistd.h stdio.h fcntl.h errno.h sys/time.h \ fcntl.h sgtty.h sys/ioctl.h sys/time.h termio.h unistd.h \ endian.h byteswap.h asm/io.h) -dnl FIXME: Provide regex.h with the corresponding object code for -dnl platforms which do not have it. -AC_CHECK_HEADER([regex.h], - [AC_DEFINE([HAVE_REGEX],1,[whether we have regex.h])], - [AC_MSG_ERROR([ -*** We need regex.h and its object code to compile -*** But we could not find it. -]) -]) - dnl FIXME: Provide regex.h with the corresponding object code for dnl platforms which do not have it, e.g. Windows. AC_CHECK_HEADER([regex.h], @@ -245,7 +235,8 @@ GP_CONFIG_MSG([baudboy locking],[${baudboy_msg}]) ttylock_msg=no if $try_ttylock; then - AC_CHECK_HEADER(ttylock.h,[ + AC_CHECK_HEADER([lockdev.h]) + AC_CHECK_HEADER([ttylock.h],[ lockdev_result="no" AC_TRY_LINK([#include ],[ttylocked ("/dev/foo");],[ lockdev_result="no" @@ -263,6 +254,9 @@ if $try_ttylock; then ]) AC_MSG_CHECKING([if ttylock needs lockdev]) AC_MSG_RESULT([${lockdev_result}]) + ],[],[#ifdef HAVE_LOCKDEV_H +# include +#endif ]) fi GP_CONFIG_MSG([ttylock locking],[${ttylock_msg}])