mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2025-12-27 05:30:04 +01:00
Test the usage of -uninstalled packages with two .pc files: inst.pc and inst-uninstalled.pc. pkg-config should prefer the -uninstalled version unless PKG_CONFIG_DISABLE_UNINSTALLED is set. It should also use the default value of pc_top_builddir unless PKG_CONFIG_TOP_BUILD_DIR is set.
46 lines
870 B
Bash
Executable file
46 lines
870 B
Bash
Executable file
#! /bin/sh
|
|
|
|
set -e
|
|
|
|
. ${srcdir}/common
|
|
|
|
# Check to see if we find the uninstalled version
|
|
RESULT=''
|
|
run_test --uninstalled inst
|
|
|
|
RESULT=''
|
|
run_test --exists inst \>= 2.0
|
|
|
|
RESULT='-I$(top_builddir)/include'
|
|
run_test --cflags inst
|
|
|
|
RESULT='-L$(top_builddir)/lib -linst'
|
|
run_test --libs inst
|
|
|
|
# Alter PKG_CONFIG_TOP_BUILD_DIR
|
|
export PKG_CONFIG_TOP_BUILD_DIR='$(abs_top_builddir)'
|
|
|
|
RESULT='-I$(abs_top_builddir)/include'
|
|
run_test --cflags inst
|
|
|
|
RESULT='-L$(abs_top_builddir)/lib -linst'
|
|
run_test --libs inst
|
|
|
|
unset PKG_CONFIG_TOP_BUILD_DIR
|
|
|
|
# Check to see if we get the original back
|
|
export PKG_CONFIG_DISABLE_UNINSTALLED=1
|
|
|
|
RESULT=''
|
|
EXPECT_RETURN=1 run_test --uninstalled inst
|
|
|
|
RESULT=''
|
|
EXPECT_RETURN=1 run_test --exists inst \>= 2.0
|
|
|
|
RESULT='-I/inst/include'
|
|
run_test --cflags inst
|
|
|
|
RESULT='-L/inst/lib -linst'
|
|
run_test --libs inst
|
|
|
|
unset PKG_CONFIG_DISABLE_UNINSTALLED
|