kopia lustrzana https://github.com/Hamlib/Hamlib
Merge branch 'master' of ssh://hamlib.git.sourceforge.net/gitroot/hamlib/hamlib
commit
13f6ffe397
|
@ -1,38 +1,38 @@
|
|||
# .gitignore for Hamlib
|
||||
# .gitignore
|
||||
.deps/
|
||||
.libs/
|
||||
*.o
|
||||
*.lo
|
||||
*.la
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
autom4te.cache/
|
||||
compile
|
||||
config.guess
|
||||
config.sub
|
||||
configure
|
||||
depcomp
|
||||
include/config.h.in
|
||||
missing
|
||||
py-compile
|
||||
.deps/
|
||||
Makefile
|
||||
bindings/hamlibvb.bas
|
||||
config.log
|
||||
config.status
|
||||
doc/hamlib.cfg
|
||||
hamlib-1.2.13svn/
|
||||
configure
|
||||
depcomp
|
||||
hamlib.pc
|
||||
hamlib.spec
|
||||
include/config.h
|
||||
include/stamp-h1
|
||||
install-sh
|
||||
libtool
|
||||
ltmain.sh
|
||||
missing
|
||||
py-compile
|
||||
autom4te.cache/
|
||||
bindings/hamlibvb.bas
|
||||
doc/hamlib.cfg
|
||||
include/config.h
|
||||
include/config.h.in
|
||||
include/stamp-h1
|
||||
macros/libtool.m4
|
||||
macros/ltoptions.m4
|
||||
macros/ltsugar.m4
|
||||
macros/ltversion.m4
|
||||
macros/lt~obsolete.m4
|
||||
*.o
|
||||
*.lo
|
||||
*.la
|
||||
.libs/
|
||||
rpcrig/rpc.rigd
|
||||
rpcrig/rpcrig.h
|
||||
rpcrig/rpcrig_clnt.c
|
||||
|
|
|
@ -7,8 +7,11 @@ AC_PREREQ(2.59)
|
|||
## ------------------------ ##
|
||||
## Autoconf initialisation. ##
|
||||
## ------------------------ ##
|
||||
dnl Please do not use '-' in the version number, 'make rpm' will fail
|
||||
AC_INIT([hamlib],[1.2.14~git],[hamlib-developer@lists.sourceforge.net])
|
||||
dnl Please do not use '-' in the version number, 'make rpm' will fail,
|
||||
dnl however, the use of '~' should be fine as apt (others?) will treat
|
||||
dnl it as an earlier version than the actual release. TNX KA6MAL
|
||||
dnl PACKAGE_NAME + " " + PACKAGE_VERSION must not exceed 20 chars!
|
||||
AC_INIT([Hamlib],[1.2.14~git],[hamlib-developer@lists.sourceforge.net],[hamlib],[http://www.hamlib.org])
|
||||
AC_CONFIG_SRCDIR([include/hamlib/rig.h])
|
||||
AC_CONFIG_MACRO_DIR([macros])
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ includedir=${prefix}/include
|
|||
|
||||
Name: hamlib
|
||||
Description: Library to control radio and rotator equipment.
|
||||
URL: @PACKAGE_URL@
|
||||
Requires:
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -lhamlib @MATH_LIBS@
|
||||
|
|
520
install-sh
520
install-sh
|
@ -1,520 +0,0 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2009-04-28.21; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
case $src in
|
||||
-*) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dst_arg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst;;
|
||||
esac
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writeable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
-*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test -z "$d" && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
|
@ -3,10 +3,10 @@ Elecraft K3 notes and Hamlib errata by Nate Bargmann, N0NB.
|
|||
While the K3 uses a large set of commands compatible with the standard Kenwood
|
||||
commands, a number are extended and others have side effects that are peculiar
|
||||
to the K3. As such, a separate set of elecraft.[c|h] files have been written
|
||||
to support the K2 and K3 in the best possible way using shared code when
|
||||
to support the K2 and K3 in the best possible way using shared code when
|
||||
possible. K3 specific code can be found in k3.c
|
||||
|
||||
As always, comments and bug reports should be submitted to
|
||||
As always, comments and bug reports should be submitted to
|
||||
hamlib-developer@lists.sourceforge.net
|
||||
|
||||
|
||||
|
@ -16,18 +16,18 @@ elecraft_open()
|
|||
The kenwood_open() function fails for the Elecraft radios as the function checks
|
||||
the backend to be certain the ID from the radio matches the backend that called
|
||||
the function. As the ID command of the Elecraft radios returns "017" which
|
||||
corresponds to the TS-570, the backend test fails. Rather than muck up a
|
||||
corresponds to the TS-570, the backend test fails. Rather than muck up a
|
||||
working function, I chose to implement an independent elecraft_open which not
|
||||
only checks for the existence of a connected radio that returns an ID of "017",
|
||||
it also checks for K2 or K3 extensions and sets a pair of private variables
|
||||
that may be used later for advanced functions. This way the backend should be
|
||||
that may be used later for advanced functions. This way the backend should be
|
||||
able to reliably test for either a K2 or K3 (needs more testing with the K2).
|
||||
|
||||
|
||||
k3_set_vfo()
|
||||
============
|
||||
|
||||
The K3's use of VFO A and VFO B differs from other rigs in that VFO A is
|
||||
The K3's use of VFO A and VFO B differs from other rigs in that VFO A is
|
||||
*always* the main or upper display and VFO B is *always* the sub or lower
|
||||
display. The A/B panel button simply swaps the contents of the two displays.
|
||||
The K3 manual states that VFO A is always the receive frequency and VFO B is
|
||||
|
@ -51,7 +51,7 @@ k3_get_mode() k3_get_mode()
|
|||
===========================
|
||||
|
||||
As an extension to the common Kenwood mode definitions, the K3 implements the
|
||||
custom 'DT' command which can query and set its data sub-modes. These are as
|
||||
custom 'DT' command which can query and set its data sub-modes. These are as
|
||||
follows:
|
||||
|
||||
DT0 DATA A
|
||||
|
@ -59,7 +59,7 @@ DT1 AFSK A
|
|||
DT2 FSK D
|
||||
DT3 PSK D
|
||||
|
||||
The main difference is that DT0 and DT1 are for soundcard audio modes from a
|
||||
The main difference is that DT0 and DT1 are for soundcard audio modes from a
|
||||
computer such as PSK31, MFSK, Olivia, etc. with DT1 being "optimized for RTTY".
|
||||
Conversely, DT2 and DT3 utilize "direct FSK in" on the accessory jack as well
|
||||
as enable the K3's internal encoding/decoding of RTTY and PSK31 modes (outside
|
||||
|
@ -84,7 +84,7 @@ should map to AFSK A (DT1) or FSK D (DT2).
|
|||
|
||||
The K3 can set any bandwidth in any mode using its custom 'BW' command. Band-
|
||||
width values are sent to the K3 in 10 Hz increments and the K3 will round down
|
||||
to the nearest 100 Hz values from 10 to 40 Hz. It will round down to the
|
||||
to the nearest 100 Hz values from 10 to 40 Hz. It will round down to the
|
||||
nearest 50 Hz values from 50 to 90 Hz. As an example, sending 'BW0236' (2360 in
|
||||
rigctl) will set the bandwidth to 2350 Hz (rounded down by the K3).
|
||||
|
||||
|
@ -92,13 +92,32 @@ The k3_get_mode function will query and return the actual bandwidth in use in
|
|||
Hertz.
|
||||
|
||||
|
||||
k3_set_ext_level()
|
||||
==================
|
||||
|
||||
This function is used to set the K3 for some extra level functions (rigctl
|
||||
command examples shown).
|
||||
|
||||
To clear the RIT and XIT offset, use the 'L' command with the token name
|
||||
'ritclr' for 'Level' to set in rigctl[d]. The prompted value is not used
|
||||
and can be safely set to 0. Use this level to clear the RIT and XIT offsets
|
||||
when it is not desired to turn RIT|XIT off.
|
||||
|
||||
|
||||
k3_get_ext_level()
|
||||
==================
|
||||
|
||||
This function is used to query the K3 for the IF center frequency. Use the 'l'
|
||||
command with the token name 'ifctr' for 'Level' to read in rigctl[d]. Value
|
||||
returned is 8210000.0 + queried value from rig (see K3 Programmers Reference,
|
||||
FI command). Returned type is a floating point value.
|
||||
This function is used to query the K3 for some extra information (rigctl
|
||||
command examples shown).
|
||||
|
||||
To query the IF center frequency, use the 'l' command with the token name
|
||||
'ifctr' for 'Level' to read in rigctl[d]. Value returned is 8210000.0 +
|
||||
queried value from rig (see K3 Programmers Reference, FI command). Returned
|
||||
type is a floating point value.
|
||||
|
||||
To query the TX status, use the 'l' command with the token name 'txst' for
|
||||
'Level' to read in rigctl[d]. Value returned is 1 for K3 in transmit mode
|
||||
and 0 for receive mode. Returned type is an integer.
|
||||
|
||||
|
||||
kenwood_get/set_ext_parms()
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Hamlib Elecraft backend--support Elecraft extensions to Kenwood commands
|
||||
* Copyright (C) 2010 by Nate Bargmann, n0nb@n0nb.us
|
||||
* Copyright (C) 2010,2011 by Nate Bargmann, n0nb@n0nb.us
|
||||
* Copyright (C) 2011 by Alexander Sack, Alexander Sack, pisymbol@gmail.com
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -51,6 +52,9 @@ const struct confparams elecraft_ext_levels[] = {
|
|||
{ TOK_TX_STAT, "txst", "TX status", "TX status",
|
||||
NULL, RIG_CONF_CHECKBUTTON, { { } },
|
||||
},
|
||||
{ TOK_RIT_CLR, "ritclr", "RIT clear", "RIT clear",
|
||||
NULL, RIG_CONF_BUTTON, { { } },
|
||||
},
|
||||
{ RIG_CONF_END, NULL, }
|
||||
};
|
||||
|
||||
|
@ -58,7 +62,7 @@ const struct confparams elecraft_ext_levels[] = {
|
|||
/* Private function declarations */
|
||||
int verify_kenwood_id(RIG *rig, char *id);
|
||||
int elecraft_get_extension_level(RIG *rig, const char *cmd, int *ext_level);
|
||||
|
||||
int elecraft_get_firmware_revision_level(RIG *rig, const char *cmd, char *fw_rev);
|
||||
|
||||
/* Shared backend function definitions */
|
||||
|
||||
|
@ -100,7 +104,7 @@ int elecraft_open(RIG *rig)
|
|||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: K2 level is %d, %s\n", __func__,
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: K2 level is %d, %s\n", __func__,
|
||||
priv->k2_ext_lvl, elec_ext_id_str_lst[priv->k2_ext_lvl].id);
|
||||
|
||||
break;
|
||||
|
@ -109,18 +113,23 @@ int elecraft_open(RIG *rig)
|
|||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: K2 level is %d, %s\n", __func__,
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: K2 level is %d, %s\n", __func__,
|
||||
priv->k2_ext_lvl, elec_ext_id_str_lst[priv->k2_ext_lvl].id);
|
||||
|
||||
err = elecraft_get_extension_level(rig, "K3", &priv->k3_ext_lvl);
|
||||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: K3 level is %d, %s\n", __func__,
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: K3 level is %d, %s\n", __func__,
|
||||
priv->k3_ext_lvl, elec_ext_id_str_lst[priv->k3_ext_lvl].id);
|
||||
|
||||
err = elecraft_get_firmware_revision_level(rig, "RVM", priv->k3_fw_rev);
|
||||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
||||
break;
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: unrecognized rig model %d\n",
|
||||
rig_debug(RIG_DEBUG_WARN, "%s: unrecognized rig model %d\n",
|
||||
__func__, rig->caps->rig_model);
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
|
@ -147,13 +156,13 @@ int verify_kenwood_id(RIG *rig, char *id)
|
|||
/* Check for an Elecraft K2|K3 which returns "017" */
|
||||
err = kenwood_get_id(rig, id);
|
||||
if (err != RIG_OK) {
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: cannot get identification\n", __func__);
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: cannot get identification\n", __func__);
|
||||
return err;
|
||||
}
|
||||
|
||||
/* ID is 'ID017;' */
|
||||
if (strlen(id) < 5) {
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: unknown ID type (%s)\n", __func__, id);
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: unknown ID type (%s)\n", __func__, id);
|
||||
return -RIG_EPROTO;
|
||||
}
|
||||
|
||||
|
@ -163,10 +172,10 @@ int verify_kenwood_id(RIG *rig, char *id)
|
|||
idptr++;
|
||||
|
||||
if (strcmp("017", idptr) != 0) {
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: Rig (%s) is not a K2 or K3\n", __func__, id);
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig (%s) is not a K2 or K3\n", __func__, id);
|
||||
return -RIG_EPROTO;
|
||||
} else
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: Rig ID is %s\n", __func__, id);
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: Rig ID is %s\n", __func__, id);
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
@ -187,7 +196,7 @@ int elecraft_get_extension_level(RIG *rig, const char *cmd, int *ext_level)
|
|||
|
||||
err = kenwood_safe_transaction(rig, cmd, buf, KENWOOD_MAX_BUF_LEN, 4);
|
||||
if (err != RIG_OK) {
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: Cannot get K2|K3 ID\n", __func__);
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: Cannot get K2|K3 ID\n", __func__);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -200,11 +209,47 @@ int elecraft_get_extension_level(RIG *rig, const char *cmd, int *ext_level)
|
|||
|
||||
if (strcmp(elec_ext_id_str_lst[i].id, bufptr) == 0) {
|
||||
*ext_level = elec_ext_id_str_lst[i].level;
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: Extension level is %d, %s\n",
|
||||
__func__, *ext_level, elec_ext_id_str_lst[i].id);
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: %s extension level is %d, %s\n",
|
||||
__func__, cmd, *ext_level, elec_ext_id_str_lst[i].id);
|
||||
}
|
||||
}
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
/* Determine firmware revision level */
|
||||
|
||||
int elecraft_get_firmware_revision_level(RIG *rig, const char *cmd, char *fw_rev)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!rig || !fw_rev)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
int err;
|
||||
char *bufptr;
|
||||
char buf[KENWOOD_MAX_BUF_LEN];
|
||||
size_t size = KENWOOD_MAX_BUF_LEN;
|
||||
|
||||
err = kenwood_transaction(rig, cmd, sizeof(cmd), buf, &size);
|
||||
if (err != RIG_OK) {
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: Cannot get firmeware revision level\n", __func__);
|
||||
return err;
|
||||
}
|
||||
|
||||
/* Get the actual firmware revision number. */
|
||||
bufptr = &buf[0];
|
||||
|
||||
/* Skip the command string */
|
||||
bufptr += sizeof(cmd);
|
||||
|
||||
/* Ignore leading zero's */
|
||||
while (bufptr && *bufptr == '0') { bufptr++; }
|
||||
|
||||
/* Copy out */
|
||||
strncpy(fw_rev, bufptr, sizeof(bufptr));
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: Elecraft firmware revision is %s\n", __func__, fw_rev);
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
|
|
@ -55,9 +55,12 @@ enum k3_data_submodes_e {
|
|||
/* Private tokens used for ext_lvl function in Elecraft backends.
|
||||
* Extra levels which are rig specific should be coded in
|
||||
* the individual rig files and token #s >= 101.
|
||||
*
|
||||
* See Private Elecraft extra levels definitions in elecraft.c
|
||||
*/
|
||||
#define TOK_IF_FREQ TOKEN_BACKEND(101) /* K3 FI command */
|
||||
#define TOK_TX_STAT TOKEN_BACKEND(102) /* K3 TQ command */
|
||||
#define TOK_RIT_CLR TOKEN_BACKEND(103) /* K3 RC command */
|
||||
|
||||
/* Token structure assigned to .cfgparams in rig_caps */
|
||||
extern const struct confparams elecraft_ext_levels[];
|
||||
|
|
12
kenwood/k2.c
12
kenwood/k2.c
|
@ -104,7 +104,7 @@ const struct rig_caps k2_caps = {
|
|||
.rig_model = RIG_MODEL_K2,
|
||||
.model_name = "K2",
|
||||
.mfg_name = "Elecraft",
|
||||
.version = "20110218",
|
||||
.version = "20110603",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_BETA,
|
||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||
|
@ -387,7 +387,7 @@ int k2_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
|||
tmp[4] = '\0';
|
||||
*width = atoi(tmp);
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: Mode: %d, Width: %04li\n", __func__, *mode, *width);
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: Mode: %d, Width: %04li\n", __func__, *mode, *width);
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
@ -429,7 +429,7 @@ int k2_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val)
|
|||
}
|
||||
break;
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: Unsupported get_ext_level %d\n",
|
||||
rig_debug(RIG_DEBUG_WARN, "%s: Unsupported get_ext_level %d\n",
|
||||
__func__, token);
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
|
@ -477,7 +477,7 @@ int k2_probe_mdfw(RIG *rig, struct kenwood_priv_data *priv)
|
|||
|
||||
strcpy(fw, buf);
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: Mode value: %s, Filter Width value: %s\n",
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: Mode value: %s, Filter Width value: %s\n",
|
||||
__func__, mode, fw);
|
||||
|
||||
/* Now begin the process of querying the available modes and filters. */
|
||||
|
@ -496,7 +496,7 @@ int k2_probe_mdfw(RIG *rig, struct kenwood_priv_data *priv)
|
|||
priv->k2_md_rtty = 1; /* set flag for RTTY mode installed */
|
||||
else
|
||||
priv->k2_md_rtty = 0; /* RTTY module not installed */
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: RTTY flag is: %d\n", __func__, priv->k2_md_rtty);
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: RTTY flag is: %d\n", __func__, priv->k2_md_rtty);
|
||||
|
||||
i = (priv->k2_md_rtty == 1) ? 2 : 1;
|
||||
|
||||
|
@ -621,7 +621,7 @@ int k2_pop_fw_lst(RIG *rig, const char *cmd)
|
|||
tmp[1] = '\0';
|
||||
flt->filt_list[f-1].afslot = atoi(tmp);
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: Width: %04li, FSlot: %i, AFSlot %i\n",
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: Width: %04li, FSlot: %i, AFSlot %i\n",
|
||||
__func__, flt->filt_list[f-1].width, flt->filt_list[f-1].fslot, flt->filt_list[f-1].afslot);
|
||||
}
|
||||
|
||||
|
|
73
kenwood/k3.c
73
kenwood/k3.c
|
@ -63,6 +63,7 @@ static struct kenwood_priv_caps k3_priv_caps = {
|
|||
int k3_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width);
|
||||
int k3_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width);
|
||||
int k3_set_vfo(RIG *rig, vfo_t vfo);
|
||||
int k3_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val);
|
||||
int k3_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val);
|
||||
int k3_set_rit(RIG * rig, vfo_t vfo, shortfreq_t rit);
|
||||
int k3_set_xit(RIG * rig, vfo_t vfo, shortfreq_t rit);
|
||||
|
@ -90,7 +91,7 @@ const struct rig_caps k3_caps = {
|
|||
.rig_model = RIG_MODEL_K3,
|
||||
.model_name = "K3/KX3",
|
||||
.mfg_name = "Elecraft",
|
||||
.version = "20110522",
|
||||
.version = "20110603",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_BETA,
|
||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||
|
@ -210,6 +211,7 @@ const struct rig_caps k3_caps = {
|
|||
.get_ext_parm = kenwood_get_ext_parm,
|
||||
.set_level = kenwood_set_level,
|
||||
.get_level = kenwood_get_level,
|
||||
.set_ext_level = k3_set_ext_level,
|
||||
.get_ext_level = k3_get_ext_level,
|
||||
.vfo_op = kenwood_vfo_op,
|
||||
.set_trn = kenwood_set_trn,
|
||||
|
@ -253,7 +255,7 @@ int k3_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
|||
if (temp_m == RIG_MODE_RTTY) {
|
||||
err = kenwood_safe_transaction(rig, "DT", buf, KENWOOD_MAX_BUF_LEN, 4);
|
||||
if (err != RIG_OK) {
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: Cannot read K3 DT value\n",
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: Cannot read K3 DT value\n",
|
||||
__func__);
|
||||
return err;
|
||||
}
|
||||
|
@ -265,14 +267,14 @@ int k3_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
|||
*mode = RIG_MODE_RTTY;
|
||||
break;
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: unsupported data sub-mode %c\n",
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: unsupported data sub-mode %c\n",
|
||||
__func__, buf[2]);
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
} else if (temp_m == RIG_MODE_RTTYR) {
|
||||
err = kenwood_safe_transaction(rig, "DT", buf, KENWOOD_MAX_BUF_LEN, 4);
|
||||
if (err != RIG_OK) {
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: Cannot read K3 DT value\n",
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: Cannot read K3 DT value\n",
|
||||
__func__);
|
||||
return err;
|
||||
}
|
||||
|
@ -284,7 +286,7 @@ int k3_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
|||
*mode = RIG_MODE_RTTYR;
|
||||
break;
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: unsupported data sub-mode %c\n",
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: unsupported data sub-mode %c\n",
|
||||
__func__, buf[2]);
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
|
@ -297,7 +299,7 @@ int k3_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
|||
*/
|
||||
err = kenwood_safe_transaction(rig, "BW", buf, KENWOOD_MAX_BUF_LEN, 7);
|
||||
if (err != RIG_OK) {
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: Cannot read K3 BW value\n", __func__);
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: Cannot read K3 BW value\n", __func__);
|
||||
return err;
|
||||
}
|
||||
*width = atoi(&buf[2]) * 10;
|
||||
|
@ -401,6 +403,50 @@ int k3_set_vfo(RIG *rig, vfo_t vfo)
|
|||
}
|
||||
|
||||
|
||||
/* Support the RC command for clearing RIT/XIT,
|
||||
*
|
||||
* token Defined in elecraft.h or this file
|
||||
* val Type depends on token type from confparams structure:
|
||||
* NUMERIC: val.f
|
||||
* COMBO: val.i, starting from 0 Index to a string table.
|
||||
* STRING: val.cs for set, val.s for get
|
||||
* CHECKBUTTON: val.i 0/1
|
||||
*
|
||||
* See Private Elecraft extra levels definitions in elecraft.c and
|
||||
* private token #define in elecraft.h
|
||||
*/
|
||||
int k3_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!rig)
|
||||
return -RIG_EINVAL;
|
||||
|
||||
// char buf[KENWOOD_MAX_BUF_LEN];
|
||||
int err;
|
||||
// const struct confparams *cfp;
|
||||
|
||||
// cfp = rig_ext_lookup_tok(rig, token);
|
||||
|
||||
switch(token) {
|
||||
case TOK_RIT_CLR:
|
||||
/* Clear offset */
|
||||
err = kenwood_simple_cmd(rig, "RC");
|
||||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
||||
/* val is ignored for RC command */
|
||||
break;
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_WARN, "%s: Unsupported set_ext_level %d\n",
|
||||
__func__, token);
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
||||
/* Support the FI command for reading the IF center frequency,
|
||||
* useful for panadapters and such that need to know the IF center.
|
||||
* TQ command is a quick transmit status query--K2/K3 only.
|
||||
|
@ -451,7 +497,7 @@ int k3_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val)
|
|||
}
|
||||
break;
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: Unsupported get_ext_level %d\n",
|
||||
rig_debug(RIG_DEBUG_WARN, "%s: Unsupported get_ext_level %d\n",
|
||||
__func__, token);
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
|
@ -560,19 +606,20 @@ int set_rit_xit(RIG * rig, char *func, shortfreq_t rit)
|
|||
return -RIG_EINVAL;
|
||||
|
||||
if (rit == 0) {
|
||||
/* K3 RIT Off command */
|
||||
/* Clear offset first */
|
||||
err = kenwood_simple_cmd(rig, "RC");
|
||||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
||||
/* K3 RIT|XIT Off command */
|
||||
err = kenwood_simple_cmd(rig, func);
|
||||
if (err != RIG_OK)
|
||||
return err;
|
||||
|
||||
/* Clear offset */
|
||||
err = kenwood_simple_cmd(rig, "RC");
|
||||
if (err != RIG_OK)
|
||||
return err;
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
/* Set offset and turn on RIT */
|
||||
/* Set offset and turn on RIT|XIT */
|
||||
if (rit <= 9999 && rit >= -9999) {
|
||||
offs = (rit < 0) ? '-' : '+';
|
||||
snprintf(cmd, 8, "RO%c%04d", offs, abs((int)rit));
|
||||
|
|
|
@ -71,6 +71,7 @@ struct kenwood_priv_data {
|
|||
int k2_ext_lvl; /* Initial K2 extension level */
|
||||
int k3_ext_lvl; /* Initial K3 extension level */
|
||||
int k2_md_rtty; /* K2 RTTY mode available flag, 1 = RTTY, 0 = N/A */
|
||||
char k3_fw_rev[KENWOOD_MAX_BUF_LEN]; /* K3 firmware revision level */
|
||||
};
|
||||
|
||||
#define kenwood_caps(rig) ((struct kenwood_priv_caps *)(rig)->caps->priv)
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
# Portability macros for glibc argz. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
# Written by Gary V. Vaughan <gary@gnu.org>
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 5 argz.m4
|
||||
|
||||
AC_DEFUN([gl_FUNC_ARGZ],
|
||||
[gl_PREREQ_ARGZ
|
||||
|
||||
AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT])
|
||||
|
||||
AC_CHECK_TYPES([error_t],
|
||||
[],
|
||||
[AC_DEFINE([error_t], [int],
|
||||
[Define to a type to use for `error_t' if it is not otherwise available.])
|
||||
AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h
|
||||
does not typedef error_t.])],
|
||||
[#if defined(HAVE_ARGZ_H)
|
||||
# include <argz.h>
|
||||
#endif])
|
||||
|
||||
ARGZ_H=
|
||||
AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \
|
||||
argz_next argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])])
|
||||
|
||||
dnl if have system argz functions, allow forced use of
|
||||
dnl libltdl-supplied implementation (and default to do so
|
||||
dnl on "known bad" systems). Could use a runtime check, but
|
||||
dnl (a) detecting malloc issues is notoriously unreliable
|
||||
dnl (b) only known system that declares argz functions,
|
||||
dnl provides them, yet they are broken, is cygwin
|
||||
dnl releases prior to 16-Mar-2007 (1.5.24 and earlier)
|
||||
dnl So, it's more straightforward simply to special case
|
||||
dnl this for known bad systems.
|
||||
AS_IF([test -z "$ARGZ_H"],
|
||||
[AC_CACHE_CHECK(
|
||||
[if argz actually works],
|
||||
[lt_cv_sys_argz_works],
|
||||
[[case $host_os in #(
|
||||
*cygwin*)
|
||||
lt_cv_sys_argz_works=no
|
||||
if test "$cross_compiling" != no; then
|
||||
lt_cv_sys_argz_works="guessing no"
|
||||
else
|
||||
lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/'
|
||||
save_IFS=$IFS
|
||||
IFS=-.
|
||||
set x `uname -r | sed -e "$lt_sed_extract_leading_digits"`
|
||||
IFS=$save_IFS
|
||||
lt_os_major=${2-0}
|
||||
lt_os_minor=${3-0}
|
||||
lt_os_micro=${4-0}
|
||||
if test "$lt_os_major" -gt 1 \
|
||||
|| { test "$lt_os_major" -eq 1 \
|
||||
&& { test "$lt_os_minor" -gt 5 \
|
||||
|| { test "$lt_os_minor" -eq 5 \
|
||||
&& test "$lt_os_micro" -gt 24; }; }; }; then
|
||||
lt_cv_sys_argz_works=yes
|
||||
fi
|
||||
fi
|
||||
;; #(
|
||||
*) lt_cv_sys_argz_works=yes ;;
|
||||
esac]])
|
||||
AS_IF([test $lt_cv_sys_argz_works = yes],
|
||||
[AC_DEFINE([HAVE_WORKING_ARGZ], 1,
|
||||
[This value is set to 1 to indicate that the system argz facility works])],
|
||||
[ARGZ_H=argz.h
|
||||
AC_LIBOBJ([argz])])])
|
||||
|
||||
AC_SUBST([ARGZ_H])
|
||||
])
|
||||
|
||||
# Prerequisites of lib/argz.c.
|
||||
AC_DEFUN([gl_PREREQ_ARGZ], [:])
|
Plik diff jest za duży
Load Diff
804
macros/ltdl.m4
804
macros/ltdl.m4
|
@ -1,804 +0,0 @@
|
|||
# ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 1999-2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Written by Thomas Tanner, 1999
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 17 LTDL_INIT
|
||||
|
||||
# LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])
|
||||
# ------------------------------------------
|
||||
# DIRECTORY contains the libltdl sources. It is okay to call this
|
||||
# function multiple times, as long as the same DIRECTORY is always given.
|
||||
AC_DEFUN([LT_CONFIG_LTDL_DIR],
|
||||
[AC_BEFORE([$0], [LTDL_INIT])
|
||||
_$0($*)
|
||||
])# LT_CONFIG_LTDL_DIR
|
||||
|
||||
# We break this out into a separate macro, so that we can call it safely
|
||||
# internally without being caught accidentally by the sed scan in libtoolize.
|
||||
m4_defun([_LT_CONFIG_LTDL_DIR],
|
||||
[dnl remove trailing slashes
|
||||
m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))
|
||||
m4_case(_LTDL_DIR,
|
||||
[], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.'
|
||||
m4_if(_ARG_DIR, [.],
|
||||
[],
|
||||
[m4_define([_LTDL_DIR], _ARG_DIR)
|
||||
_LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],
|
||||
[m4_if(_ARG_DIR, _LTDL_DIR,
|
||||
[],
|
||||
[m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])])
|
||||
m4_popdef([_ARG_DIR])
|
||||
])# _LT_CONFIG_LTDL_DIR
|
||||
|
||||
# Initialise:
|
||||
m4_define([_LTDL_DIR], [])
|
||||
|
||||
|
||||
# _LT_BUILD_PREFIX
|
||||
# ----------------
|
||||
# If Autoconf is new enough, expand to `${top_build_prefix}', otherwise
|
||||
# to `${top_builddir}/'.
|
||||
m4_define([_LT_BUILD_PREFIX],
|
||||
[m4_ifdef([AC_AUTOCONF_VERSION],
|
||||
[m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]),
|
||||
[-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX],
|
||||
[${top_build_prefix}],
|
||||
[${top_builddir}/])],
|
||||
[${top_build_prefix}])],
|
||||
[${top_builddir}/])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# LTDL_CONVENIENCE
|
||||
# ----------------
|
||||
# sets LIBLTDL to the link flags for the libltdl convenience library and
|
||||
# LTDLINCL to the include flags for the libltdl header and adds
|
||||
# --enable-ltdl-convenience to the configure arguments. Note that
|
||||
# AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with
|
||||
# '${top_build_prefix}' if available, otherwise with '${top_builddir}/',
|
||||
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
|
||||
# quotes!). If your package is not flat and you're not using automake,
|
||||
# define top_build_prefix, top_builddir, and top_srcdir appropriately
|
||||
# in your Makefiles.
|
||||
AC_DEFUN([LTDL_CONVENIENCE],
|
||||
[AC_BEFORE([$0], [LTDL_INIT])dnl
|
||||
dnl Although the argument is deprecated and no longer documented,
|
||||
dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
|
||||
dnl here make sure it is the same as any other declaration of libltdl's
|
||||
dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
|
||||
dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
|
||||
m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
|
||||
_$0()
|
||||
])# LTDL_CONVENIENCE
|
||||
|
||||
# AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
|
||||
# now we have LT_CONFIG_LTDL_DIR:
|
||||
AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
|
||||
[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
|
||||
_LTDL_CONVENIENCE])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
|
||||
|
||||
|
||||
# _LTDL_CONVENIENCE
|
||||
# -----------------
|
||||
# Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]).
|
||||
m4_defun([_LTDL_CONVENIENCE],
|
||||
[case $enable_ltdl_convenience in
|
||||
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
|
||||
"") enable_ltdl_convenience=yes
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
|
||||
esac
|
||||
LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
|
||||
LTDLDEPS=$LIBLTDL
|
||||
LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
|
||||
|
||||
AC_SUBST([LIBLTDL])
|
||||
AC_SUBST([LTDLDEPS])
|
||||
AC_SUBST([LTDLINCL])
|
||||
|
||||
# For backwards non-gettext consistent compatibility...
|
||||
INCLTDL="$LTDLINCL"
|
||||
AC_SUBST([INCLTDL])
|
||||
])# _LTDL_CONVENIENCE
|
||||
|
||||
|
||||
# LTDL_INSTALLABLE
|
||||
# ----------------
|
||||
# sets LIBLTDL to the link flags for the libltdl installable library
|
||||
# and LTDLINCL to the include flags for the libltdl header and adds
|
||||
# --enable-ltdl-install to the configure arguments. Note that
|
||||
# AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl
|
||||
# is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if
|
||||
# available, otherwise with '${top_builddir}/', and LTDLINCL will be
|
||||
# prefixed with '${top_srcdir}/' (note the single quotes!). If your
|
||||
# package is not flat and you're not using automake, define top_build_prefix,
|
||||
# top_builddir, and top_srcdir appropriately in your Makefiles.
|
||||
# In the future, this macro may have to be called after LT_INIT.
|
||||
AC_DEFUN([LTDL_INSTALLABLE],
|
||||
[AC_BEFORE([$0], [LTDL_INIT])dnl
|
||||
dnl Although the argument is deprecated and no longer documented,
|
||||
dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
|
||||
dnl here make sure it is the same as any other declaration of libltdl's
|
||||
dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
|
||||
dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
|
||||
m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
|
||||
_$0()
|
||||
])# LTDL_INSTALLABLE
|
||||
|
||||
# AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,
|
||||
# now we have LT_CONFIG_LTDL_DIR:
|
||||
AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
|
||||
[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
|
||||
_LTDL_INSTALLABLE])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
|
||||
|
||||
|
||||
# _LTDL_INSTALLABLE
|
||||
# -----------------
|
||||
# Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]).
|
||||
m4_defun([_LTDL_INSTALLABLE],
|
||||
[if test -f $prefix/lib/libltdl.la; then
|
||||
lt_save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="-L$prefix/lib $LDFLAGS"
|
||||
AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes])
|
||||
LDFLAGS="$lt_save_LDFLAGS"
|
||||
if test x"${lt_lib_ltdl-no}" = xyes; then
|
||||
if test x"$enable_ltdl_install" != xyes; then
|
||||
# Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install
|
||||
AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install'])
|
||||
enable_ltdl_install=no
|
||||
fi
|
||||
elif test x"$enable_ltdl_install" = xno; then
|
||||
AC_MSG_WARN([libltdl not installed, but installation disabled])
|
||||
fi
|
||||
fi
|
||||
|
||||
# If configure.ac declared an installable ltdl, and the user didn't override
|
||||
# with --disable-ltdl-install, we will install the shipped libltdl.
|
||||
case $enable_ltdl_install in
|
||||
no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
|
||||
LIBLTDL="-lltdl"
|
||||
LTDLDEPS=
|
||||
LTDLINCL=
|
||||
;;
|
||||
*) enable_ltdl_install=yes
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install"
|
||||
LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la"
|
||||
LTDLDEPS=$LIBLTDL
|
||||
LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST([LIBLTDL])
|
||||
AC_SUBST([LTDLDEPS])
|
||||
AC_SUBST([LTDLINCL])
|
||||
|
||||
# For backwards non-gettext consistent compatibility...
|
||||
INCLTDL="$LTDLINCL"
|
||||
AC_SUBST([INCLTDL])
|
||||
])# LTDL_INSTALLABLE
|
||||
|
||||
|
||||
# _LTDL_MODE_DISPATCH
|
||||
# -------------------
|
||||
m4_define([_LTDL_MODE_DISPATCH],
|
||||
[dnl If _LTDL_DIR is `.', then we are configuring libltdl itself:
|
||||
m4_if(_LTDL_DIR, [],
|
||||
[],
|
||||
dnl if _LTDL_MODE was not set already, the default value is `subproject':
|
||||
[m4_case(m4_default(_LTDL_MODE, [subproject]),
|
||||
[subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR)
|
||||
_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])],
|
||||
[nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])],
|
||||
[recursive], [],
|
||||
[m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl
|
||||
dnl Be careful not to expand twice:
|
||||
m4_define([$0], [])
|
||||
])# _LTDL_MODE_DISPATCH
|
||||
|
||||
|
||||
# _LT_LIBOBJ(MODULE_NAME)
|
||||
# -----------------------
|
||||
# Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead
|
||||
# of into LIBOBJS.
|
||||
AC_DEFUN([_LT_LIBOBJ], [
|
||||
m4_pattern_allow([^_LT_LIBOBJS$])
|
||||
_LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
|
||||
])# _LT_LIBOBJS
|
||||
|
||||
|
||||
# LTDL_INIT([OPTIONS])
|
||||
# --------------------
|
||||
# Clients of libltdl can use this macro to allow the installer to
|
||||
# choose between a shipped copy of the ltdl sources or a preinstalled
|
||||
# version of the library. If the shipped ltdl sources are not in a
|
||||
# subdirectory named libltdl, the directory name must be given by
|
||||
# LT_CONFIG_LTDL_DIR.
|
||||
AC_DEFUN([LTDL_INIT],
|
||||
[dnl Parse OPTIONS
|
||||
_LT_SET_OPTIONS([$0], [$1])
|
||||
|
||||
dnl We need to keep our own list of libobjs separate from our parent project,
|
||||
dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
|
||||
dnl we look for our own LIBOBJs.
|
||||
m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
|
||||
m4_pushdef([AC_LIBSOURCES])
|
||||
|
||||
dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
|
||||
m4_if(_LTDL_MODE, [],
|
||||
[m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
|
||||
m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
|
||||
[m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
|
||||
|
||||
AC_ARG_WITH([included_ltdl],
|
||||
[AS_HELP_STRING([--with-included-ltdl],
|
||||
[use the GNU ltdl sources included here])])
|
||||
|
||||
if test "x$with_included_ltdl" != xyes; then
|
||||
# We are not being forced to use the included libltdl sources, so
|
||||
# decide whether there is a useful installed version we can use.
|
||||
AC_CHECK_HEADER([ltdl.h],
|
||||
[AC_CHECK_DECL([lt_dlinterface_register],
|
||||
[AC_CHECK_LIB([ltdl], [lt_dladvise_preload],
|
||||
[with_included_ltdl=no],
|
||||
[with_included_ltdl=yes])],
|
||||
[with_included_ltdl=yes],
|
||||
[AC_INCLUDES_DEFAULT
|
||||
#include <ltdl.h>])],
|
||||
[with_included_ltdl=yes],
|
||||
[AC_INCLUDES_DEFAULT]
|
||||
)
|
||||
fi
|
||||
|
||||
dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
|
||||
dnl was called yet, then for old times' sake, we assume libltdl is in an
|
||||
dnl eponymous directory:
|
||||
AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
|
||||
|
||||
AC_ARG_WITH([ltdl_include],
|
||||
[AS_HELP_STRING([--with-ltdl-include=DIR],
|
||||
[use the ltdl headers installed in DIR])])
|
||||
|
||||
if test -n "$with_ltdl_include"; then
|
||||
if test -f "$with_ltdl_include/ltdl.h"; then :
|
||||
else
|
||||
AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include'])
|
||||
fi
|
||||
else
|
||||
with_ltdl_include=no
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([ltdl_lib],
|
||||
[AS_HELP_STRING([--with-ltdl-lib=DIR],
|
||||
[use the libltdl.la installed in DIR])])
|
||||
|
||||
if test -n "$with_ltdl_lib"; then
|
||||
if test -f "$with_ltdl_lib/libltdl.la"; then :
|
||||
else
|
||||
AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib'])
|
||||
fi
|
||||
else
|
||||
with_ltdl_lib=no
|
||||
fi
|
||||
|
||||
case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
|
||||
,yes,no,no,)
|
||||
m4_case(m4_default(_LTDL_TYPE, [convenience]),
|
||||
[convenience], [_LTDL_CONVENIENCE],
|
||||
[installable], [_LTDL_INSTALLABLE],
|
||||
[m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)])
|
||||
;;
|
||||
,no,no,no,)
|
||||
# If the included ltdl is not to be used, then use the
|
||||
# preinstalled libltdl we found.
|
||||
AC_DEFINE([HAVE_LTDL], [1],
|
||||
[Define this if a modern libltdl is already installed])
|
||||
LIBLTDL=-lltdl
|
||||
LTDLDEPS=
|
||||
LTDLINCL=
|
||||
;;
|
||||
,no*,no,*)
|
||||
AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together])
|
||||
;;
|
||||
*) with_included_ltdl=no
|
||||
LIBLTDL="-L$with_ltdl_lib -lltdl"
|
||||
LTDLDEPS=
|
||||
LTDLINCL="-I$with_ltdl_include"
|
||||
;;
|
||||
esac
|
||||
INCLTDL="$LTDLINCL"
|
||||
|
||||
# Report our decision...
|
||||
AC_MSG_CHECKING([where to find libltdl headers])
|
||||
AC_MSG_RESULT([$LTDLINCL])
|
||||
AC_MSG_CHECKING([where to find libltdl library])
|
||||
AC_MSG_RESULT([$LIBLTDL])
|
||||
|
||||
_LTDL_SETUP
|
||||
|
||||
dnl restore autoconf definition.
|
||||
m4_popdef([AC_LIBOBJ])
|
||||
m4_popdef([AC_LIBSOURCES])
|
||||
|
||||
AC_CONFIG_COMMANDS_PRE([
|
||||
_ltdl_libobjs=
|
||||
_ltdl_ltlibobjs=
|
||||
if test -n "$_LT_LIBOBJS"; then
|
||||
# Remove the extension.
|
||||
_lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
|
||||
for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
|
||||
_ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
|
||||
_ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
|
||||
done
|
||||
fi
|
||||
AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
|
||||
AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
|
||||
])
|
||||
|
||||
# Only expand once:
|
||||
m4_define([LTDL_INIT])
|
||||
])# LTDL_INIT
|
||||
|
||||
# Old names:
|
||||
AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
|
||||
AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
|
||||
AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIB_LTDL], [])
|
||||
dnl AC_DEFUN([AC_WITH_LTDL], [])
|
||||
dnl AC_DEFUN([LT_WITH_LTDL], [])
|
||||
|
||||
|
||||
# _LTDL_SETUP
|
||||
# -----------
|
||||
# Perform all the checks necessary for compilation of the ltdl objects
|
||||
# -- including compiler checks and header checks. This is a public
|
||||
# interface mainly for the benefit of libltdl's own configure.ac, most
|
||||
# other users should call LTDL_INIT instead.
|
||||
AC_DEFUN([_LTDL_SETUP],
|
||||
[AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
|
||||
AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
|
||||
AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
|
||||
AC_REQUIRE([LT_LIB_DLLOAD])dnl
|
||||
AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
|
||||
AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
|
||||
AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
|
||||
AC_REQUIRE([gl_FUNC_ARGZ])dnl
|
||||
|
||||
m4_require([_LT_CHECK_OBJDIR])dnl
|
||||
m4_require([_LT_HEADER_DLFCN])dnl
|
||||
m4_require([_LT_CHECK_DLPREOPEN])dnl
|
||||
m4_require([_LT_DECL_SED])dnl
|
||||
|
||||
dnl Don't require this, or it will be expanded earlier than the code
|
||||
dnl that sets the variables it relies on:
|
||||
_LT_ENABLE_INSTALL
|
||||
|
||||
dnl _LTDL_MODE specific code must be called at least once:
|
||||
_LTDL_MODE_DISPATCH
|
||||
|
||||
# In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
|
||||
# the user used. This is so that ltdl.h can pick up the parent projects
|
||||
# config.h file, The first file in AC_CONFIG_HEADERS must contain the
|
||||
# definitions required by ltdl.c.
|
||||
# FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
|
||||
AC_CONFIG_COMMANDS_PRE([dnl
|
||||
m4_pattern_allow([^LT_CONFIG_H$])dnl
|
||||
m4_ifset([AH_HEADER],
|
||||
[LT_CONFIG_H=AH_HEADER],
|
||||
[m4_ifset([AC_LIST_HEADERS],
|
||||
[LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[ ]]*,,;s,[[ :]].*$,,'`],
|
||||
[])])])
|
||||
AC_SUBST([LT_CONFIG_H])
|
||||
|
||||
AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
|
||||
[], [], [AC_INCLUDES_DEFAULT])
|
||||
|
||||
AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
|
||||
AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
|
||||
|
||||
AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
|
||||
|
||||
name=ltdl
|
||||
LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""`
|
||||
AC_SUBST([LTDLOPEN])
|
||||
])# _LTDL_SETUP
|
||||
|
||||
|
||||
# _LT_ENABLE_INSTALL
|
||||
# ------------------
|
||||
m4_define([_LT_ENABLE_INSTALL],
|
||||
[AC_ARG_ENABLE([ltdl-install],
|
||||
[AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
|
||||
|
||||
case ,${enable_ltdl_install},${enable_ltdl_convenience} in
|
||||
*yes*) ;;
|
||||
*) enable_ltdl_convenience=yes ;;
|
||||
esac
|
||||
|
||||
m4_ifdef([AM_CONDITIONAL],
|
||||
[AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
|
||||
AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)])
|
||||
])# _LT_ENABLE_INSTALL
|
||||
|
||||
|
||||
# LT_SYS_DLOPEN_DEPLIBS
|
||||
# ---------------------
|
||||
AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
|
||||
[lt_cv_sys_dlopen_deplibs],
|
||||
[# PORTME does your system automatically load deplibs for dlopen?
|
||||
# or its logical equivalent (e.g. shl_load for HP-UX < 11)
|
||||
# For now, we just catch OSes we know something about -- in the
|
||||
# future, we'll try test this programmatically.
|
||||
lt_cv_sys_dlopen_deplibs=unknown
|
||||
case $host_os in
|
||||
aix3*|aix4.1.*|aix4.2.*)
|
||||
# Unknown whether this is true for these versions of AIX, but
|
||||
# we want this `case' here to explicitly catch those versions.
|
||||
lt_cv_sys_dlopen_deplibs=unknown
|
||||
;;
|
||||
aix[[4-9]]*)
|
||||
lt_cv_sys_dlopen_deplibs=yes
|
||||
;;
|
||||
amigaos*)
|
||||
case $host_cpu in
|
||||
powerpc)
|
||||
lt_cv_sys_dlopen_deplibs=no
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
darwin*)
|
||||
# Assuming the user has installed a libdl from somewhere, this is true
|
||||
# If you are looking for one http://www.opendarwin.org/projects/dlcompat
|
||||
lt_cv_sys_dlopen_deplibs=yes
|
||||
;;
|
||||
freebsd* | dragonfly*)
|
||||
lt_cv_sys_dlopen_deplibs=yes
|
||||
;;
|
||||
gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
# GNU and its variants, using gnu ld.so (Glibc)
|
||||
lt_cv_sys_dlopen_deplibs=yes
|
||||
;;
|
||||
hpux10*|hpux11*)
|
||||
lt_cv_sys_dlopen_deplibs=yes
|
||||
;;
|
||||
interix*)
|
||||
lt_cv_sys_dlopen_deplibs=yes
|
||||
;;
|
||||
irix[[12345]]*|irix6.[[01]]*)
|
||||
# Catch all versions of IRIX before 6.2, and indicate that we don't
|
||||
# know how it worked for any of those versions.
|
||||
lt_cv_sys_dlopen_deplibs=unknown
|
||||
;;
|
||||
irix*)
|
||||
# The case above catches anything before 6.2, and it's known that
|
||||
# at 6.2 and later dlopen does load deplibs.
|
||||
lt_cv_sys_dlopen_deplibs=yes
|
||||
;;
|
||||
netbsd* | netbsdelf*-gnu)
|
||||
lt_cv_sys_dlopen_deplibs=yes
|
||||
;;
|
||||
openbsd*)
|
||||
lt_cv_sys_dlopen_deplibs=yes
|
||||
;;
|
||||
osf[[1234]]*)
|
||||
# dlopen did load deplibs (at least at 4.x), but until the 5.x series,
|
||||
# it did *not* use an RPATH in a shared library to find objects the
|
||||
# library depends on, so we explicitly say `no'.
|
||||
lt_cv_sys_dlopen_deplibs=no
|
||||
;;
|
||||
osf5.0|osf5.0a|osf5.1)
|
||||
# dlopen *does* load deplibs and with the right loader patch applied
|
||||
# it even uses RPATH in a shared library to search for shared objects
|
||||
# that the library depends on, but there's no easy way to know if that
|
||||
# patch is installed. Since this is the case, all we can really
|
||||
# say is unknown -- it depends on the patch being installed. If
|
||||
# it is, this changes to `yes'. Without it, it would be `no'.
|
||||
lt_cv_sys_dlopen_deplibs=unknown
|
||||
;;
|
||||
osf*)
|
||||
# the two cases above should catch all versions of osf <= 5.1. Read
|
||||
# the comments above for what we know about them.
|
||||
# At > 5.1, deplibs are loaded *and* any RPATH in a shared library
|
||||
# is used to find them so we can finally say `yes'.
|
||||
lt_cv_sys_dlopen_deplibs=yes
|
||||
;;
|
||||
qnx*)
|
||||
lt_cv_sys_dlopen_deplibs=yes
|
||||
;;
|
||||
solaris*)
|
||||
lt_cv_sys_dlopen_deplibs=yes
|
||||
;;
|
||||
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
|
||||
libltdl_cv_sys_dlopen_deplibs=yes
|
||||
;;
|
||||
esac
|
||||
])
|
||||
if test "$lt_cv_sys_dlopen_deplibs" != yes; then
|
||||
AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
|
||||
[Define if the OS needs help to load dependent libraries for dlopen().])
|
||||
fi
|
||||
])# LT_SYS_DLOPEN_DEPLIBS
|
||||
|
||||
# Old name:
|
||||
AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
|
||||
|
||||
|
||||
# LT_SYS_MODULE_EXT
|
||||
# -----------------
|
||||
AC_DEFUN([LT_SYS_MODULE_EXT],
|
||||
[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
|
||||
AC_CACHE_CHECK([which extension is used for runtime loadable modules],
|
||||
[libltdl_cv_shlibext],
|
||||
[
|
||||
module=yes
|
||||
eval libltdl_cv_shlibext=$shrext_cmds
|
||||
])
|
||||
if test -n "$libltdl_cv_shlibext"; then
|
||||
m4_pattern_allow([LT_MODULE_EXT])dnl
|
||||
AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
|
||||
[Define to the extension used for runtime loadable modules, say, ".so".])
|
||||
fi
|
||||
])# LT_SYS_MODULE_EXT
|
||||
|
||||
# Old name:
|
||||
AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
|
||||
|
||||
|
||||
# LT_SYS_MODULE_PATH
|
||||
# ------------------
|
||||
AC_DEFUN([LT_SYS_MODULE_PATH],
|
||||
[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
|
||||
AC_CACHE_CHECK([which variable specifies run-time module search path],
|
||||
[lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
|
||||
if test -n "$lt_cv_module_path_var"; then
|
||||
m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
|
||||
AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
|
||||
[Define to the name of the environment variable that determines the run-time module search path.])
|
||||
fi
|
||||
])# LT_SYS_MODULE_PATH
|
||||
|
||||
# Old name:
|
||||
AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
|
||||
|
||||
|
||||
# LT_SYS_DLSEARCH_PATH
|
||||
# --------------------
|
||||
AC_DEFUN([LT_SYS_DLSEARCH_PATH],
|
||||
[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
|
||||
AC_CACHE_CHECK([for the default library search path],
|
||||
[lt_cv_sys_dlsearch_path],
|
||||
[lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"])
|
||||
if test -n "$lt_cv_sys_dlsearch_path"; then
|
||||
sys_dlsearch_path=
|
||||
for dir in $lt_cv_sys_dlsearch_path; do
|
||||
if test -z "$sys_dlsearch_path"; then
|
||||
sys_dlsearch_path="$dir"
|
||||
else
|
||||
sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
|
||||
fi
|
||||
done
|
||||
m4_pattern_allow([LT_DLSEARCH_PATH])dnl
|
||||
AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
|
||||
[Define to the system default library search path.])
|
||||
fi
|
||||
])# LT_SYS_DLSEARCH_PATH
|
||||
|
||||
# Old name:
|
||||
AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
|
||||
|
||||
|
||||
# _LT_CHECK_DLPREOPEN
|
||||
# -------------------
|
||||
m4_defun([_LT_CHECK_DLPREOPEN],
|
||||
[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
|
||||
AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
|
||||
[libltdl_cv_preloaded_symbols],
|
||||
[if test -n "$lt_cv_sys_global_symbol_pipe"; then
|
||||
libltdl_cv_preloaded_symbols=yes
|
||||
else
|
||||
libltdl_cv_preloaded_symbols=no
|
||||
fi
|
||||
])
|
||||
if test x"$libltdl_cv_preloaded_symbols" = xyes; then
|
||||
AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
|
||||
[Define if libtool can extract symbol lists from object files.])
|
||||
fi
|
||||
])# _LT_CHECK_DLPREOPEN
|
||||
|
||||
|
||||
# LT_LIB_DLLOAD
|
||||
# -------------
|
||||
AC_DEFUN([LT_LIB_DLLOAD],
|
||||
[m4_pattern_allow([^LT_DLLOADERS$])
|
||||
LT_DLLOADERS=
|
||||
AC_SUBST([LT_DLLOADERS])
|
||||
|
||||
AC_LANG_PUSH([C])
|
||||
|
||||
LIBADD_DLOPEN=
|
||||
AC_SEARCH_LIBS([dlopen], [dl],
|
||||
[AC_DEFINE([HAVE_LIBDL], [1],
|
||||
[Define if you have the libdl library or equivalent.])
|
||||
if test "$ac_cv_search_dlopen" != "none required" ; then
|
||||
LIBADD_DLOPEN="-ldl"
|
||||
fi
|
||||
libltdl_cv_lib_dl_dlopen="yes"
|
||||
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
|
||||
# include <dlfcn.h>
|
||||
#endif
|
||||
]], [[dlopen(0, 0);]])],
|
||||
[AC_DEFINE([HAVE_LIBDL], [1],
|
||||
[Define if you have the libdl library or equivalent.])
|
||||
libltdl_cv_func_dlopen="yes"
|
||||
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
|
||||
[AC_CHECK_LIB([svld], [dlopen],
|
||||
[AC_DEFINE([HAVE_LIBDL], [1],
|
||||
[Define if you have the libdl library or equivalent.])
|
||||
LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
|
||||
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
|
||||
if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
|
||||
then
|
||||
lt_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $LIBADD_DLOPEN"
|
||||
AC_CHECK_FUNCS([dlerror])
|
||||
LIBS="$lt_save_LIBS"
|
||||
fi
|
||||
AC_SUBST([LIBADD_DLOPEN])
|
||||
|
||||
LIBADD_SHL_LOAD=
|
||||
AC_CHECK_FUNC([shl_load],
|
||||
[AC_DEFINE([HAVE_SHL_LOAD], [1],
|
||||
[Define if you have the shl_load function.])
|
||||
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
|
||||
[AC_CHECK_LIB([dld], [shl_load],
|
||||
[AC_DEFINE([HAVE_SHL_LOAD], [1],
|
||||
[Define if you have the shl_load function.])
|
||||
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
|
||||
LIBADD_SHL_LOAD="-ldld"])])
|
||||
AC_SUBST([LIBADD_SHL_LOAD])
|
||||
|
||||
case $host_os in
|
||||
darwin[[1567]].*)
|
||||
# We only want this for pre-Mac OS X 10.4.
|
||||
AC_CHECK_FUNC([_dyld_func_lookup],
|
||||
[AC_DEFINE([HAVE_DYLD], [1],
|
||||
[Define if you have the _dyld_func_lookup function.])
|
||||
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
|
||||
;;
|
||||
beos*)
|
||||
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
|
||||
;;
|
||||
cygwin* | mingw* | os2* | pw32*)
|
||||
AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
|
||||
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_CHECK_LIB([dld], [dld_link],
|
||||
[AC_DEFINE([HAVE_DLD], [1],
|
||||
[Define if you have the GNU dld library.])
|
||||
LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
|
||||
AC_SUBST([LIBADD_DLD_LINK])
|
||||
|
||||
m4_pattern_allow([^LT_DLPREOPEN$])
|
||||
LT_DLPREOPEN=
|
||||
if test -n "$LT_DLLOADERS"
|
||||
then
|
||||
for lt_loader in $LT_DLLOADERS; do
|
||||
LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
|
||||
done
|
||||
AC_DEFINE([HAVE_LIBDLLOADER], [1],
|
||||
[Define if libdlloader will be built on this platform])
|
||||
fi
|
||||
AC_SUBST([LT_DLPREOPEN])
|
||||
|
||||
dnl This isn't used anymore, but set it for backwards compatibility
|
||||
LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
|
||||
AC_SUBST([LIBADD_DL])
|
||||
|
||||
AC_LANG_POP
|
||||
])# LT_LIB_DLLOAD
|
||||
|
||||
# Old name:
|
||||
AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LTDL_DLLIB], [])
|
||||
|
||||
|
||||
# LT_SYS_SYMBOL_USCORE
|
||||
# --------------------
|
||||
# does the compiler prefix global symbols with an underscore?
|
||||
AC_DEFUN([LT_SYS_SYMBOL_USCORE],
|
||||
[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
|
||||
AC_CACHE_CHECK([for _ prefix in compiled symbols],
|
||||
[lt_cv_sys_symbol_underscore],
|
||||
[lt_cv_sys_symbol_underscore=no
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
void nm_test_func(){}
|
||||
int main(){nm_test_func;return 0;}
|
||||
_LT_EOF
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
# Now try to grab the symbols.
|
||||
ac_nlist=conftest.nm
|
||||
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
|
||||
# See whether the symbols have a leading underscore.
|
||||
if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
|
||||
lt_cv_sys_symbol_underscore=yes
|
||||
else
|
||||
if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
|
||||
:
|
||||
else
|
||||
echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
|
||||
fi
|
||||
else
|
||||
echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
|
||||
cat conftest.c >&AS_MESSAGE_LOG_FD
|
||||
fi
|
||||
rm -rf conftest*
|
||||
])
|
||||
sys_symbol_underscore=$lt_cv_sys_symbol_underscore
|
||||
AC_SUBST([sys_symbol_underscore])
|
||||
])# LT_SYS_SYMBOL_USCORE
|
||||
|
||||
# Old name:
|
||||
AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
|
||||
|
||||
|
||||
# LT_FUNC_DLSYM_USCORE
|
||||
# --------------------
|
||||
AC_DEFUN([LT_FUNC_DLSYM_USCORE],
|
||||
[AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
|
||||
if test x"$lt_cv_sys_symbol_underscore" = xyes; then
|
||||
if test x"$libltdl_cv_func_dlopen" = xyes ||
|
||||
test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
|
||||
AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
|
||||
[libltdl_cv_need_uscore],
|
||||
[libltdl_cv_need_uscore=unknown
|
||||
save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $LIBADD_DLOPEN"
|
||||
_LT_TRY_DLOPEN_SELF(
|
||||
[libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
|
||||
[], [libltdl_cv_need_uscore=cross])
|
||||
LIBS="$save_LIBS"
|
||||
])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x"$libltdl_cv_need_uscore" = xyes; then
|
||||
AC_DEFINE([NEED_USCORE], [1],
|
||||
[Define if dlsym() requires a leading underscore in symbol names.])
|
||||
fi
|
||||
])# LT_FUNC_DLSYM_USCORE
|
||||
|
||||
# Old name:
|
||||
AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
|
|
@ -1,368 +0,0 @@
|
|||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 6 ltoptions.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
|
||||
|
||||
|
||||
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ------------------------------------------
|
||||
m4_define([_LT_MANGLE_OPTION],
|
||||
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ---------------------------------------
|
||||
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
|
||||
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
|
||||
# saved as a flag.
|
||||
m4_define([_LT_SET_OPTION],
|
||||
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
|
||||
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
[m4_warning([Unknown $1 option `$2'])])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
|
||||
# ------------------------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
m4_define([_LT_IF_OPTION],
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
|
||||
|
||||
|
||||
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
|
||||
# -------------------------------------------------------
|
||||
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
|
||||
# are set.
|
||||
m4_define([_LT_UNLESS_OPTIONS],
|
||||
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
|
||||
[m4_define([$0_found])])])[]dnl
|
||||
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
|
||||
])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
|
||||
# ----------------------------------------
|
||||
# OPTION-LIST is a space-separated list of Libtool options associated
|
||||
# with MACRO-NAME. If any OPTION has a matching handler declared with
|
||||
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
|
||||
# the unknown option and exit.
|
||||
m4_defun([_LT_SET_OPTIONS],
|
||||
[# Set options
|
||||
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[_LT_SET_OPTION([$1], _LT_Option)])
|
||||
|
||||
m4_if([$1],[LT_INIT],[
|
||||
dnl
|
||||
dnl Simply set some default values (i.e off) if boolean options were not
|
||||
dnl specified:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
|
||||
])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
|
||||
])
|
||||
dnl
|
||||
dnl If no reference was made to various pairs of opposing options, then
|
||||
dnl we run the default mode handler for the pair. For example, if neither
|
||||
dnl `shared' nor `disable-shared' was passed, we enable building of shared
|
||||
dnl archives by default:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
|
||||
[_LT_ENABLE_FAST_INSTALL])
|
||||
])
|
||||
])# _LT_SET_OPTIONS
|
||||
|
||||
|
||||
## --------------------------------- ##
|
||||
## Macros to handle LT_INIT options. ##
|
||||
## --------------------------------- ##
|
||||
|
||||
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
|
||||
# -----------------------------------------
|
||||
m4_define([_LT_MANGLE_DEFUN],
|
||||
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
|
||||
# -----------------------------------------------
|
||||
m4_define([LT_OPTION_DEFINE],
|
||||
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
|
||||
])# LT_OPTION_DEFINE
|
||||
|
||||
|
||||
# dlopen
|
||||
# ------
|
||||
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_DLOPEN],
|
||||
[_LT_SET_OPTION([LT_INIT], [dlopen])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `dlopen' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
|
||||
|
||||
|
||||
# win32-dll
|
||||
# ---------
|
||||
# Declare package support for building win32 dll's.
|
||||
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
|
||||
[enable_win32_dll=yes
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
esac
|
||||
|
||||
test -z "$AS" && AS=as
|
||||
_LT_DECL([], [AS], [0], [Assembler program])dnl
|
||||
|
||||
test -z "$DLLTOOL" && DLLTOOL=dlltool
|
||||
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
|
||||
|
||||
test -z "$OBJDUMP" && OBJDUMP=objdump
|
||||
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
|
||||
])# win32-dll
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
_LT_SET_OPTION([LT_INIT], [win32-dll])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `win32-dll' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
|
||||
|
||||
|
||||
# _LT_ENABLE_SHARED([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-shared flag, and supports the `shared' and
|
||||
# `disable-shared' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
m4_define([_LT_ENABLE_SHARED],
|
||||
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([shared],
|
||||
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
|
||||
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
|
||||
|
||||
_LT_DECL([build_libtool_libs], [enable_shared], [0],
|
||||
[Whether or not to build shared libraries])
|
||||
])# _LT_ENABLE_SHARED
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-shared])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
|
||||
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_STATIC([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-static flag, and support the `static' and
|
||||
# `disable-static' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
m4_define([_LT_ENABLE_STATIC],
|
||||
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([static],
|
||||
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
|
||||
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
|
||||
|
||||
_LT_DECL([build_old_libs], [enable_static], [0],
|
||||
[Whether or not to build static libraries])
|
||||
])# _LT_ENABLE_STATIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-static])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
|
||||
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --enable-fast-install flag, and support the `fast-install'
|
||||
# and `disable-fast-install' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
m4_define([_LT_ENABLE_FAST_INSTALL],
|
||||
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([fast-install],
|
||||
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
|
||||
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
|
||||
|
||||
_LT_DECL([fast_install], [enable_fast_install], [0],
|
||||
[Whether or not to optimize for fast installation])dnl
|
||||
])# _LT_ENABLE_FAST_INSTALL
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
|
||||
|
||||
# Old names:
|
||||
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the `fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the `disable-fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||
|
||||
|
||||
# _LT_WITH_PIC([MODE])
|
||||
# --------------------
|
||||
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
|
||||
# LT_INIT options.
|
||||
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
|
||||
m4_define([_LT_WITH_PIC],
|
||||
[AC_ARG_WITH([pic],
|
||||
[AS_HELP_STRING([--with-pic],
|
||||
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
|
||||
[pic_mode="$withval"],
|
||||
[pic_mode=default])
|
||||
|
||||
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
|
||||
|
||||
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
|
||||
])# _LT_WITH_PIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
|
||||
|
||||
# Old name:
|
||||
AU_DEFUN([AC_LIBTOOL_PICMODE],
|
||||
[_LT_SET_OPTION([LT_INIT], [pic-only])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `pic-only' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
|
||||
|
||||
## ----------------- ##
|
||||
## LTDL_INIT Options ##
|
||||
## ----------------- ##
|
||||
|
||||
m4_define([_LTDL_MODE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
|
||||
[m4_define([_LTDL_MODE], [nonrecursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
|
||||
[m4_define([_LTDL_MODE], [recursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
|
||||
[m4_define([_LTDL_MODE], [subproject])])
|
||||
|
||||
m4_define([_LTDL_TYPE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [installable],
|
||||
[m4_define([_LTDL_TYPE], [installable])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
|
||||
[m4_define([_LTDL_TYPE], [convenience])])
|
|
@ -1,123 +0,0 @@
|
|||
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 6 ltsugar.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
|
||||
|
||||
|
||||
# lt_join(SEP, ARG1, [ARG2...])
|
||||
# -----------------------------
|
||||
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
|
||||
# associated separator.
|
||||
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
|
||||
# versions in m4sugar had bugs.
|
||||
m4_define([lt_join],
|
||||
[m4_if([$#], [1], [],
|
||||
[$#], [2], [[$2]],
|
||||
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
m4_define([_lt_join],
|
||||
[m4_if([$#$2], [2], [],
|
||||
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
|
||||
|
||||
# lt_car(LIST)
|
||||
# lt_cdr(LIST)
|
||||
# ------------
|
||||
# Manipulate m4 lists.
|
||||
# These macros are necessary as long as will still need to support
|
||||
# Autoconf-2.59 which quotes differently.
|
||||
m4_define([lt_car], [[$1]])
|
||||
m4_define([lt_cdr],
|
||||
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
|
||||
[$#], 1, [],
|
||||
[m4_dquote(m4_shift($@))])])
|
||||
m4_define([lt_unquote], $1)
|
||||
|
||||
|
||||
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
|
||||
# ------------------------------------------
|
||||
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
|
||||
# Note that neither SEPARATOR nor STRING are expanded; they are appended
|
||||
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
|
||||
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
|
||||
# than defined and empty).
|
||||
#
|
||||
# This macro is needed until we can rely on Autoconf 2.62, since earlier
|
||||
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
|
||||
m4_define([lt_append],
|
||||
[m4_define([$1],
|
||||
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
|
||||
|
||||
|
||||
|
||||
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
|
||||
# ----------------------------------------------------------
|
||||
# Produce a SEP delimited list of all paired combinations of elements of
|
||||
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
|
||||
# has the form PREFIXmINFIXSUFFIXn.
|
||||
# Needed until we can rely on m4_combine added in Autoconf 2.62.
|
||||
m4_define([lt_combine],
|
||||
[m4_if(m4_eval([$# > 3]), [1],
|
||||
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
|
||||
[[m4_foreach([_Lt_prefix], [$2],
|
||||
[m4_foreach([_Lt_suffix],
|
||||
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
|
||||
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
|
||||
|
||||
|
||||
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
|
||||
# -----------------------------------------------------------------------
|
||||
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
|
||||
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
|
||||
m4_define([lt_if_append_uniq],
|
||||
[m4_ifdef([$1],
|
||||
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
|
||||
[lt_append([$1], [$2], [$3])$4],
|
||||
[$5])],
|
||||
[lt_append([$1], [$2], [$3])$4])])
|
||||
|
||||
|
||||
# lt_dict_add(DICT, KEY, VALUE)
|
||||
# -----------------------------
|
||||
m4_define([lt_dict_add],
|
||||
[m4_define([$1($2)], [$3])])
|
||||
|
||||
|
||||
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
|
||||
# --------------------------------------------
|
||||
m4_define([lt_dict_add_subkey],
|
||||
[m4_define([$1($2:$3)], [$4])])
|
||||
|
||||
|
||||
# lt_dict_fetch(DICT, KEY, [SUBKEY])
|
||||
# ----------------------------------
|
||||
m4_define([lt_dict_fetch],
|
||||
[m4_ifval([$3],
|
||||
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
|
||||
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
|
||||
|
||||
|
||||
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
|
||||
# -----------------------------------------------------------------
|
||||
m4_define([lt_if_dict_fetch],
|
||||
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
|
||||
[$5],
|
||||
[$6])])
|
||||
|
||||
|
||||
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
|
||||
# --------------------------------------------------------------
|
||||
m4_define([lt_dict_filter],
|
||||
[m4_if([$5], [], [],
|
||||
[lt_join(m4_quote(m4_default([$4], [[, ]])),
|
||||
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
|
||||
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
|
||||
])
|
|
@ -1,23 +0,0 @@
|
|||
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# Generated from ltversion.in.
|
||||
|
||||
# serial 3017 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.2.6b])
|
||||
m4_define([LT_PACKAGE_REVISION], [1.3017])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.2.6b'
|
||||
macro_revision='1.3017'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
|
@ -1,92 +0,0 @@
|
|||
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4 lt~obsolete.m4
|
||||
|
||||
# These exist entirely to fool aclocal when bootstrapping libtool.
|
||||
#
|
||||
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
|
||||
# which have later been changed to m4_define as they aren't part of the
|
||||
# exported API, or moved to Autoconf or Automake where they belong.
|
||||
#
|
||||
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
|
||||
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
|
||||
# using a macro with the same name in our local m4/libtool.m4 it'll
|
||||
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
|
||||
# and doesn't know about Autoconf macros at all.)
|
||||
#
|
||||
# So we provide this file, which has a silly filename so it's always
|
||||
# included after everything else. This provides aclocal with the
|
||||
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
|
||||
# because those macros already exist, or will be overwritten later.
|
||||
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
|
||||
#
|
||||
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
|
||||
# Yes, that means every name once taken will need to remain here until
|
||||
# we give up compatibility with versions before 1.7, at which point
|
||||
# we need to keep only those names which we still refer to.
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
|
||||
|
||||
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
|
||||
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
|
||||
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
|
||||
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
|
||||
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
|
||||
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
|
||||
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
|
||||
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
|
||||
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
|
||||
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
|
||||
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
|
||||
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
|
||||
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
|
||||
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
|
||||
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
|
||||
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
|
||||
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
|
||||
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
|
||||
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
|
||||
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
|
||||
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
|
||||
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
|
||||
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
|
||||
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
|
||||
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
|
||||
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
|
||||
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
|
||||
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
|
||||
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
|
||||
m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
|
||||
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
|
Ładowanie…
Reference in New Issue