Hello,

- What is your environment (OS)?
FreeBSD 13
- Which version of Global are you using?
6.6.9
- What did you do?
./configure
- What did you expect from it?
Automatically detect that pread() and pwrite() are available.
- What was occurred?
Currently, '--with-pread-pwrite' has to be manually specified.

Attached patched makes autoconf automatically probe for pread()/pwrite() (and 
update 'config.h.in' accordingly).

Regards.

-- 
Olivier Certner
--- configure.ac	11 Dec 2022 15:36:48 -0000	1.212
+++ configure.ac	4 Apr 2023 18:59:53 -0000
@@ -132,7 +179,8 @@
 AC_CHECK_FUNCS(getcwd putenv lstat snprintf)
 AC_CHECK_FUNCS(index rindex bzero bcmp bcopy strchr strrchr memset memcmp memmove)
 AC_CHECK_FUNCS(putc_unlocked getc_unlocked)
 AC_CHECK_FUNCS(gettimeofday getrusage)
+AC_CHECK_FUNCS(pread pwrite)
 AC_DJGPP
 
 AC_ARG_ENABLE(gtagscscope,
@@ -284,24 +332,6 @@
 ])
 
 dnl
-dnl for pread/pwrite support
-dnl
-AC_MSG_CHECKING(for pread/pwrite support)
-AC_ARG_WITH(pread-pwrite,
-[  --with-pread-pwrite     include pread/pwrite support for BSD db library ],
-[
-        if test "$withval" = no; then
-                AC_MSG_RESULT(no)
-        else
-		AC_DEFINE(HAVE_PREAD, 1, [Define to 1 if you have and use pread.])
-		AC_DEFINE(HAVE_PWRITE, 1, [Define to 1 if you have and use pwrite.])
-                AC_MSG_RESULT([yes])
-        fi
-],[
-        AC_MSG_RESULT(no)
-])
-
-dnl
 dnl for Exuberant ctags plug-in parser.
 dnl
 AC_MSG_CHECKING(for exuberant ctags program)

Reply via email to