Skip to content

Commit 8b967f9

Browse files
committed
autoconfed
1 parent 5dd8e34 commit 8b967f9

File tree

2 files changed

+38
-30
lines changed

2 files changed

+38
-30
lines changed

configure

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4465,9 +4465,15 @@ else
44654465
fi
44664466
44674467
4468+
HAVE_PNG="yes"
44684469
case "${OS}" in
44694470
darwin*)
4470-
PNG_VERSION="15"
4471+
if test -z "/usr/X11R6/include"; then
4472+
PNG_VERSION="15"
4473+
else
4474+
HAVE_PNG="no"
4475+
PNG_VERSION=""
4476+
fi
44714477
;;
44724478
*)
44734479
PNG_VERSION=""
@@ -4486,7 +4492,7 @@ else
44864492
with_grib2lib=no
44874493
fi
44884494
4489-
if test ${with_grib2lib} == "no" ; then
4495+
if test ${with_grib2lib} = "no" ; then
44904496
if test "${EXTERNALS+set}" = set; then
44914497
GRIB2LIB="-L${EXTERNALS}/lib"
44924498
else
@@ -4495,6 +4501,7 @@ fi
44954501
else
44964502
GRIB2LIB="-L"${with_grib2lib}
44974503
fi
4504+
if test ${HAVE_PNG} = "yes"; then
44984505
44994506
# Check whether --with-pnglib was given.
45004507
if test "${with_pnglib+set}" = set; then :
@@ -4503,16 +4510,16 @@ else
45034510
with_pnglib=no
45044511
fi
45054512
4506-
if test ${with_pnglib} == "no" ; then
4507-
if test "${EXTERNALS+set}" = set; then
4508-
PNGLIB="-L${EXTERNALS}/lib"
4513+
if test ${with_pnglib} = "no" ; then
4514+
if test "${EXTERNALS+set}" = set; then
4515+
PNGLIB="-L${EXTERNALS}/lib"
4516+
else
4517+
PNGLIB="-L${prefix}/Externals/lib"
4518+
fi
45094519
else
4510-
PNGLIB="-L${prefix}/Externals/lib"
4520+
PNGLIB="-L"${with_pnglib}
45114521
fi
4512-
else
4513-
PNGLIB="-L"${with_pnglib}
4514-
fi
4515-
as_ac_Lib=`$as_echo "ac_cv_lib_png${PNG_VERSION}''_png_error" | $as_tr_sh`
4522+
as_ac_Lib=`$as_echo "ac_cv_lib_png${PNG_VERSION}''_png_error" | $as_tr_sh`
45164523
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_error in -lpng${PNG_VERSION}" >&5
45174524
$as_echo_n "checking for png_error in -lpng${PNG_VERSION}... " >&6; }
45184525
if eval \${$as_ac_Lib+:} false; then :
@@ -4556,8 +4563,9 @@ else
45564563
PNGLIBOK="no"
45574564
fi
45584565
4559-
if test ${PNGLIBOK} == "no" ; then
4560-
as_fn_error $? "\"Could not find a working libpng${PNG_VERSION}\"" "$LINENO" 5
4566+
if test ${PNGLIBOK} = "no" ; then
4567+
as_fn_error $? "\"Could not find a working libpng${PNG_VERSION}\"" "$LINENO" 5
4568+
fi
45614569
fi
45624570
45634571
# Check whether --with-jasperlib was given.
@@ -4567,7 +4575,7 @@ else
45674575
with_jasperlib=no
45684576
fi
45694577
4570-
if test ${with_jasperlib} == "no" ; then
4578+
if test ${with_jasperlib} = "no" ; then
45714579
if test "${EXTERNALS+set}" = set; then
45724580
JASPERLIB="-L${EXTERNALS}/lib"
45734581
else
@@ -4618,7 +4626,7 @@ else
46184626
JASPERLIBOK="no"
46194627
fi
46204628
4621-
if test ${JASPERLIBOK} == "no" ; then
4629+
if test ${JASPERLIBOK} = "no" ; then
46224630
as_fn_error $? "\"Could not find a working libjasper\"" "$LINENO" 5
46234631
fi
46244632
@@ -4629,7 +4637,7 @@ else
46294637
with_grib2lib=no
46304638
fi
46314639
4632-
if test ${with_grib2lib} == "no" ; then
4640+
if test ${with_grib2lib} = "no" ; then
46334641
if test "${EXTERNALS+set}" = set; then
46344642
GRIB2LIB="-L${EXTERNALS}/lib -lgrib2c "${PNGLIB}" -lpng${PNG_VERSION} "${JASPERLIB}" -ljasper -lm"
46354643
else
@@ -4680,7 +4688,7 @@ else
46804688
GRIB2LIBOK="no"
46814689
fi
46824690
4683-
if test ${GRIB2LIBOK} == "no" ; then
4691+
if test ${GRIB2LIBOK} = "no" ; then
46844692
as_fn_error $? "\"Could not find a working libgrib2c\"" "$LINENO" 5
46854693
fi
46864694
@@ -5434,7 +5442,7 @@ else
54345442
We can't simply define LARGE_OFF_T to be 9223372036854775807,
54355443
since some C++ compilers masquerading as C compilers
54365444
incorrectly reject 9223372036854775807. */
5437-
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5445+
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
54385446
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
54395447
&& LARGE_OFF_T % 2147483647 == 1)
54405448
? 1 : -1];
@@ -5480,7 +5488,7 @@ else
54805488
We can't simply define LARGE_OFF_T to be 9223372036854775807,
54815489
since some C++ compilers masquerading as C compilers
54825490
incorrectly reject 9223372036854775807. */
5483-
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5491+
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
54845492
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
54855493
&& LARGE_OFF_T % 2147483647 == 1)
54865494
? 1 : -1];
@@ -5504,7 +5512,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
55045512
We can't simply define LARGE_OFF_T to be 9223372036854775807,
55055513
since some C++ compilers masquerading as C compilers
55065514
incorrectly reject 9223372036854775807. */
5507-
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5515+
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
55085516
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
55095517
&& LARGE_OFF_T % 2147483647 == 1)
55105518
? 1 : -1];
@@ -5549,7 +5557,7 @@ else
55495557
We can't simply define LARGE_OFF_T to be 9223372036854775807,
55505558
since some C++ compilers masquerading as C compilers
55515559
incorrectly reject 9223372036854775807. */
5552-
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5560+
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
55535561
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
55545562
&& LARGE_OFF_T % 2147483647 == 1)
55555563
? 1 : -1];
@@ -5573,7 +5581,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
55735581
We can't simply define LARGE_OFF_T to be 9223372036854775807,
55745582
since some C++ compilers masquerading as C compilers
55755583
incorrectly reject 9223372036854775807. */
5576-
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5584+
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
55775585
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
55785586
&& LARGE_OFF_T % 2147483647 == 1)
55795587
? 1 : -1];

