title: Version error in autotools configure script
body: <p>I am trying to cross-compile <code>libnetfilter_queue-1.0.2</code> from source and my build environment variables are pointing to correct cross-toolchain and dependent library paths.</p>
  
  <p>Still I get the following error on  <code>./configure</code></p>
  
  <pre><code>checking for LIBNFNETLINK... no
  configure: error: Package requirements (libnfnetlink &gt;= 0.0.41) were not met:
  
  No package 'libnfnetlink' found
  
  Consider adjusting the PKG_CONFIG_PATH environment variable if you
  installed software in a non-standard prefix.
  
  Alternatively, you may set the environment variables LIBNFNETLINK_CFLAGS
  and LIBNFNETLINK_LIBS to avoid the need to call pkg-config.
  See the pkg-config man page for more details.
  </code></pre>
  
  <p>My configure command is :</p>
  
  <pre><code>CFLAGS="-I/home/user/openwrt/openwrt/staging_dir/target-powerpc_8540_uClibc-0.9.33.2/lib/ 
  -I/home/user/openwrt/openwrt/staging_dir/target-powerpc_8540_uClibc-0.9.33.2/usr/lib/ -I/home/user/openwrt/openwrt/staging_dir/target-powerpc_8540_uClibc-0.9.33.2/include/ 
  -I/home/user/openwrt/openwrt/staging_dir/target-powerpc_8540_uClibc-0.9.33.2/usr/include"  
  LDFLAGS="-L/home/user/openwrt/openwrt/staging_dir/target-powerpc_8540_uClibc-0.9.33.2/lib/ 
  -L/home/user/openwrt/openwrt/staging_dir/target-powerpc_8540_uClibc-0.9.33.2/usr/lib/" 
  ./configure --build=x86_64-unknown-linux-gnu --host=powerpc-openwrt-linux-uclibcspe  
  --prefix=/home/user/openwrt/openwrt/staging_dir/target-powerpc_8540_uClibc-0.9.33.2
  </code></pre>
  
  <p>Also I have the <strong>libnfnetlink.so.0.2.0</strong> already installed in one of the -I and -L paths passed to ./configure.</p>
  
  <p>Inspite of that, why do i get the error.</p>
  
  <p>Edit: SOme extra information.</p>
  
  <p><strong>config.log</strong></p>
  
  <pre><code>configure:11631: checking for LIBNFNETLINK
  configure:11638: $PKG_CONFIG --exists --print-errors "libnfnetlink &gt;= 0.0.41"
  Package libnfnetlink was not found in the pkg-config search path.
  Perhaps you should add the directory containing `libnfnetlink.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'libnfnetlink' found
  configure:11641: $? = 1
  configure:11672: result: no
  No package 'libnfnetlink' found
  configure:11688: error: Package requirements (libnfnetlink &gt;= 0.0.41) were not met:
  
  No package 'libnfnetlink' found
  
  Consider adjusting the PKG_CONFIG_PATH environment variable if you
  installed software in a non-standard prefix.
  
  ac_cv_env_LIBNFNETLINK_CFLAGS_set=
  ac_cv_env_LIBNFNETLINK_CFLAGS_value=
  ac_cv_env_LIBNFNETLINK_LIBS_set=set
  ac_cv_env_LIBNFNETLINK_LIBS_value=:/home/jagadeesh/openwrt/openwrt/staging_dir/target-powerpc_8540_uClibc-0.9.33.2/lib/
  
  
  pkg_cv_LIBNFNETLINK_LIBS=:/home/jagadeesh/openwrt/openwrt/staging_dir/target-powerpc_8540_uClibc-0.9.33.2/lib/
  
  
  LIBNFNETLINK_CFLAGS=''
  LIBNFNETLINK_LIBS=':/home/jagadeesh/openwrt/openwrt/staging_dir/target-powerpc_8540_uClibc-0.9.33.2/lib/'
  </code></pre>
  
  <p>What is happening in the configure script for LIBNFNETLINK check:</p>
  
  <pre><code>pkg_failed=no
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBNFNETLINK" &gt;&amp;5
  $as_echo_n "checking for LIBNFNETLINK... " &gt;&amp;6; }
  
  if test -n "$LIBNFNETLINK_CFLAGS"; then
      pkg_cv_LIBNFNETLINK_CFLAGS="$LIBNFNETLINK_CFLAGS"
   elif test -n "$PKG_CONFIG"; then
      if test -n "$PKG_CONFIG" &amp;&amp; \
      { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnfnetlink &gt;= 0.0.41\""; } &gt;&amp;5
    ($PKG_CONFIG --exists --print-errors "libnfnetlink &gt;= 0.0.41") 2&gt;&amp;5
    ac_status=$?
    $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" &gt;&amp;5
    test $ac_status = 0; }; then
    pkg_cv_LIBNFNETLINK_CFLAGS=`$PKG_CONFIG --cflags "libnfnetlink &gt;= 0.0.41" 2&gt;/dev/null`
                        test "x$?" != "x0" &amp;&amp; pkg_failed=yes
  else
    pkg_failed=yes
  fi
   else
      pkg_failed=untried
  fi
  if test -n "$LIBNFNETLINK_LIBS"; then
      pkg_cv_LIBNFNETLINK_LIBS="$LIBNFNETLINK_LIBS"
   elif test -n "$PKG_CONFIG"; then
      if test -n "$PKG_CONFIG" &amp;&amp; \
      { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnfnetlink &gt;= 0.0.41\""; } &gt;&amp;5
    ($PKG_CONFIG --exists --print-errors "libnfnetlink &gt;= 0.0.41") 2&gt;&amp;5
    ac_status=$?
    $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" &gt;&amp;5
    test $ac_status = 0; }; then
    pkg_cv_LIBNFNETLINK_LIBS=`$PKG_CONFIG --libs "libnfnetlink &gt;= 0.0.41" 2&gt;/dev/null`
                        test "x$?" != "x0" &amp;&amp; pkg_failed=yes
  else
    pkg_failed=yes
  fi
   else
      pkg_failed=untried
  fi
  
  
  
  if test $pkg_failed = yes; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" &gt;&amp;5
  $as_echo "no" &gt;&amp;6; }
  
  if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
          _pkg_short_errors_supported=yes
  else
          _pkg_short_errors_supported=no
  fi
          if test $_pkg_short_errors_supported = yes; then
                  LIBNFNETLINK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnfnetlink &gt;= 0.0.41" 2&gt;&amp;1`
          else
                  LIBNFNETLINK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnfnetlink &gt;= 0.0.41" 2&gt;&amp;1`
          fi
          # Put the nasty error message in config.log where it belongs
          echo "$LIBNFNETLINK_PKG_ERRORS" &gt;&amp;5
  
          as_fn_error $? "Package requirements (libnfnetlink &gt;= 0.0.41) were not met:
  
  $LIBNFNETLINK_PKG_ERRORS
  
  
  
  if test $pkg_failed = yes; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" &gt;&amp;5
  $as_echo "no" &gt;&amp;6; }
  
  if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
          _pkg_short_errors_supported=yes
  else
          _pkg_short_errors_supported=no
  fi
          if test $_pkg_short_errors_supported = yes; then
                  LIBNFNETLINK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnfnetlink &gt;= 0.0.41" 2&gt;&amp;1`
          else
                  LIBNFNETLINK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnfnetlink &gt;= 0.0.41" 2&gt;&amp;1`
          fi
          # Put the nasty error message in config.log where it belongs
          echo "$LIBNFNETLINK_PKG_ERRORS" &gt;&amp;5
  
          as_fn_error $? "Package requirements (libnfnetlink &gt;= 0.0.41) were not met:
  $LIBNFNETLINK_PKG_ERRORS
  </code></pre>