作図ソフト dia の改良版
Révision | c8435594fc7c2fcdf0af93a8787c747ab2055baa (tree) |
---|---|
l'heure | 2001-09-07 11:22:52 |
Auteur | James Henstridge <james@daa....> |
Commiter | James Henstridge |
refactor the check for libxml a little so that it handles finding both
2001-09-07 James Henstridge <james@daa.com.au>
* configure.in (found_libxml): refactor the check for libxml a
little so that it handles finding both libxml1 and 2 better.
@@ -1,3 +1,8 @@ | ||
1 | +2001-09-07 James Henstridge <james@daa.com.au> | |
2 | + | |
3 | + * configure.in (found_libxml): refactor the check for libxml a | |
4 | + little so that it handles finding both libxml1 and 2 better. | |
5 | + | |
1 | 6 | 2001-09-03 Cyrille Chepelov <chepelov@calixo.net> |
2 | 7 | |
3 | 8 | * app/app_procs.c: removed a spurious } which caused a compilation |
@@ -268,57 +268,52 @@ dnl | ||
268 | 268 | dnl Locate the gnome-xml library |
269 | 269 | dnl |
270 | 270 | |
271 | -AC_CHECK_PROG(XML2_CONFIG, xml2-config, xml2-config) | |
272 | -if test "$XML2_CONFIG" != "" | |
273 | -then | |
274 | - AC_MSG_CHECKING(for libxml >= 2.3.9) | |
275 | - vers=`$XML2_CONFIG --version | sed -e "s/libxml //" | awk 'BEGIN {FS=".";} { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` | |
276 | - if test "$vers" -ge 2003009; then | |
271 | +found_libxml=false | |
272 | +AC_CHECK_PROG(XML_CONFIG, xml-config, xml-config) | |
273 | +if test "x$XML_CONFIG" != x ; then | |
274 | + AC_MSG_CHECKING(for libxml >= 1.8.14) | |
275 | + vers=`$XML_CONFIG --version | sed -e "s/libxml //" | awk 'BEGIN {FS=".";} { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` | |
276 | + | |
277 | + dnl 1.18.14 is required for xmlUseNewParser() | |
278 | + if test "$vers" -ge 1008014; then | |
277 | 279 | AC_MSG_RESULT(found) |
278 | - XML_LIBS="`$XML2_CONFIG --libs`" | |
279 | - XML_CFLAGS="`$XML2_CONFIG --cflags`" | |
280 | - | |
281 | - if test "$enable_gnome_print" = "yes" | |
282 | - then | |
283 | - gnome-config --cflags print | \ | |
284 | - grep gnome-xml 2>&1 >/dev/null && \ | |
285 | - AC_MSG_ERROR(libxml2 found but gnome-print uses libxml1 ; this is a conflict.\nPlease do either provide libxml1 or disable gnome-print.) | |
286 | - fi | |
287 | - echo $GNOME_CFLAGS | \ | |
288 | - grep gnome-xml 2>&1 >/dev/null && \ | |
289 | - AC_MSG_ERROR(libxml2 found but one GNOME component uses libxml1 ; this is a conflict.\nPlease do either provide libxml1 or disable the offending GNOME component.) | |
290 | - | |
280 | + found_libxml=true | |
281 | + XML_LIBS="`$XML_CONFIG --libs`" | |
282 | + XML_CFLAGS="`$XML_CONFIG --cflags`" | |
291 | 283 | else |
292 | 284 | AC_MSG_RESULT(not found) |
293 | 285 | fi |
294 | 286 | fi |
295 | -if test "$XML_CONFIG" = "" | |
296 | -then | |
297 | - AC_CHECK_PROG(XML_CONFIG, xml-config, xml-config) | |
298 | - if test "$XML_CONFIG" != "" | |
299 | - then | |
300 | - AC_MSG_CHECKING(for libxml >= 1.8.14) | |
301 | - vers=`$XML_CONFIG --version | sed -e "s/libxml //" | awk 'BEGIN {FS=".";} { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` | |
302 | - if test "$vers" -ge 1008014; then | |
303 | - dnl 1.18.14 is required for xmlUseNewParser() | |
287 | + | |
288 | +if ! $found_libxml; then | |
289 | + AC_CHECK_PROG(XML2_CONFIG, xml2-config, xml2-config) | |
290 | + if test "x$XML2_CONFIG" != x ; then | |
291 | + AC_MSG_CHECKING(for libxml >= 2.3.9) | |
292 | + vers=`$XML2_CONFIG --version | sed -e "s/libxml //" | awk 'BEGIN {FS=".";} { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` | |
293 | + | |
294 | + if test "$vers" -ge 2003009; then | |
304 | 295 | AC_MSG_RESULT(found) |
296 | + found_libxml=true | |
297 | + XML_LIBS="`$XML2_CONFIG --libs`" | |
298 | + XML_CFLAGS="`$XML2_CONFIG --cflags`" | |
299 | + | |
300 | + if test "$enable_gnome_print" = "yes" | |
301 | + then | |
302 | + gnome-config --cflags print | \ | |
303 | + grep gnome-xml 2>&1 >/dev/null && \ | |
304 | + AC_MSG_ERROR(libxml2 found but gnome-print uses libxml1 ; this is a conflict.\nPlease do either provide libxml1 or disable gnome-print.) | |
305 | + fi | |
306 | + echo $GNOME_CFLAGS | \ | |
307 | + grep gnome-xml 2>&1 >/dev/null && \ | |
308 | + AC_MSG_ERROR(libxml2 found but one GNOME component uses libxml1 ; this is a conflict.\nPlease do either provide libxml1 or disable the offending GNOME component.) | |
309 | + | |
305 | 310 | else |
306 | - AC_MSG_ERROR(you need libxml >= 1.8.14 for this version of dia) | |
311 | + AC_MSG_RESULT(not found) | |
307 | 312 | fi |
308 | - XML_LIBS="`$XML_CONFIG --libs`" | |
309 | - XML_CFLAGS="`$XML_CONFIG --cflags`" | |
310 | - else | |
311 | - AC_MSG_RESULT(not found) | |
312 | 313 | fi |
313 | 314 | fi |
314 | 315 | |
315 | -if test "$XML_CONFIG" != "" && test "$XML2_CONFIG" != "" | |
316 | -then | |
317 | - AC_MSG_ERROR(Both libxml1 and libxml2 found. You need to choose one or face crashes.\nWe advise you use only libxml1 for the moment.) | |
318 | -fi | |
319 | - | |
320 | -if test "$XML_CONFIG" = "" && test "$XML2_CONFIG" = "" | |
321 | -then | |
316 | +if ! $found_libxml; then | |
322 | 317 | AC_MSG_ERROR(Neither libxml1 or libxml2 found. You must install one (libxml1, preferably)) |
323 | 318 | fi |
324 | 319 |