mirror of https://github.com/ericonr/sndio.git
configure: Generate .pc file with variable-prefixed paths
This commit is contained in:
parent
a26f7fdf36
commit
e450bab99e
|
@ -31,6 +31,7 @@ distclean: clean
|
||||||
rm -f \
|
rm -f \
|
||||||
Makefile aucat/Makefile midicat/Makefile sndiod/Makefile \
|
Makefile aucat/Makefile midicat/Makefile sndiod/Makefile \
|
||||||
libsndio/Makefile \
|
libsndio/Makefile \
|
||||||
|
libsndio/sndio.pc \
|
||||||
sndioctl/Makefile \
|
sndioctl/Makefile \
|
||||||
examples/Makefile \
|
examples/Makefile \
|
||||||
contrib/init.d.sndiod \
|
contrib/init.d.sndiod \
|
||||||
|
|
|
@ -266,7 +266,7 @@ fi
|
||||||
|
|
||||||
|
|
||||||
for f in Makefile aucat/Makefile midicat/Makefile sndiod/Makefile \
|
for f in Makefile aucat/Makefile midicat/Makefile sndiod/Makefile \
|
||||||
libsndio/Makefile libsndio/sndio.pc \
|
libsndio/Makefile \
|
||||||
sndioctl/Makefile \
|
sndioctl/Makefile \
|
||||||
examples/Makefile \
|
examples/Makefile \
|
||||||
contrib/init.d.sndiod \
|
contrib/init.d.sndiod \
|
||||||
|
@ -293,6 +293,25 @@ do
|
||||||
< $f.in > $f
|
< $f.in > $f
|
||||||
done
|
done
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generate sndio.pc. Substitute path prefixes with ${prefix} or
|
||||||
|
# ${exec_prefix} variable names, so that they can be overriden by the
|
||||||
|
# user
|
||||||
|
#
|
||||||
|
cat <<EOF >libsndio/sndio.pc
|
||||||
|
prefix=${prefix}
|
||||||
|
exec_prefix=`echo $exec_prefix | sed -e "s:^${prefix}:\\${prefix}:"`
|
||||||
|
libdir=`echo $libdir | sed -e "s:^${exec_prefix}:\\${exec_prefix}:"`
|
||||||
|
includedir=`echo $includedir | sed -e "s:^${prefix}:\\${prefix}:"`
|
||||||
|
|
||||||
|
Name: sndio
|
||||||
|
Description: sndio library
|
||||||
|
Version: 1.7.0
|
||||||
|
Requires:
|
||||||
|
Libs: -L\${libdir} -lsndio
|
||||||
|
Cflags: -I\${includedir}
|
||||||
|
EOF
|
||||||
|
|
||||||
chmod +x contrib/init.d.sndiod
|
chmod +x contrib/init.d.sndiod
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
Name: sndio
|
|
||||||
Description: sndio library
|
|
||||||
Version: @version@
|
|
||||||
Requires:
|
|
||||||
Libs: -L@libdir@ -lsndio
|
|
||||||
Cflags: -I@includedir@
|
|
Loading…
Reference in New Issue