Skip to content

Commit 1244ce0

Browse files
authoredMar 10, 2025··
Merge pull request #780 from mkrupcale/udunits2-netcdf-flags
configure: use correct CFLAGS and LDFLAGS variables
2 parents fb9625a + 395effe commit 1244ce0

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed
 

‎configure

+8-8
Original file line numberDiff line numberDiff line change
@@ -4891,12 +4891,12 @@ fi
48914891
UDUNITS2LDFLAGS=" -L${with_udunits2}/lib -ludunits2"
48924892
fi
48934893
else
4894-
UDUNITS2FLAGS="-ludunits2"
4895-
UDUNITS2LDFLAGS=""
4894+
UDUNITS2LDFLAGS="-ludunits2"
4895+
UDUNITS2FLAGS=""
48964896
fi
48974897
else
4898-
UDUNITS2FLAGS="-ludunits2"
4899-
UDUNITS2LDFLAGS=""
4898+
UDUNITS2LDFLAGS="-ludunits2"
4899+
UDUNITS2FLAGS=""
49004900
fi
49014901
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ut_parse in -ludunits2" >&5
49024902
printf %s "checking for ut_parse in -ludunits2... " >&6; }
@@ -4975,8 +4975,8 @@ fi
49754975
fi
49764976
fi
49774977
else
4978-
NCCFLAGS="-lnetcdf"
4979-
NCLDFLAGS=""
4978+
NCLDFLAGS="-lnetcdf"
4979+
NCCFLAGS=""
49804980
fi
49814981
else
49824982
# Extract the first word of "nc-config", so it can be a program name with args.
@@ -5029,8 +5029,8 @@ fi
50295029
NCCFLAGS=`${NCCONFIG} --cflags`
50305030
NCLDFLAGS=`${NCCONFIG} --libs`
50315031
else
5032-
NCCFLAGS="-lnetcdf"
5033-
NCLDFLAGS=""
5032+
NCLDFLAGS="-lnetcdf"
5033+
NCCFLAGS=""
50345034
fi
50355035
fi
50365036
LIBS=""

‎configure.ac

+8-8
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,12 @@ if [ test x${with_udunits2} != xyes ] ; then
221221
UDUNITS2LDFLAGS=" -L${with_udunits2}/lib -ludunits2"
222222
fi
223223
else
224-
UDUNITS2FLAGS="-ludunits2"
225-
UDUNITS2LDFLAGS=""
224+
UDUNITS2LDFLAGS="-ludunits2"
225+
UDUNITS2FLAGS=""
226226
fi
227227
else
228-
UDUNITS2FLAGS="-ludunits2"
229-
UDUNITS2LDFLAGS=""
228+
UDUNITS2LDFLAGS="-ludunits2"
229+
UDUNITS2FLAGS=""
230230
fi
231231
AC_CHECK_LIB([udunits2],[ut_parse],[],[AC_MSG_ERROR(Could not get a working udunits2)],[ ${UDUNITS2FLAGS} ${UDUNITS2LDFLAGS} -lm ])
232232
LIBS=""
@@ -248,17 +248,17 @@ if [ test x${with_netcdf} != xyes ]; then
248248
fi
249249
fi
250250
else
251-
NCCFLAGS="-lnetcdf"
252-
NCLDFLAGS=""
251+
NCLDFLAGS="-lnetcdf"
252+
NCCFLAGS=""
253253
fi
254254
else
255255
AC_PATH_PROG(NCCONFIG,nc-config,"no")
256256
if [ test NCCONFIG != "no" ] ; then
257257
NCCFLAGS=`${NCCONFIG} --cflags`
258258
NCLDFLAGS=`${NCCONFIG} --libs`
259259
else
260-
NCCFLAGS="-lnetcdf"
261-
NCLDFLAGS=""
260+
NCLDFLAGS="-lnetcdf"
261+
NCCFLAGS=""
262262
fi
263263
fi
264264
LIBS=""

0 commit comments

Comments
 (0)
Please sign in to comment.