Browse code

fix ambiguous error message when pkg-config can't find check

git-svn: trunk@3970

Török Edvin authored on 2008/07/17 19:36:23
Showing 2 changed files
... ...
@@ -13255,21 +13255,25 @@ fi
13255 13255
 
13256 13256
 	{ echo "$as_me:$LINENO: result: no" >&5
13257 13257
 echo "${ECHO_T}no" >&6; }
13258
-                { echo "$as_me:$LINENO: WARNING: pkg-config not found
13259
-			   Alternatively, you may set the environment variables CHECK_CFLAGS
13258
+                { echo "$as_me:$LINENO: WARNING: unable to find 'check' using pkg-config:
13259
+$CHECK_PKG_ERRORS
13260
+Alternatively, you may set the environment variables CHECK_CFLAGS
13260 13261
 and CHECK_LIBS to avoid the need to call pkg-config.
13261 13262
 See the pkg-config man page for more details." >&5
13262
-echo "$as_me: WARNING: pkg-config not found
13263
-			   Alternatively, you may set the environment variables CHECK_CFLAGS
13263
+echo "$as_me: WARNING: unable to find 'check' using pkg-config:
13264
+$CHECK_PKG_ERRORS
13265
+Alternatively, you may set the environment variables CHECK_CFLAGS
13264 13266
 and CHECK_LIBS to avoid the need to call pkg-config.
13265 13267
 See the pkg-config man page for more details." >&2;}
13266 13268
 elif test $pkg_failed = untried; then
13267
-	{ echo "$as_me:$LINENO: WARNING: pkg-config not found
13268
-			   Alternatively, you may set the environment variables CHECK_CFLAGS
13269
+	{ echo "$as_me:$LINENO: WARNING: unable to find 'check' using pkg-config:
13270
+$CHECK_PKG_ERRORS
13271
+Alternatively, you may set the environment variables CHECK_CFLAGS
13269 13272
 and CHECK_LIBS to avoid the need to call pkg-config.
13270 13273
 See the pkg-config man page for more details." >&5
13271
-echo "$as_me: WARNING: pkg-config not found
13272
-			   Alternatively, you may set the environment variables CHECK_CFLAGS
13274
+echo "$as_me: WARNING: unable to find 'check' using pkg-config:
13275
+$CHECK_PKG_ERRORS
13276
+Alternatively, you may set the environment variables CHECK_CFLAGS
13273 13277
 and CHECK_LIBS to avoid the need to call pkg-config.
13274 13278
 See the pkg-config man page for more details." >&2;}
13275 13279
 else
... ...
@@ -13494,13 +13498,23 @@ fi
13494 13494
 
13495 13495
 if test "x$CHECK_LIBS" = "x" -a "$enable_check_ut" = "yes"; then
13496 13496
     { { echo "$as_me:$LINENO: error:
13497
-		  $CHECK_PKG_ERRORS
13498
-		  ERROR!  Check was configured, but not found.  Get it from http://check.sf.net/
13499
-		 " >&5
13497
+$CHECK_PKG_ERRORS
13498
+
13499
+Alternatively, you may set the environment variables CHECK_CFLAGS
13500
+and CHECK_LIBS to avoid the need to call pkg-config.
13501
+See the pkg-config man page for more details.
13502
+
13503
+ERROR!  Check was configured, but not found.  Get it from http://check.sf.net/
13504
+" >&5
13500 13505
 echo "$as_me: error:
13501
-		  $CHECK_PKG_ERRORS
13502
-		  ERROR!  Check was configured, but not found.  Get it from http://check.sf.net/
13503
-		 " >&2;}
13506
+$CHECK_PKG_ERRORS
13507
+
13508
+Alternatively, you may set the environment variables CHECK_CFLAGS
13509
+and CHECK_LIBS to avoid the need to call pkg-config.
13510
+See the pkg-config man page for more details.
13511
+
13512
+ERROR!  Check was configured, but not found.  Get it from http://check.sf.net/
13513
+" >&2;}
13504 13514
    { (exit 1); exit 1; }; }
13505 13515
 fi
13506 13516
 
... ...
@@ -323,8 +323,9 @@ AC_ARG_ENABLE(check,
323 323
 [  --enable-check           Enable 'check' unit tests (default=auto)], enable_check_ut=$enableval, enable_check_ut="auto" )
324 324
 
325 325
 if test "$enable_check_ut" != "no" ; then
326
-	PKG_CHECK_MODULES([CHECK],[check],[], [AC_MSG_WARN([pkg-config not found
327
-			   _PKG_TEXT])])
326
+	PKG_CHECK_MODULES([CHECK],[check],[], [AC_MSG_WARN([unable to find 'check' using pkg-config:
327
+$CHECK_PKG_ERRORS
328
+_PKG_TEXT])])
328 329
 	save_CPPFLAGS="$CPPFLAGS";
329 330
 	CPPFLAGS="$CPPFLAGS $CHECK_CFLAGS"
330 331
 	save_LIBS="$LIBS"
... ...
@@ -350,9 +351,12 @@ fi
350 350
 
351 351
 if test "x$CHECK_LIBS" = "x" -a "$enable_check_ut" = "yes"; then
352 352
     AC_MSG_ERROR([
353
-		  $CHECK_PKG_ERRORS
354
-		  ERROR!  Check was configured, but not found.  Get it from http://check.sf.net/
355
-		 ])
353
+$CHECK_PKG_ERRORS
354
+
355
+_PKG_TEXT
356
+
357
+ERROR!  Check was configured, but not found.  Get it from http://check.sf.net/
358
+])
356 359
 fi
357 360
 
358 361
 AC_ARG_ENABLE(coverage,