git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8334 67ed7778-7388-44ab-90cf-0a291f65f57c
59 lines
1.2 KiB
Bash
59 lines
1.2 KiB
Bash
#!/bin/sh
|
|
|
|
top_builddir="@top_builddir@"
|
|
camlibdir="@camlibdir@"
|
|
libdir="@libdir@"
|
|
DESTDIR="@DESTDIR@"
|
|
MAKE="@MAKE@"
|
|
|
|
echo "---------------------"
|
|
pwd
|
|
echo "camlibdir=$camlibdir"
|
|
echo "libdir=$libdir"
|
|
echo "DESTDIR=$DESTDIR"
|
|
echo "top_builddir=$top_builddir"
|
|
|
|
CAMLIBS="${DESTDIR}${camlibdir}"
|
|
|
|
pwd="$(pwd)"
|
|
if test -d "${CAMLIBS}"; then
|
|
echo "Found camlibs in default install dir."
|
|
:
|
|
else
|
|
echo "Going to use our own camlib installation"
|
|
DESTDIR="${pwd}/_inst"
|
|
CAMLIBS="${DESTDIR}${camlibdir}"
|
|
for reldir in \
|
|
libgphoto2_port/libgphoto2_port \
|
|
libgphoto2 \
|
|
camlibs
|
|
do
|
|
(cd "${top_builddir}/${reldir}" && ${MAKE} DESTDIR="$DESTDIR" install)
|
|
done
|
|
ln -s "${CAMLIBS}" "_camlibs"
|
|
CAMLIBS="${pwd}/_camlibs"
|
|
if test -d "${CAMLIBS}"; then
|
|
echo "Test installation successful"
|
|
else
|
|
echo "Test installation failed"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
#LD_LIBRARY_PATH="$DESTDIR$libdir:$LD_LIBRARY_PATH"
|
|
#export LD_LIBRARY_PATH
|
|
echo "Using camlib dir: $CAMLIBS"
|
|
export CAMLIBS
|
|
|
|
echo "====================="
|
|
pwd
|
|
echo "camlibdir=$camlibdir"
|
|
echo "libdir=$libdir"
|
|
echo "DESTDIR=$DESTDIR"
|
|
echo "top_builddir=$top_builddir"
|
|
echo "CAMLIBS=$CAMLIBS"
|
|
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
|
|
echo "#####################"
|
|
|
|
./test-camera-list
|