/usr/share/aclocal/vdk-2.m4 is in libvdk2-dev 2.4.0-5.4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | # Configure paths for VDK
# Mario Motta 11-19-2000
# stolen from Frank Belew
# stolen from Manish Singh
# Shamelessly stolen from Owen Taylor
AC_DEFUN([AM_PATH_VDK_2],
[##
## Get the cflags and libraries from the vdk-config script
##
AC_ARG_WITH(vdk-prefix,[ --with-vdk-prefix=PFX Prefix where VDK is installed (optional)],
vdk_prefix="$withval", vdk_prefix="")
AC_ARG_WITH(vdk-exec-prefix,[ --with-vdk-exec-prefix=PFX Exec prefix where VDK is installed (optional)],
vdk_exec_prefix="$withval", vdk_exec_prefix="")
AC_ARG_ENABLE(vdktest, [ --disable-vdktest Do not try to compile and run a test VDK program],
, enable_vdktest=yes)
if test x$vdk_exec_prefix != x ; then
vdk_args="$vdk_args --exec-prefix=$vdk_exec_prefix"
if test x${VDK_CONFIG+set} != xset ; then
VDK_CONFIG=$vdk_exec_prefix/bin/vdk-config-2
fi
fi
if test x$vdk_prefix != x ; then
vdk_args="$vdk_args --prefix=$vdk_prefix"
if test x${VDK_CONFIG+set} != xset ; then
VDK_CONFIG=$vdk_prefix/bin/vdk-config-2
fi
fi
AC_PATH_PROG(VDK_CONFIG, vdk-config-2, no)
min_vdk_version=ifelse([$1], ,2.4.0,$1)
AC_MSG_CHECKING(for VDK - version >= $min_vdk_version)
no_vdk=""
if test "$VDK_CONFIG" = "no" ; then
no_vdk=yes
else
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
VDK_CFLAGS=`$VDK_CONFIG $vdkconf_args --cflags`
VDK_LIBS=`$VDK_CONFIG $vdkconf_args --libs`
vdk_major_version=`$VDK_CONFIG $vdk_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
vdk_minor_version=`$VDK_CONFIG $vdk_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
vdk_micro_version=`$VDK_CONFIG $vdk_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_vdktest" = "xyes" ; then
ac_save_CXXFLAGS="$CXXFLAGS"
ac_save_LIBS="$LIBS"
CXXFLAGS="$CXXFLAGS $VDK_CFLAGS"
LIBS="$LIBS $VDK_LIBS"
##
## Now check if the installed VDK is sufficiently new. (Also sanity
## checks the results of vdk-config to some extent
##
rm -f conf.vdktest
AC_TRY_RUN([
#include <stdio.h>
// #include <stdlib.h>
#include <vdk/vdkfeatures.h>
extern "C" int system(const char *s);
int main ()
{
system ("touch conf.vdktest");
if (($vdk_major_version > VDK_VERSION_MAJOR) ||
(($vdk_major_version == VDK_VERSION_MAJOR) && ($vdk_minor_version > VDK_VERSION_MINOR)) ||
(($vdk_major_version == VDK_VERSION_MAJOR) && ($vdk_minor_version == VDK_VERSION_MINOR) &&
($vdk_micro_version >= VDK_VERSION_MICRO)))
{
return 0;
}
else
{
printf("\n*** 'vdk-config-2 --version' returned %d.%d, but the minimum version\n", $vdk_major_version, $vdk_minor_version);
printf("*** of VDK required is %d.%d. If vdk-config is correct, then it is\n", VDK_VERSION_MAJOR, VDK_VERSION_MINOR);
printf("*** best to upgrade to the required version.\n");
printf("*** If vdk-config was wrong, set the environment variable VDK_CONFIG\n");
printf("*** to point to the correct copy of vdk-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}
],, no_vdk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_vdk" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$VDK_CONFIG" = "no" ; then
echo "*** The vdk-config-2 script installed by VDK could not be found"
echo "*** If VDK was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the VDK_CONFIG environment variable to the"
echo "*** full path to vdk-config."
else
if test -f conf.vdktest ; then
:
else
echo "*** Could not run VDK test program, checking why..."
CXXFLAGS="$CXXFLAGS $VDK_CFLAGS"
LIBS="$LIBS $VDK_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <vdk/vdk.h>
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding VDK or finding the wrong"
echo "*** version of VDK. If it is not finding VDK, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means VDK was incorrectly installed"
echo "*** or that you have moved VDK since it was installed. In the latter case, you"
echo "*** may want to edit the vdk-config script: $VDK_CONFIG" ])
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
VDK_CFLAGS=""
VDK_LIBS=""
ifelse([$3], , :, [$3])
fi
VDK_VERSION_MAJOR=2
VDK_VERSION_MINOR=4
VDK_VERSION_MICRO=0
AC_SUBST(VDK_VERSION_MAJOR)
AC_SUBST(VDK_VERSION_MINOR)
AC_SUBST(VDK_VERSION_MICRO)
AC_SUBST(VDK_CFLAGS)
AC_SUBST(VDK_LIBS)
rm -f conf.vdktest
])
## FC_EXPAND_DIR(VARNAME, DIR)
## expands occurrences of ${prefix} and ${exec_prefix} in the given DIR,
## and assigns the resulting string to VARNAME
## example: FC_EXPAND_DIR(LOCALEDIR, "$datadir/locale")
## eg, then: AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR")
## by Alexandre Oliva
## from http://www.cygnus.com/ml/automake/1998-Aug/0040.html
## AC_DEFUN(FC_EXPAND_DIR, [
## $1=$2
## $1=`(
## test "x$prefix" = xNONE && prefix="$ac_default_prefix"
## test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
## eval echo \""[$]$1"\"
## )`
## ])
|