configure.in

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ AC_ARG_ENABLE(grib2,
7575
HAVE_PNG="yes"
7676
case "${OS}" in
7777
darwin*)
78-
if [ -d "/usr/X11R6/include" ] then;
78+
if test -z "/usr/X11R6/include"; then
7979
PNG_VERSION="15"
8080
else
8181
HAVE_PNG="no"
@@ -94,7 +94,7 @@ if test "X$ENABLE_GRIB2" = "Xyes"; then
9494
[AS_HELP_STRING([--with-grib2lib],[path where to look for libgrib2c])],
9595
[],
9696
[with_grib2lib=no])
97-
if test ${with_grib2lib} == "no" ; then
97+
if test ${with_grib2lib} = "no" ; then
9898
if test "${EXTERNALS+set}" = set; then
9999
GRIB2LIB="-L${EXTERNALS}/lib"
100100
else
@@ -103,12 +103,12 @@ if test "X$ENABLE_GRIB2" = "Xyes"; then
103103
else
104104
GRIB2LIB="-L"${with_grib2lib}
105105
fi
106-
if test ${HAVE_PNG} == "yes"; then
106+
if test ${HAVE_PNG} = "yes"; then
107107
AC_ARG_WITH([pnglib],
108108
[AS_HELP_STRING([--with-pnglib],[path where to look for libpng])],
109109
[],
110110
[with_pnglib=no])
111-
if test ${with_pnglib} == "no" ; then
111+
if test ${with_pnglib} = "no" ; then
112112
if test "${EXTERNALS+set}" = set; then
113113
PNGLIB="-L${EXTERNALS}/lib"
114114
else
@@ -118,15 +118,15 @@ if test "X$ENABLE_GRIB2" = "Xyes"; then
118118
PNGLIB="-L"${with_pnglib}
119119
fi
120120
AC_CHECK_LIB([png${PNG_VERSION}],[png_error],[PNGLIBOK="yes"],[PNGLIBOK="no"],[${GRIB2LIB} ${PNGLIB}])
121-
if test ${PNGLIBOK} == "no" ; then
121+
if test ${PNGLIBOK} = "no" ; then
122122
AC_MSG_ERROR("[Could not find a working libpng${PNG_VERSION}]")
123123
fi
124124
fi
125125
AC_ARG_WITH([jasperlib],
126126
[AS_HELP_STRING([--with-jasperlib],[path where to look for libjasper])],
127127
[],
128128
[with_jasperlib=no])
129-
if test ${with_jasperlib} == "no" ; then
129+
if test ${with_jasperlib} = "no" ; then
130130
if test "${EXTERNALS+set}" = set; then
131131
JASPERLIB="-L${EXTERNALS}/lib"
132132
else
@@ -136,14 +136,14 @@ if test "X$ENABLE_GRIB2" = "Xyes"; then
136136
JASPERLIB="-L"${with_jasperlib}
137137
fi
138138
AC_CHECK_LIB([jasper],[jas_init],[JASPERLIBOK="yes"],[JASPERLIBOK="no"],[${GRIB2LIB} ${JASPERLIB} -ljpeg -lm ])
139-
if test ${JASPERLIBOK} == "no" ; then
139+
if test ${JASPERLIBOK} = "no" ; then
140140
AC_MSG_ERROR("[Could not find a working libjasper]")
141141
fi
142142
AC_ARG_WITH([grib2lib],
143143
[AS_HELP_STRING([--with-grib2lib],[path where to look for libgrib2c])],
144144
[],
145145
[with_grib2lib=no])
146-
if test ${with_grib2lib} == "no" ; then
146+
if test ${with_grib2lib} = "no" ; then
147147
if test "${EXTERNALS+set}" = set; then
148148
GRIB2LIB="-L${EXTERNALS}/lib -lgrib2c "${PNGLIB}" -lpng${PNG_VERSION} "${JASPERLIB}" -ljasper -lm"
149149
else
@@ -153,7 +153,7 @@ if test "X$ENABLE_GRIB2" = "Xyes"; then
153153
GRIB2LIB="-L"${with_grib2lib}" -lgrib2c "${PNGLIB}" -lpng${PNG_VERSION} "${JASPERLIB}" -ljasper -lm"
154154
fi
155155
AC_CHECK_LIB([grib2c],[g2_getfld],[GRIB2LIBOK="yes"],[GRIB2LIBOK="no"],[${GRIB2LIB}])
156-
if test ${GRIB2LIBOK} == "no" ; then
156+
if test ${GRIB2LIBOK} = "no" ; then
157157
AC_MSG_ERROR("[Could not find a working libgrib2c]")
158158
fi
159159
dnl in this case we also need jasper

0 commit comments

Comments
 (0)