Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7791e8c

Browse files
committed
Improve getopt and readline support, from Peter Eisentraut.
1 parent1696dd1 commit7791e8c

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

‎src/configure.in

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,9 +583,10 @@ for curses in ncurses curses ; do
583583
[LIBS="-l${curses} $LIBS"; break])
584584
done
585585
AC_CHECK_LIB(termcap, main)
586-
AC_CHECK_LIB(history, main)
587586
AC_CHECK_LIB(readline, main)
588-
AC_CHECK_LIB(readline, write_history, AC_DEFINE(HAVE_HISTORY))
587+
AC_CHECK_LIB(readline, using_history, AC_DEFINE(HAVE_HISTORY_IN_READLINE),
588+
AC_CHECK_LIB(history, main) )
589+
589590
if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
590591
then
591592
AC_CHECK_LIB(bsd, main)
@@ -791,6 +792,11 @@ AC_CHECK_FUNC(rint,
791792
AC_DEFINE(HAVE_RINT),
792793
AC_CHECK_LIB(m, rint, AC_DEFINE(HAVE_RINT), , $HPUXMATHLIB))
793794

795+
796+
dnl Check for GNU style long options support (getopt_long)
797+
AC_CHECK_FUNCS(getopt_long)
798+
799+
794800
AC_MSG_CHECKING(for finite() macro or function)
795801
AC_TRY_LINK([#include <math.h>],
796802
[int dummy=finite(1.0);],

‎src/include/config.h.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@
285285
#undef HAVE_STRICMP
286286

287287
/* Set to 1 if you have libreadline and it includes history functions */
288-
#undefHAVE_HISTORY
288+
#undefHAVE_HISTORY_IN_READLINE
289289

290290
/*
291291
* Block of parameters for the ODBC code.
@@ -431,6 +431,10 @@ extern void srandom(unsigned int seed);
431431
/* Set to 1 if you have libhistory.a */
432432
#undef HAVE_LIBHISTORY
433433

434+
/* Set to 1 if you have getopt_long() (GNU long options) */
435+
#undef HAVE_GETOPT_LONG
436+
437+
434438
/*
435439
* On architectures for which we have not implemented spinlocks (or
436440
* cannot do so), we use System V semaphores. We also use them for

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp