]> mj.ucw.cz Git - libucw.git/commitdiff
Example: Fix the previous commit.
authorMartin Mares <mj@ucw.cz>
Sun, 9 Nov 2008 21:11:23 +0000 (22:11 +0100)
committerMartin Mares <mj@ucw.cz>
Sun, 9 Nov 2008 21:11:23 +0000 (22:11 +0100)
(pkg-config does not like testing the version and reading a variable simultaneously.)

free/libs/examples/external-ucw-build/configure

index 1e9ccedc1b103c9a2fc250fe616cd6ba3754a963..8214aa94cca385cc932046f84d4a73f9f1266166 100755 (executable)
@@ -18,10 +18,12 @@ BEGIN {
                        die "Don't know how to find myself. Please set SRCDIR manually.";
                }
        }
                        die "Don't know how to find myself. Please set SRCDIR manually.";
                }
        }
-       # Ask pkg-config for the rest of configure
-       $libdir=`pkg-config libucw --atleast-version=3.13 --variable=perl_modules_dir`;
+       # Ask pkg-config if libucw is installed and find its configure modules
+       `pkg-config libucw --atleast-version=3.13`;
+       !$? or die "Package `libucw' (version 3.13 or newer) not found. Is PKG_CONFIG_PATH set properly?";
+       $libdir=`pkg-config libucw --variable=perl_modules_dir`;
        chomp $libdir;
        chomp $libdir;
-       die "Package `libucw' (version 3.13 or newer) not found. Is PKG_CONFIG_PATH set properly?" if $? || not defined $libdir;
+       die "Unable to find the libucw configure system" if $? || not defined $libdir;
 }
 use lib $libdir;
 use UCW::Configure;
 }
 use lib $libdir;
 use UCW::Configure;