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

Commit306c44e

Browse files
committed
Add -V option to backend, to show version, since --version doesn't seem
to work everywhere. Also, on FreeBSD you need to set the optreset variableto 1 before parsing the command line a second time with getopt().
1 parent6f2f169 commit306c44e

File tree

6 files changed

+107
-50
lines changed

6 files changed

+107
-50
lines changed

‎configure

Lines changed: 72 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6839,9 +6839,43 @@ else
68396839
fi
68406840

68416841

6842+
echo$ac_n"checking for optreset""...$ac_c"1>&6
6843+
echo"configure:6844: checking for optreset">&5
6844+
ifeval"test\"`echo'$''{'pgac_cv_var_int_optreset'+set}'`\" = set";then
6845+
echo$ac_n"(cached)$ac_c"1>&6
6846+
else
6847+
cat> conftest.$ac_ext<<EOF
6848+
#line 6849 "configure"
6849+
#include "confdefs.h"
6850+
#include <unistd.h>
6851+
int main() {
6852+
extern int optreset; optreset = 1;
6853+
; return 0; }
6854+
EOF
6855+
if { (evalecho configure:6856:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest${ac_exeext};then
6856+
rm -rf conftest*
6857+
pgac_cv_var_int_optreset=yes
6858+
else
6859+
echo"configure: failed program was:">&5
6860+
cat conftest.$ac_ext>&5
6861+
rm -rf conftest*
6862+
pgac_cv_var_int_optreset=no
6863+
fi
6864+
rm -f conftest*
6865+
fi
6866+
6867+
echo"$ac_t""$pgac_cv_var_int_optreset"1>&6
6868+
iftest x"$pgac_cv_var_int_optreset" = x"yes";then
6869+
cat>> confdefs.h<<\EOF
6870+
#define HAVE_INT_OPTRESET 1
6871+
EOF
6872+
6873+
fi
6874+
6875+
68426876

68436877
echo$ac_n"checking whether long int is 64 bits""...$ac_c"1>&6
6844-
echo"configure:6845: checking whether long int is 64 bits">&5
6878+
echo"configure:6879: checking whether long int is 64 bits">&5
68456879
ifeval"test\"`echo'$''{'pgac_cv_type_long_int_64'+set}'`\" = set";then
68466880
echo$ac_n"(cached)$ac_c"1>&6
68476881
else
@@ -6850,7 +6884,7 @@ else
68506884
echo"configure: warning: 64 bit arithmetic disabled when cross-compiling"1>&2
68516885
else
68526886
cat> conftest.$ac_ext<<EOF
6853-
#line6854 "configure"
6887+
#line6888 "configure"
68546888
#include "confdefs.h"
68556889
typedef long int int64;
68566890
@@ -6879,7 +6913,7 @@ main() {
68796913
exit(! does_int64_work());
68806914
}
68816915
EOF
6882-
if { (evalecho configure:6883:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest${ac_exeext}&& (./conftest; exit)2>/dev/null
6916+
if { (evalecho configure:6917:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest${ac_exeext}&& (./conftest; exit)2>/dev/null
68836917
then
68846918
pgac_cv_type_long_int_64=yes
68856919
else
@@ -6906,7 +6940,7 @@ fi
69066940

69076941
iftest x"$HAVE_LONG_INT_64" = x"no";then
69086942
echo$ac_n"checking whether long long int is 64 bits""...$ac_c"1>&6
6909-
echo"configure:6910: checking whether long long int is 64 bits">&5
6943+
echo"configure:6944: checking whether long long int is 64 bits">&5
69106944
ifeval"test\"`echo'$''{'pgac_cv_type_long_long_int_64'+set}'`\" = set";then
69116945
echo$ac_n"(cached)$ac_c"1>&6
69126946
else
@@ -6915,7 +6949,7 @@ else
69156949
echo"configure: warning: 64 bit arithmetic disabled when cross-compiling"1>&2
69166950
else
69176951
cat> conftest.$ac_ext<<EOF
6918-
#line6919 "configure"
6952+
#line6953 "configure"
69196953
#include "confdefs.h"
69206954
typedef long long int int64;
69216955
@@ -6944,7 +6978,7 @@ main() {
69446978
exit(! does_int64_work());
69456979
}
69466980
EOF
6947-
if { (evalecho configure:6948:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest${ac_exeext}&& (./conftest; exit)2>/dev/null
6981+
if { (evalecho configure:6982:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest${ac_exeext}&& (./conftest; exit)2>/dev/null
69486982
then
69496983
pgac_cv_type_long_long_int_64=yes
69506984
else
@@ -6975,7 +7009,7 @@ fi
69757009
if [ x"$HAVE_LONG_LONG_INT_64"= xyes ];then
69767010
if [ x$SNPRINTF= x ];then
69777011
echo$ac_n"checking whether snprintf handles 'long long int' as %lld""...$ac_c"1>&6
6978-
echo"configure:6979: checking whether snprintf handles 'long long int' as %lld">&5
7012+
echo"configure:7013: checking whether snprintf handles 'long long int' as %lld">&5
69797013
iftest"$cross_compiling" = yes;then
69807014
echo"$ac_t""assuming not on target machine"1>&6
69817015
# Force usage of our own snprintf, since we cannot test foreign snprintf
@@ -6984,7 +7018,7 @@ echo "configure:6979: checking whether snprintf handles 'long long int' as %lld"
69847018

69857019
else
69867020
cat> conftest.$ac_ext<<EOF
6987-
#line6988 "configure"
7021+
#line7022 "configure"
69887022
#include "confdefs.h"
69897023
#include <stdio.h>
69907024
typedef long long int int64;
@@ -7011,7 +7045,7 @@ main() {
70117045
exit(! does_int64_snprintf_work());
70127046
}
70137047
EOF
7014-
if { (evalecho configure:7015:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest${ac_exeext}&& (./conftest; exit)2>/dev/null
7048+
if { (evalecho configure:7049:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest${ac_exeext}&& (./conftest; exit)2>/dev/null
70157049
then
70167050
echo"$ac_t""yes"1>&6
70177051
INT64_FORMAT='"%lld"'
@@ -7022,7 +7056,7 @@ else
70227056
rm -fr conftest*
70237057
echo"$ac_t""no"1>&6
70247058
echo$ac_n"checking whether snprintf handles 'long long int' as %qd""...$ac_c"1>&6
7025-
echo"configure:7026: checking whether snprintf handles 'long long int' as %qd">&5
7059+
echo"configure:7060: checking whether snprintf handles 'long long int' as %qd">&5
70267060
iftest"$cross_compiling" = yes;then
70277061
echo"$ac_t""assuming not on target machine"1>&6
70287062
# Force usage of our own snprintf, since we cannot test foreign snprintf
@@ -7031,7 +7065,7 @@ echo "configure:7026: checking whether snprintf handles 'long long int' as %qd"
70317065

70327066
else
70337067
cat> conftest.$ac_ext<<EOF
7034-
#line7035 "configure"
7068+
#line7069 "configure"
70357069
#include "confdefs.h"
70367070
#include <stdio.h>
70377071
typedef long long int int64;
@@ -7058,7 +7092,7 @@ main() {
70587092
exit(! does_int64_snprintf_work());
70597093
}
70607094
EOF
7061-
if { (evalecho configure:7062:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest${ac_exeext}&& (./conftest; exit)2>/dev/null
7095+
if { (evalecho configure:7096:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest${ac_exeext}&& (./conftest; exit)2>/dev/null
70627096
then
70637097
echo"$ac_t""yes"1>&6
70647098
INT64_FORMAT='"%qd"'
@@ -7097,15 +7131,15 @@ EOF
70977131

70987132

70997133
echo$ac_n"checking alignment of short""...$ac_c"1>&6
7100-
echo"configure:7101: checking alignment of short">&5
7134+
echo"configure:7135: checking alignment of short">&5
71017135
ifeval"test\"`echo'$''{'pgac_cv_alignof_short'+set}'`\" = set";then
71027136
echo$ac_n"(cached)$ac_c"1>&6
71037137
else
71047138
iftest"$cross_compiling" = yes;then
71057139
pgac_cv_alignof_short='sizeof(short)'
71067140
else
71077141
cat> conftest.$ac_ext<<EOF
7108-
#line7109 "configure"
7142+
#line7143 "configure"
71097143
#include "confdefs.h"
71107144
#include <stdio.h>
71117145
struct { char filler; short field; } mystruct;
@@ -7117,7 +7151,7 @@ main()
71177151
exit(0);
71187152
}
71197153
EOF
7120-
if { (evalecho configure:7121:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest${ac_exeext}&& (./conftest; exit)2>/dev/null
7154+
if { (evalecho configure:7155:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest${ac_exeext}&& (./conftest; exit)2>/dev/null
71217155
then
71227156
pgac_cv_alignof_short=`cat conftestval`
71237157
else
@@ -7137,15 +7171,15 @@ EOF
71377171

71387172

71397173
echo$ac_n"checking alignment of int""...$ac_c"1>&6
7140-
echo"configure:7141: checking alignment of int">&5
7174+
echo"configure:7175: checking alignment of int">&5
71417175
ifeval"test\"`echo'$''{'pgac_cv_alignof_int'+set}'`\" = set";then
71427176
echo$ac_n"(cached)$ac_c"1>&6
71437177
else
71447178
iftest"$cross_compiling" = yes;then
71457179
pgac_cv_alignof_int='sizeof(int)'
71467180
else
71477181
cat> conftest.$ac_ext<<EOF
7148-
#line7149 "configure"
7182+
#line7183 "configure"
71497183
#include "confdefs.h"
71507184
#include <stdio.h>
71517185
struct { char filler; int field; } mystruct;
@@ -7157,7 +7191,7 @@ main()
71577191
exit(0);
71587192
}
71597193
EOF
7160-
if { (evalecho configure:7161:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest${ac_exeext}&& (./conftest; exit)2>/dev/null
7194+
if { (evalecho configure:7195:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest${ac_exeext}&& (./conftest; exit)2>/dev/null
71617195
then
71627196
pgac_cv_alignof_int=`cat conftestval`
71637197
else
@@ -7177,15 +7211,15 @@ EOF
71777211

71787212

71797213
echo$ac_n"checking alignment of long""...$ac_c"1>&6
7180-
echo"configure:7181: checking alignment of long">&5
7214+
echo"configure:7215: checking alignment of long">&5
71817215
ifeval"test\"`echo'$''{'pgac_cv_alignof_long'+set}'`\" = set";then
71827216
echo$ac_n"(cached)$ac_c"1>&6
71837217
else
71847218
iftest"$cross_compiling" = yes;then
71857219
pgac_cv_alignof_long='sizeof(long)'
71867220
else
71877221
cat> conftest.$ac_ext<<EOF
7188-
#line7189 "configure"
7222+
#line7223 "configure"
71897223
#include "confdefs.h"
71907224
#include <stdio.h>
71917225
struct { char filler; long field; } mystruct;
@@ -7197,7 +7231,7 @@ main()
71977231
exit(0);
71987232
}
71997233
EOF
7200-
if { (evalecho configure:7201:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest${ac_exeext}&& (./conftest; exit)2>/dev/null
7234+
if { (evalecho configure:7235:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest${ac_exeext}&& (./conftest; exit)2>/dev/null
72017235
then
72027236
pgac_cv_alignof_long=`cat conftestval`
72037237
else
@@ -7218,15 +7252,15 @@ EOF
72187252

72197253
if [ x"$HAVE_LONG_LONG_INT_64"= xyes ];then
72207254
echo$ac_n"checking alignment of long long int""...$ac_c"1>&6
7221-
echo"configure:7222: checking alignment of long long int">&5
7255+
echo"configure:7256: checking alignment of long long int">&5
72227256
ifeval"test\"`echo'$''{'pgac_cv_alignof_long_long_int'+set}'`\" = set";then
72237257
echo$ac_n"(cached)$ac_c"1>&6
72247258
else
72257259
iftest"$cross_compiling" = yes;then
72267260
pgac_cv_alignof_long_long_int='sizeof(long long int)'
72277261
else
72287262
cat> conftest.$ac_ext<<EOF
7229-
#line7230 "configure"
7263+
#line7264 "configure"
72307264
#include "confdefs.h"
72317265
#include <stdio.h>
72327266
struct { char filler; long long int field; } mystruct;
@@ -7238,7 +7272,7 @@ main()
72387272
exit(0);
72397273
}
72407274
EOF
7241-
if { (evalecho configure:7242:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest${ac_exeext}&& (./conftest; exit)2>/dev/null
7275+
if { (evalecho configure:7276:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest${ac_exeext}&& (./conftest; exit)2>/dev/null
72427276
then
72437277
pgac_cv_alignof_long_long_int=`cat conftestval`
72447278
else
@@ -7259,15 +7293,15 @@ EOF
72597293

72607294
fi
72617295
echo$ac_n"checking alignment of double""...$ac_c"1>&6
7262-
echo"configure:7263: checking alignment of double">&5
7296+
echo"configure:7297: checking alignment of double">&5
72637297
ifeval"test\"`echo'$''{'pgac_cv_alignof_double'+set}'`\" = set";then
72647298
echo$ac_n"(cached)$ac_c"1>&6
72657299
else
72667300
iftest"$cross_compiling" = yes;then
72677301
pgac_cv_alignof_double='sizeof(double)'
72687302
else
72697303
cat> conftest.$ac_ext<<EOF
7270-
#line7271 "configure"
7304+
#line7305 "configure"
72717305
#include "confdefs.h"
72727306
#include <stdio.h>
72737307
struct { char filler; double field; } mystruct;
@@ -7279,7 +7313,7 @@ main()
72797313
exit(0);
72807314
}
72817315
EOF
7282-
if { (evalecho configure:7283:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest${ac_exeext}&& (./conftest; exit)2>/dev/null
7316+
if { (evalecho configure:7317:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest${ac_exeext}&& (./conftest; exit)2>/dev/null
72837317
then
72847318
pgac_cv_alignof_double=`cat conftestval`
72857319
else
@@ -7317,12 +7351,12 @@ EOF
73177351

73187352

73197353
echo$ac_n"checking for POSIX signal interface""...$ac_c"1>&6
7320-
echo"configure:7321: checking for POSIX signal interface">&5
7354+
echo"configure:7355: checking for POSIX signal interface">&5
73217355
ifeval"test\"`echo'$''{'pgac_cv_func_posix_signals'+set}'`\" = set";then
73227356
echo$ac_n"(cached)$ac_c"1>&6
73237357
else
73247358
cat> conftest.$ac_ext<<EOF
7325-
#line7326 "configure"
7359+
#line7360 "configure"
73267360
#include "confdefs.h"
73277361
#include <signal.h>
73287362
@@ -7333,7 +7367,7 @@ act.sa_flags = SA_RESTART;
73337367
sigaction(0, &act, &oact);
73347368
; return 0; }
73357369
EOF
7336-
if { (evalecho configure:7337:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest${ac_exeext};then
7370+
if { (evalecho configure:7371:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest${ac_exeext};then
73377371
rm -rf conftest*
73387372
pgac_cv_func_posix_signals=yes
73397373
else
@@ -7363,7 +7397,7 @@ do
73637397
# Extract the first word of "$ac_prog", so it can be a program name with args.
73647398
set dummy$ac_prog; ac_word=$2
73657399
echo$ac_n"checking for$ac_word""...$ac_c"1>&6
7366-
echo"configure:7367: checking for$ac_word">&5
7400+
echo"configure:7401: checking for$ac_word">&5
73677401
ifeval"test\"`echo'$''{'ac_cv_path_TCLSH'+set}'`\" = set";then
73687402
echo$ac_n"(cached)$ac_c"1>&6
73697403
else
@@ -7399,7 +7433,7 @@ test -n "$TCLSH" && break
73997433
done
74007434

74017435
echo$ac_n"checking for tclConfig.sh""...$ac_c"1>&6
7402-
echo"configure:7403: checking for tclConfig.sh">&5
7436+
echo"configure:7437: checking for tclConfig.sh">&5
74037437
# Let user override test
74047438
iftest -z"$TCL_CONFIG_SH";then
74057439
pgac_test_dirs="$with_tclconfig"
@@ -7432,7 +7466,7 @@ fi
74327466
# Check for Tk configuration script tkConfig.sh
74337467
iftest"$with_tk" = yes;then
74347468
echo$ac_n"checking for tkConfig.sh""...$ac_c"1>&6
7435-
echo"configure:7436: checking for tkConfig.sh">&5
7469+
echo"configure:7470: checking for tkConfig.sh">&5
74367470
# Let user override test
74377471
iftest -z"$TK_CONFIG_SH";then
74387472
pgac_test_dirs="$with_tkconfig$with_tclconfig"
@@ -7471,7 +7505,7 @@ do
74717505
# Extract the first word of "$ac_prog", so it can be a program name with args.
74727506
set dummy$ac_prog; ac_word=$2
74737507
echo$ac_n"checking for$ac_word""...$ac_c"1>&6
7474-
echo"configure:7475: checking for$ac_word">&5
7508+
echo"configure:7509: checking for$ac_word">&5
74757509
ifeval"test\"`echo'$''{'ac_cv_prog_NSGMLS'+set}'`\" = set";then
74767510
echo$ac_n"(cached)$ac_c"1>&6
74777511
else
@@ -7507,7 +7541,7 @@ do
75077541
# Extract the first word of "$ac_prog", so it can be a program name with args.
75087542
set dummy$ac_prog; ac_word=$2
75097543
echo$ac_n"checking for$ac_word""...$ac_c"1>&6
7510-
echo"configure:7511: checking for$ac_word">&5
7544+
echo"configure:7545: checking for$ac_word">&5
75117545
ifeval"test\"`echo'$''{'ac_cv_prog_JADE'+set}'`\" = set";then
75127546
echo$ac_n"(cached)$ac_c"1>&6
75137547
else
@@ -7538,7 +7572,7 @@ done
75387572

75397573

75407574
echo$ac_n"checking for DocBook V3.1""...$ac_c"1>&6
7541-
echo"configure:7542: checking for DocBook V3.1">&5
7575+
echo"configure:7576: checking for DocBook V3.1">&5
75427576
ifeval"test\"`echo'$''{'pgac_cv_check_docbook'+set}'`\" = set";then
75437577
echo$ac_n"(cached)$ac_c"1>&6
75447578
else
@@ -7571,7 +7605,7 @@ have_docbook=$pgac_cv_check_docbook
75717605

75727606

75737607
echo$ac_n"checking for DocBook stylesheets""...$ac_c"1>&6
7574-
echo"configure:7575: checking for DocBook stylesheets">&5
7608+
echo"configure:7609: checking for DocBook stylesheets">&5
75757609
ifeval"test\"`echo'$''{'pgac_cv_path_stylesheets'+set}'`\" = set";then
75767610
echo$ac_n"(cached)$ac_c"1>&6
75777611
else
@@ -7610,7 +7644,7 @@ do
76107644
# Extract the first word of "$ac_prog", so it can be a program name with args.
76117645
set dummy$ac_prog; ac_word=$2
76127646
echo$ac_n"checking for$ac_word""...$ac_c"1>&6
7613-
echo"configure:7614: checking for$ac_word">&5
7647+
echo"configure:7648: checking for$ac_word">&5
76147648
ifeval"test\"`echo'$''{'ac_cv_prog_SGMLSPL'+set}'`\" = set";then
76157649
echo$ac_n"(cached)$ac_c"1>&6
76167650
else

‎configure.in

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,16 @@ PGAC_ARG_BOOL(enable, syslog, no, [ --enable-syslog enable logging to s
936936
[AC_MSG_ERROR([no syslog interface found])])])
937937

938938

939+
AC_CACHE_CHECK([for optreset], pgac_cv_var_int_optreset,
940+
[AC_TRY_LINK([#include <unistd.h>],
941+
[extern int optreset; optreset = 1;],
942+
[pgac_cv_var_int_optreset=yes],
943+
[pgac_cv_var_int_optreset=no])])
944+
if test x"$pgac_cv_var_int_optreset" = x"yes"; then
945+
AC_DEFINE(HAVE_INT_OPTRESET, 1)
946+
fi
947+
948+
939949
dnl Check to see if we have a working 64-bit integer type.
940950
dnl This breaks down into two steps:
941951
dnl (1) figure out if the compiler has a 64-bit int type with working

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp