Compare commits

...

No commits in common. "master" and "cvsimport" have entirely different histories.

690 changed files with 128885 additions and 183290 deletions

28
.gitignore vendored
View File

@ -1,28 +0,0 @@
#
# NOTE! Don't add files that are generated in specific
# subdirectories here. Add them in the ".gitignore" file
# in that subdirectory instead.
#
# NOTE! Please use 'git ls-files -i --exclude-standard'
# command after changing this file, to see if there are
# any tracked files which get ignored after the change.
#
# Normal rules
#
.deps
.libs
*.la
*.lo
*.o
*.o.*
*.a
*.s
*.so
*.so.dbg
*.i
*.lst
*~
autom4te.cache
ChangeLog
config.log

View File

@ -1,12 +1,13 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@ -15,7 +16,7 @@ software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
@ -55,8 +56,8 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
@ -110,7 +111,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
@ -168,7 +169,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
@ -225,7 +226,7 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
@ -255,7 +256,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
@ -277,9 +278,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
@ -291,7 +292,7 @@ convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -303,16 +304,16 @@ the "copyright" line and a pointer to where the full notice is found.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
@ -335,5 +336,5 @@ necessary. Here is a sample; alter the names:
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

4
FAQ/.cvsignore Normal file
View File

@ -0,0 +1,4 @@
config.*
*.html
*.txt
Makefile

View File

@ -1,113 +1,113 @@
From: Torsten Hentschel <Torsten.Hentschel@DInet.de> Subject: Re: Now i found something else to wonder about.. (was: Re: options files) To: isdn4linux@hub-wue.franken.de
Date: Thu, 24 Oct 1996 22:47:17 +0200 (MET DST) Sender: owner-isdn4linux@hub-wue.franken.de Reply-To: isdn4linux@hub-wue.franken.de
Hello Emil & Mogens!
> Hello Mogens,
>
> You wrote:
> > isdnctrl addif ippp0
> > isdnctrl pppbind ippp0
> > ifconfig ippp0 193.89.84.10 p-t-p 193.89.84.11
---
> > route add -net 194.192.159.0 metric 1 netmask 255.255.255.224 ippp0
> > ipppd user XXX1 /dev/ippp0 193.89.84.10:193.89.84.11 file
> > /etc/ppp/options.ippp0
>
> > isdnctrl addif ippp1
> > isdnctrl pppbind ippp1
> > ifconfig ippp0 193.89.84.10 p-t-p 193.89.84.13
--- why do you repeat the ifconfig?
probably it should be "ippp1" here?
> > route add -net 192.168.1.0 metric 1 netmask 255.255.255.0 ippp1
> > ipppd user XXX2 /dev/ippp1 193.89.84.10:193.89.84.11 file
> > /etc/ppp/options.ippp1
>
> Compare the two ifconfig commands, they are for the same interface.
> And AFAIK the two interfaces need different ip-adresses.
With this I do not agree. It is simply possible to give two interfaces the same local ip address. You may even establish two routes on them. But only the first one found in the routing table will be used by the kernel. So the other route won't have any effect.
Configuring two interfaces with the same local IP address does make sense if you want to use as less IP adresses as possible (very honorable as long as IPv6 is not common practice).
An interface IP-Adress is used by the kernel to give outgoing packets (not the forwarded packets) a sender IP address within the IP header.
To make the IP address 193.89.84.10 (as used in the above example) pingable I would suggest the following (changes ar marked at the right margin):
| ifconfig dummy0 193.89.84.10 # module has to be loaded before | route add -host 193.89.84.10 # only to have 193.89.84.10 reachable
# all the time
isdnctrl addif ippp0
| ifconfig ippp0 down # to make it exclusively bindable
isdnctrl pppbind ippp0
| ifconfig ippp0 193.89.84.10 p-t-p 193.89.84.11 up | route add -host 193.89.84.11 metric 1 ippp0 | route add -net 194.192.159.0 metric 1 \ | netmask 255.255.255.224 gw 193.89.84.11
ipppd user XXX1 /dev/ippp0 193.89.84.10:193.89.84.11 \
file /etc/ppp/options.ippp0
isdnctrl addif ippp1
| ifconfig ippp1 down # to make it exclusively bindable
isdnctrl pppbind ippp1
| ifconfig ippp1 193.89.84.10 p-t-p 193.89.84.13 up | route add -host 193.89.84.13 metric 1 ippp0 | route add -net 192.168.1.0 metric 1 \ | netmask 255.255.255.0 gw 193.89.84.13
ipppd user XXX2 /dev/ippp1 193.89.84.10:193.89.84.11 \
file /etc/ppp/options.ippp1
You may even try the following to "emulate" cisco's dialer rotary group where you may put several BRIs (basic rate interfaces = ISDN S0 [gr.]) into one netmask. Therefore the example would look like (changes aren't marked any more; completely different):
#!/bin/bash
# assuming, we are using a network of
# 193.89.84.0/255.255.255.240
# for a dial up server where
# 193.89.84.1 is the IP for the server and
# 193.89.84.2-14 are the addresses for remote interfaces.
ifconfig dummy0 193.89.84.1 # module has to be loaded before
route add -host 193.89.84.1 # only to have 193.89.84.1 reachable
# all the time
USER_ippp0="XXX1"
RMTNET_ippp0=194.192.159.0
RMTMSK_ippp0=255.255.255.224
USER_ippp1="XXX2"
RMTNET_ippp1=192.168.1.0 # masquerading is great!
RMTMSK_ippp1=255.255.255.0
USER_ippp2="XXX3"
RMTNET_ippp2="" # you may leave 'em blank
RMTNET_ippp2="" # if there is no remote net
[...] # fill out to your needs
for x in 2 3 4 5 6 7 8 9 10 11 12 13 14
do
IFNAME="ippp$[$x-2]"
isdnctrl addif $IFNAME
ifconfig $IFNAME down # to make it exclusively bindable
isdnctrl pppbind $IFNAME
ifconfig $IFNAME 193.89.84.1 netmask 255.255.255.240 up
route add -host 193.89.84.$x metric 1 $IFNAME
eval NET="\${RMTNET_${IFNAME}}"
eval MSK="\${RMTNET_${IFNAME}}"
if [ -n "$NET" -a -n "$MSK" ]
then
route add -net $NET metric 1 netmask $MSK gw 193.89.84.$x
fi
eval USER="\${USER_${IFNAME}}"
ipppd user "$USER" /dev/$IFNAME 193.89.84.1:193.89.84.$x \
file /etc/ppp/options.$IFNAME
done
No warranty, it's untested.
But please yell at me (politely) if I'm wrong.
Regards,
Torsten
--
/\ Delta Internet GmbH / \ DI Delta Internet GmbH von-Siemens-Str. 12 /____\ Netzwerkdienst & Vertrieb 59757 Arnsberg
ALLES NUR AUS LINUX Tel. +49 2932 916 132 Fax 191 --------------------------------------------------- To remove yourself from this mailing list send email to majordomo@hub-wue.franken.de containing "unsubscribe isdn4linux <your_email_address>" in the message body [-vg]
From: Torsten Hentschel <Torsten.Hentschel@DInet.de> Subject: Re: Now i found something else to wonder about.. (was: Re: options files) To: isdn4linux@hub-wue.franken.de
Date: Thu, 24 Oct 1996 22:47:17 +0200 (MET DST) Sender: owner-isdn4linux@hub-wue.franken.de Reply-To: isdn4linux@hub-wue.franken.de
Hello Emil & Mogens!
> Hello Mogens,
>
> You wrote:
> > isdnctrl addif ippp0
> > isdnctrl pppbind ippp0
> > ifconfig ippp0 193.89.84.10 p-t-p 193.89.84.11
---
> > route add -net 194.192.159.0 metric 1 netmask 255.255.255.224 ippp0
> > ipppd user XXX1 /dev/ippp0 193.89.84.10:193.89.84.11 file
> > /etc/ppp/options.ippp0
>
> > isdnctrl addif ippp1
> > isdnctrl pppbind ippp1
> > ifconfig ippp0 193.89.84.10 p-t-p 193.89.84.13
--- why do you repeat the ifconfig?
probably it should be "ippp1" here?
> > route add -net 192.168.1.0 metric 1 netmask 255.255.255.0 ippp1
> > ipppd user XXX2 /dev/ippp1 193.89.84.10:193.89.84.11 file
> > /etc/ppp/options.ippp1
>
> Compare the two ifconfig commands, they are for the same interface.
> And AFAIK the two interfaces need different ip-adresses.
With this I do not agree. It is simply possible to give two interfaces the same local ip address. You may even establish two routes on them. But only the first one found in the routing table will be used by the kernel. So the other route won't have any effect.
Configuring two interfaces with the same local IP address does make sense if you want to use as less IP adresses as possible (very honorable as long as IPv6 is not common practice).
An interface IP-Adress is used by the kernel to give outgoing packets (not the forwarded packets) a sender IP address within the IP header.
To make the IP address 193.89.84.10 (as used in the above example) pingable I would suggest the following (changes ar marked at the right margin):
| ifconfig dummy0 193.89.84.10 # module has to be loaded before | route add -host 193.89.84.10 # only to have 193.89.84.10 reachable
# all the time
isdnctrl addif ippp0
| ifconfig ippp0 down # to make it exclusively bindable
isdnctrl pppbind ippp0
| ifconfig ippp0 193.89.84.10 p-t-p 193.89.84.11 up | route add -host 193.89.84.11 metric 1 ippp0 | route add -net 194.192.159.0 metric 1 \ | netmask 255.255.255.224 gw 193.89.84.11
ipppd user XXX1 /dev/ippp0 193.89.84.10:193.89.84.11 \
file /etc/ppp/options.ippp0
isdnctrl addif ippp1
| ifconfig ippp1 down # to make it exclusively bindable
isdnctrl pppbind ippp1
| ifconfig ippp1 193.89.84.10 p-t-p 193.89.84.13 up | route add -host 193.89.84.13 metric 1 ippp0 | route add -net 192.168.1.0 metric 1 \ | netmask 255.255.255.0 gw 193.89.84.13
ipppd user XXX2 /dev/ippp1 193.89.84.10:193.89.84.11 \
file /etc/ppp/options.ippp1
You may even try the following to "emulate" cisco's dialer rotary group where you may put several BRIs (basic rate interfaces = ISDN S0 [gr.]) into one netmask. Therefore the example would look like (changes aren't marked any more; completely different):
#!/bin/bash
# assuming, we are using a network of
# 193.89.84.0/255.255.255.240
# for a dial up server where
# 193.89.84.1 is the IP for the server and
# 193.89.84.2-14 are the addresses for remote interfaces.
ifconfig dummy0 193.89.84.1 # module has to be loaded before
route add -host 193.89.84.1 # only to have 193.89.84.1 reachable
# all the time
USER_ippp0="XXX1"
RMTNET_ippp0=194.192.159.0
RMTMSK_ippp0=255.255.255.224
USER_ippp1="XXX2"
RMTNET_ippp1=192.168.1.0 # masquerading is great!
RMTMSK_ippp1=255.255.255.0
USER_ippp2="XXX3"
RMTNET_ippp2="" # you may leave 'em blank
RMTNET_ippp2="" # if there is no remote net
[...] # fill out to your needs
for x in 2 3 4 5 6 7 8 9 10 11 12 13 14
do
IFNAME="ippp$[$x-2]"
isdnctrl addif $IFNAME
ifconfig $IFNAME down # to make it exclusively bindable
isdnctrl pppbind $IFNAME
ifconfig $IFNAME 193.89.84.1 netmask 255.255.255.240 up
route add -host 193.89.84.$x metric 1 $IFNAME
eval NET="\${RMTNET_${IFNAME}}"
eval MSK="\${RMTNET_${IFNAME}}"
if [ -n "$NET" -a -n "$MSK" ]
then
route add -net $NET metric 1 netmask $MSK gw 193.89.84.$x
fi
eval USER="\${USER_${IFNAME}}"
ipppd user "$USER" /dev/$IFNAME 193.89.84.1:193.89.84.$x \
file /etc/ppp/options.$IFNAME
done
No warranty, it's untested.
But please yell at me (politely) if I'm wrong.
Regards,
Torsten
--
/\ Delta Internet GmbH / \ DI Delta Internet GmbH von-Siemens-Str. 12 /____\ Netzwerkdienst & Vertrieb 59757 Arnsberg
ALLES NUR AUS LINUX Tel. +49 2932 916 132 Fax 191 --------------------------------------------------- To remove yourself from this mailing list send email to majordomo@hub-wue.franken.de containing "unsubscribe isdn4linux <your_email_address>" in the message body [-vg]

View File

@ -1,71 +1,71 @@
From: Torsten Hentschel <Torsten.Hentschel@DInet.de> Subject: Re: IPFWADM
To: isdn4linux@hub-wue.franken.de
Date: Thu, 7 Nov 1996 11:03:15 +0100 (MET) Sender: owner-isdn4linux@hub-wue.franken.de Reply-To: isdn4linux@hub-wue.franken.de
Hallo!
Vielleicht kann ich helpfen ;-)
Zuerstmal lass mich wiederholen, ob ich Deine Frage richtig verstanden habe. Mal angenommen Du hast auf den drei Netzwerk- Karten jeweils ein Class-C -Netz und hast die Dinger so etwa wie folgt konfiguriert:
ifconfig eth0 194.77.88.7 netmask 255.255.255.0 broadcast 194.77.88.255
ifconfig eth1 194.77.89.4 netmask 255.255.255.0 broadcast 194.77.89.255
ifconfig eth2 194.77.90.2 netmask 255.255.255.0 broadcast 194.77.90.255
route add -net 194.77.88.0 eth0
route add -net 194.77.89.0 eth1
route add -net 194.77.90.0 eth2
In dieser Weise wuerde ja nun schlichtweg _alles_ von einem Interface zum anderen geroutet werden und Dein Rechner wie ein Gateway funktionieren.
Du willst, so habe ich es verstanden, aber nur einen ganz bestimmten Rechner zwischen den Interfaces "durchlassen" waehrend Dein "Gateway" aber selber alle Rechner erreichen kann und alle Rechner Dein "Gateway" erreichen koennen.
Nehmen wir mal an, der Rechner an eht0, der auf eth1 zugreifen koennen soll, habe die IP-Adresse 194.77.88.15.
Die professionelle Vorgehensweise ist dann:
- Ausschallten der FORWARDING-Funktion im Kernel
durch Neukompilieren
- Aufsetzen der folgenden Befehle für die Firewall:
ipfwadm -F -p deny # Routing zwischen den Interfaces
# erstmal generell verbieten
ipfwadm -I -p accept # Input auf allen Interfaces erlauben
# betrifft Pakete, die Dein Rechner
# auf seinen Interfaces empfaengt
ipfwadm -O -p accept # Output auf allen Interfaces erlauben
# betrifft alle Pakete, die Dein Rechner
# selber erzeugt hat und an jemanden
# senden will
ipfwadm -F -a accept -S 194.77.88.15/32 -D 194.77.90.0/24
# Zuletzt wird explizit das Forwarding
# zwischen dem Rechner auf eth0 und
# allen Rechnern auf eth2 erlaubt.
Wenn Du keinen neuen Kernel kompilieren willst, geht das auch mit eingeschaltetem Forwarding im Kernel. Das ist dann aber nicht so sicher, da man mit etwas Koepfchen die Firewall dann umgehen kann.
Keine Garantie. Das Zeugs habe ich nicht ausprobiert. Muesste aber so klappen. - Bitte korrigiert mich, wenn ich falsch liege.
Gruesse,
Torsten
> Ich habe ein rechner mit 3 netzkarten ( eth0..eth2 ). Jetzt will ich mit
> ipfwadm einen specielen rechner vom eth0 nach eth1 routen ( wie ein gateway ).
>
> Kann jemand mich helpfen?
>
>
> ---------------------------------------------------
> To remove yourself from this mailing list send
> email to majordomo@hub-wue.franken.de containing
> "unsubscribe isdn4linux <your_email_address>" in
> the message body [-vg]
>
--
http://www.DInet.de/
/\ von-Siemens-Str. 12
/ \ Delta Internet GmbH 59757 Arnsberg
/ \ Netzwerkdienst & Vertrieb Tel. +49 2932 91 61 32 /______\ Fax. +49 2932 91 61 91 --------------------------------------------------- To remove yourself from this mailing list send email to majordomo@hub-wue.franken.de containing "unsubscribe isdn4linux <your_email_address>" in the message body [-vg]
From: Torsten Hentschel <Torsten.Hentschel@DInet.de> Subject: Re: IPFWADM
To: isdn4linux@hub-wue.franken.de
Date: Thu, 7 Nov 1996 11:03:15 +0100 (MET) Sender: owner-isdn4linux@hub-wue.franken.de Reply-To: isdn4linux@hub-wue.franken.de
Hallo!
Vielleicht kann ich helpfen ;-)
Zuerstmal lass mich wiederholen, ob ich Deine Frage richtig verstanden habe. Mal angenommen Du hast auf den drei Netzwerk- Karten jeweils ein Class-C -Netz und hast die Dinger so etwa wie folgt konfiguriert:
ifconfig eth0 194.77.88.7 netmask 255.255.255.0 broadcast 194.77.88.255
ifconfig eth1 194.77.89.4 netmask 255.255.255.0 broadcast 194.77.89.255
ifconfig eth2 194.77.90.2 netmask 255.255.255.0 broadcast 194.77.90.255
route add -net 194.77.88.0 eth0
route add -net 194.77.89.0 eth1
route add -net 194.77.90.0 eth2
In dieser Weise wuerde ja nun schlichtweg _alles_ von einem Interface zum anderen geroutet werden und Dein Rechner wie ein Gateway funktionieren.
Du willst, so habe ich es verstanden, aber nur einen ganz bestimmten Rechner zwischen den Interfaces "durchlassen" waehrend Dein "Gateway" aber selber alle Rechner erreichen kann und alle Rechner Dein "Gateway" erreichen koennen.
Nehmen wir mal an, der Rechner an eht0, der auf eth1 zugreifen koennen soll, habe die IP-Adresse 194.77.88.15.
Die professionelle Vorgehensweise ist dann:
- Ausschallten der FORWARDING-Funktion im Kernel
durch Neukompilieren
- Aufsetzen der folgenden Befehle für die Firewall:
ipfwadm -F -p deny # Routing zwischen den Interfaces
# erstmal generell verbieten
ipfwadm -I -p accept # Input auf allen Interfaces erlauben
# betrifft Pakete, die Dein Rechner
# auf seinen Interfaces empfaengt
ipfwadm -O -p accept # Output auf allen Interfaces erlauben
# betrifft alle Pakete, die Dein Rechner
# selber erzeugt hat und an jemanden
# senden will
ipfwadm -F -a accept -S 194.77.88.15/32 -D 194.77.90.0/24
# Zuletzt wird explizit das Forwarding
# zwischen dem Rechner auf eth0 und
# allen Rechnern auf eth2 erlaubt.
Wenn Du keinen neuen Kernel kompilieren willst, geht das auch mit eingeschaltetem Forwarding im Kernel. Das ist dann aber nicht so sicher, da man mit etwas Koepfchen die Firewall dann umgehen kann.
Keine Garantie. Das Zeugs habe ich nicht ausprobiert. Muesste aber so klappen. - Bitte korrigiert mich, wenn ich falsch liege.
Gruesse,
Torsten
> Ich habe ein rechner mit 3 netzkarten ( eth0..eth2 ). Jetzt will ich mit
> ipfwadm einen specielen rechner vom eth0 nach eth1 routen ( wie ein gateway ).
>
> Kann jemand mich helpfen?
>
>
> ---------------------------------------------------
> To remove yourself from this mailing list send
> email to majordomo@hub-wue.franken.de containing
> "unsubscribe isdn4linux <your_email_address>" in
> the message body [-vg]
>
--
http://www.DInet.de/
/\ von-Siemens-Str. 12
/ \ Delta Internet GmbH 59757 Arnsberg
/ \ Netzwerkdienst & Vertrieb Tel. +49 2932 91 61 32 /______\ Fax. +49 2932 91 61 91 --------------------------------------------------- To remove yourself from this mailing list send email to majordomo@hub-wue.franken.de containing "unsubscribe isdn4linux <your_email_address>" in the message body [-vg]

View File

@ -1,149 +1,149 @@
From: Philippe Le Foll <phillf@iu-vannes.fr> Subject: Re: Namesserver Config
To: isdn4linux@hub-wue.franken.de
Date: Wed, 30 Oct 1996 19:09:10 +0100 (MET) Sender: owner-isdn4linux@hub-wue.franken.de Reply-To: isdn4linux@hub-wue.franken.de
I send to some people a small set of shell and example in order to set up a local name server on a Linux box.
I translate in aproximative english the README, which should in any case be easier to read that the french version.
Some people ask be for seting this in an ftp site unfortunately my university did not open yet an anonymous ftp.
phillf@iu-vannes.
Author: Philippe Le Foll: 30-oct-96
e-mail: phillf@iu-vannes.fr
All these shells are coming from Rennes Hight Brittany University they generate from /etc/hosts the DNS database, I modify them in order to run on my linux box.
(c) This is public program and you use them at your own risk
they will probably not run without some adaptation to your site.
All this example refer to the following configuration ------------------------------------------------------------
---------------
| to Internet |
--------------
|
|
dial-out/PPP
(dynamic IP number)
|
|
+------------------------+ +----------------------------+
| | | |
| DNS server | | DNS slave |
| Linux 2.x | | Linux or NT |
| name: bisig | | name fridu |
| | | |
| pppd [IP] | | |
| leafnode [news] | | Netcape [html+news+mail] |
| harvest [html cache]| | Eudora [mail] |
| popd [mail] | | |
| metahtml [local http]| | |
+------------------------+ +----------------------------+
200.200.200.1 200.200.200.1
| | +----------------------------------------------|---------------------------+
Unregistered 200.200.200" network, "domain sene.bzh"
Note:
1) This configuration give to all Slaves computer the impression
to be officially onto Internet without really be registrated.
2) It allows to run a cache even when INTERNET dial-up connection
is down.
3) It obviously read news during the night, but this is an other story.
To Do in order to install DNS
------------------------------
If you are running a DNS at home like me you probably have to choose for an unregistrated domain name as me.
Running on an official Internet network does not change anything except that you don't have to worry about your name and your net number.
- If you don't want to place your DNS data base in
/var/etc/named/DNS you will have to hack the shell
almost everything is hard coded
- create the destination directory /var/etc/named/DNS
- Copy all etc/*header* file in /var/etc/named/DNS then
adapt them to your site [here: network is 200.200.200].
- Allow named to start at boot time, for this remove comment
before named lines in /etc/rc.d/rc.inet2
- copy etc/named.boot file in /etc adapt it to your site
primary & forwarders lines syntax is:
PRIMARY myDomainename [here sene.bzh] headerPathName [here:sene.bzh.header.db]
FORWARDERS IP_NUMBER for your DNS parent [usually your provider].
example
primary sene.bzh /var/etc/named/DNS/sene.bzh.header.db
forwarders 194.51.217.1 194.51.3.49
- Normally /etc/resolv.conf is not mandatory, nevertheless
I place my local domain name in with the following line.
domain sene.bzh
- .cache directive refer to a standard file that you should have no
trouble with. Syntax is:
cache . /var/etc/named/DNS/named.root
NOTE: You can retrieve a more update named.root file true FTP
FTP.RS.INTERNIC.NET. (But for this named should work !!!)
- Build/update your /etc/hosts file. WARNING: all your local hosts
should have as main name host.YourDomainName INCLUDING localhost.YourDomainName
[see example in etc/hosts]
- Generate your DNS data base, this is the only thing you should have to
do at each /etc/hosts change. In fact this job is done automatically
with the following shell, syntax
make_db YourDomainName [ex: make_db sene.bzh]
make_in-addr.arpa Net_Value.._in-addr.arpa [ex: make_in-addr.arpa 200.200.200._in-addr.arpa]
nota: These two commands should generate you the two following files
YourDomainName.db & Net_Value.in-addr.arpa.db
in /var/etc/named/DNS. Both file are include from your
header.db files.
- If you have secondary computers that use your local server,
just write the two following line in there /etc/resolv.conf
domain sene.bzh [where sene.bzh is your domaineName]
nameserver 200.200.200.1 [where 200.200.200.1 is your local DNS]
WARNING: NameServer should be an IP number and not a symbolic name
and this even if it is declare in your /etc/hosts.
- It is now time to start your name server, by just typing in:
named
- Check your name server is effectively working
dnsquery -h your_host_name
WARNING: Even if your dialup line with INTERNET is broken your
name server should answer you. The only time it should
timeout is when you type in a wrong name, it with case it
should try reaching a forwarder.
Good Luck
Kenavo
phillf@iu-vannes.fr
ps: Sorry for the English, if someone want to set it up in real english
I will be please to replace my own README with a better one.
--------------------------------------------------- To remove yourself from this mailing list send email to majordomo@hub-wue.franken.de containing "unsubscribe isdn4linux <your_email_address>" in the message body [-vg]
From: Philippe Le Foll <phillf@iu-vannes.fr> Subject: Re: Namesserver Config
To: isdn4linux@hub-wue.franken.de
Date: Wed, 30 Oct 1996 19:09:10 +0100 (MET) Sender: owner-isdn4linux@hub-wue.franken.de Reply-To: isdn4linux@hub-wue.franken.de
I send to some people a small set of shell and example in order to set up a local name server on a Linux box.
I translate in aproximative english the README, which should in any case be easier to read that the french version.
Some people ask be for seting this in an ftp site unfortunately my university did not open yet an anonymous ftp.
phillf@iu-vannes.
Author: Philippe Le Foll: 30-oct-96
e-mail: phillf@iu-vannes.fr
All these shells are coming from Rennes Hight Brittany University they generate from /etc/hosts the DNS database, I modify them in order to run on my linux box.
(c) This is public program and you use them at your own risk
they will probably not run without some adaptation to your site.
All this example refer to the following configuration ------------------------------------------------------------
---------------
| to Internet |
--------------
|
|
dial-out/PPP
(dynamic IP number)
|
|
+------------------------+ +----------------------------+
| | | |
| DNS server | | DNS slave |
| Linux 2.x | | Linux or NT |
| name: bisig | | name fridu |
| | | |
| pppd [IP] | | |
| leafnode [news] | | Netcape [html+news+mail] |
| harvest [html cache]| | Eudora [mail] |
| popd [mail] | | |
| metahtml [local http]| | |
+------------------------+ +----------------------------+
200.200.200.1 200.200.200.1
| | +----------------------------------------------|---------------------------+
Unregistered 200.200.200" network, "domain sene.bzh"
Note:
1) This configuration give to all Slaves computer the impression
to be officially onto Internet without really be registrated.
2) It allows to run a cache even when INTERNET dial-up connection
is down.
3) It obviously read news during the night, but this is an other story.
To Do in order to install DNS
------------------------------
If you are running a DNS at home like me you probably have to choose for an unregistrated domain name as me.
Running on an official Internet network does not change anything except that you don't have to worry about your name and your net number.
- If you don't want to place your DNS data base in
/var/etc/named/DNS you will have to hack the shell
almost everything is hard coded
- create the destination directory /var/etc/named/DNS
- Copy all etc/*header* file in /var/etc/named/DNS then
adapt them to your site [here: network is 200.200.200].
- Allow named to start at boot time, for this remove comment
before named lines in /etc/rc.d/rc.inet2
- copy etc/named.boot file in /etc adapt it to your site
primary & forwarders lines syntax is:
PRIMARY myDomainename [here sene.bzh] headerPathName [here:sene.bzh.header.db]
FORWARDERS IP_NUMBER for your DNS parent [usually your provider].
example
primary sene.bzh /var/etc/named/DNS/sene.bzh.header.db
forwarders 194.51.217.1 194.51.3.49
- Normally /etc/resolv.conf is not mandatory, nevertheless
I place my local domain name in with the following line.
domain sene.bzh
- .cache directive refer to a standard file that you should have no
trouble with. Syntax is:
cache . /var/etc/named/DNS/named.root
NOTE: You can retrieve a more update named.root file true FTP
FTP.RS.INTERNIC.NET. (But for this named should work !!!)
- Build/update your /etc/hosts file. WARNING: all your local hosts
should have as main name host.YourDomainName INCLUDING localhost.YourDomainName
[see example in etc/hosts]
- Generate your DNS data base, this is the only thing you should have to
do at each /etc/hosts change. In fact this job is done automatically
with the following shell, syntax
make_db YourDomainName [ex: make_db sene.bzh]
make_in-addr.arpa Net_Value.._in-addr.arpa [ex: make_in-addr.arpa 200.200.200._in-addr.arpa]
nota: These two commands should generate you the two following files
YourDomainName.db & Net_Value.in-addr.arpa.db
in /var/etc/named/DNS. Both file are include from your
header.db files.
- If you have secondary computers that use your local server,
just write the two following line in there /etc/resolv.conf
domain sene.bzh [where sene.bzh is your domaineName]
nameserver 200.200.200.1 [where 200.200.200.1 is your local DNS]
WARNING: NameServer should be an IP number and not a symbolic name
and this even if it is declare in your /etc/hosts.
- It is now time to start your name server, by just typing in:
named
- Check your name server is effectively working
dnsquery -h your_host_name
WARNING: Even if your dialup line with INTERNET is broken your
name server should answer you. The only time it should
timeout is when you type in a wrong name, it with case it
should try reaching a forwarder.
Good Luck
Kenavo
phillf@iu-vannes.fr
ps: Sorry for the English, if someone want to set it up in real english
I will be please to replace my own README with a better one.
--------------------------------------------------- To remove yourself from this mailing list send email to majordomo@hub-wue.franken.de containing "unsubscribe isdn4linux <your_email_address>" in the message body [-vg]

View File

@ -1,292 +1,292 @@
Date: Tue, 29 Oct 1996 03:57:50 +0000 (GMT) From: Rainer May <r_may@khavi.desaster.heide.de> X-Sender: r_may@kahvi.desaster.heide.de To: isdn4linux@hub-wue.franken.de
Subject: i4l und Masquerading
X-Flags: MN
Sender: owner-isdn4linux@hub-wue.franken.de Reply-To: isdn4linux@hub-wue.franken.de
Nachdem ich leichtsinnig genug irgendwo mal verkuendet hatte, dass ich hier ein LAN hinter einem Linux-Server mit i4l bei meinem Provider einspeise, platzte mein Postfach aus den Naehten. Bevor ich alles immer wieder aufs Neue abtippe, hab' ich das Procedere in einer Art FAQ aufgeschrieben.
Vielleicht interessiert sich ja wer dafuer. Wer den Text in irgendwelche Webpages aufnehmen, ausdrucken und aufs Klo haengen oder sonstwas damit machen will, meinen Segen hat er.
Rainer
###########################
isdn4linux und IP-Masquerading im LAN
-------------------------------------
Problem: "Ich habe ein lokales Netzwerk (LAN), in dem Rechner
der verschiedensten Plattformen - Win95, Win311, NT,
Amiga (AmiTCP) und MacIntosh (MacTCP) - ueber einen
Linux-Router mit der Aussenwelt verbunden werden
sollen. In der Linux-Maschine steckt eine ISDN-
Karte. Von meinem Provider bekomme ich dynamisch
eine IP-Adresse zugewiesen, wenn die Verbindung auf-
gebaut wird. Nun moechte ich aber nicht nur vom
Linux-Router direkt, sondern von jedem Rechner im
LAN ins Internet kommen. Wie?"
Loesung: "Die meiste Arbeit ist auf Linux-Seite zu erledigen.
Zunaechst einmal braucht man einen Kernel mit ein-
gebautem IP-Forwarding und Masquerading. D.h., bei
"make config" muessen folgende Fragen mit "Y" be-
antwortet werden:
Prompt for development and/or incomplete code/drivers Y
Enable loadable module support Y
Networking support Y
Network firewalls Y
TCP/IP networking Y
IP: forwarding/gatewaying Y
IP: firewalling Y
IP: masquerading Y
PPP (point-to-point) support (wenn PPP zum Provider) Y
SLIP (serial line) support Y
Ethernet (10 or 100Mbit) (oder Arcnet oder ...) Y
ISDN support [1] M
Support synchronous PPP (wenn ipppd benutzt wird) Y
HiSax SiemensChipSet driver support M
(dann den HiSax fuer die ISDN Karte waehlen)
Anschliessend den Kernel wie ueblich mit "make dep",
"make clean", "make zImage", "make modules" und
"make modules_install" bauen.
Auf das Installieren von PPP und der ISDN-Treiber
wird an anderer Stelle ausfuehrlich eingegangen.
Hier geht es weiter, wenn folgende Voraussetzungen
erfuellt sind:
* Das ISDN-Subsystem laeuft, d.h., von Linux aus
kann eine Verbindung zum Provider hergestellt
werden.
* Das lokale Netzwerk (Ethernet usw.) laeuft auch,
vorzugsweise unter Verwendung "freier" IP-
Adressen (z.B. 192.168.xx.xx), und der Linux-Host
kann von allen anderen Rechnern im LAN erreicht
werden (z.B. per ping).
Nun gilt es, zweierlei zu erreichen:
* Zugriffe von einem beliebigen Rechner im LAN
auf eine nicht-lokale IP-Adresse sollen den
Linux-Router veranlassen, eine Verbindung zum
Provider aufzubauen; und
* Der Linux-Router soll zwar die Rechner im LAN
mit dem Provider verbinden, diesem gegenueber
aber verheimlichen, dass nicht der Router
selbst Empfaenger/Absender der entsprechenden
IP-Pakete ist.
Beginnen wir mit dem zweiten Punkt. Dieses "Ver-
heimlichen" hat nichts damit zu tun, dass man
seinen Provider hintergehen will (obwohl man auf
diese Weise auch selbst Provider spielen und
seine Kunden klammheimlich ueber _einen_ billigen
"Privat-Zugang" ins Internet bringen kann), son-
dern mit technischen Notwendigkeiten. Denn nur
das Interface des Linux-Rechners, das die Verbin-
dung zum Provider herstellt, bekommt von diesem
eine IP-Adresse verpasst, die der Provider auch
kennt. Traegt z.B. der Router im LAN die lokale
IP-Adresse 192.168.1.1, und ein anderer Rechner
die 192.168.1.2, dann kennt der Provider diese
Adressen ja nicht. Er weist z.B. dem PPP-Inter-
face des Routers die Adresse 123.234.345.99 zu -
und nur bei Paketen aus dem Internet, die an
diese Nummer adressiert sind, weiss er auch, an
wen er die Pakete schicken soll. Daher muss der
Router Pakete von anderen Rechnern im LAN "mas-
kieren" - mit seiner eigenen, dynamisch zugewie-
senen Adresse (und dabei natuerlich Buch darueber
fuehren, was an wen von wem kam, um die Antwort-
Pakete richtig zuzustellen).
Zum Glueck ist diese Funktion in den Linux-Kernel
=>2.0.0 schon eingebaut (s.o.) - sie nennt sich
"IP-Masquerading". Vereinfacht ausgedrueckt geht
das so:
Ein LAN-Rechner schickt ein Paket ab, das neben
IP-Nummer und Ziel-Port des Empfaengers auch die
"Absender-Adresse" in Form einer IP-Nummer und
eines Antwort-Ports traegt. Der maskierende
Router nun ersetzt die Absender-IP durch seine
eigene und den Ruecksende-Port durch einen freien
aus seinem Fundus. Unter dieser "freien" Port-
nummer werden die originalen Absender-Daten ge-
speichert. Kommt nun ein Antwort-Paket aus dem
Internet an diesen Port, werden dessen Empfaenger-
Adresse und -Port mit der gespeicherten Ruecksende-
Adresse ueberschrieben und an den LAN-Rechner wei-
tergeleitet. Paket fuer Paket.
Leicht einsehbar ist uebrigens, dass dieses Verfahren
nur mit Diensten funktioniert, bei denen auch eine
Ruecksende-Adresse angegeben wird. Dazu gehoeren
u.a. telnet, http, ftp, irc (eingeschraenkt), nicht
aber Echo (ping).
Zurueck zur Praxis. Damit das Masquerading auch
bei FTP und IRC funktioniert, werden zunaechst
zwei Module geladen:
/sbin/modprobe ip_masq_ftp
/sbin/modprobe ip_masq_irc
Dann werden die Forward-Rules des Kernel zum
Masquerading gezwungen:
/sbin/ipfwadm -F -a m -P all -S 192.168.123.0/24 -D 0.0.0.0/0 -b [2]
In diesem Beispiel werden im LAN die IP-Adressen
192.168.123.1 bis 192.168.123.254 benutzt. Legen
wir zur Vereinfachung fest, der Linux-Router habe
dabei die Adresse 192.168.123.1
Obige Zeile bewirkt, dass IP-Pakete, die von
192.168.123.x ausgehen und an wenauchimmer gerichtet
sind, maskiert werden. Das hat den Nachteil, dass
auch innerhalb des LAN fleissig drauflosmaskiert
wird, was man aber durch Einfuegen weiterer Rules
vermeiden kann. "man ipfwadm" sei hier zur Lektuere
empfohlen.
Das "Verstecken" des LAN vor dem Provider haben wir
nun erreicht. Jetzt gilt es, bei Bedarf einen auto-
matischen Verbindungsaufbau zu erzwingen.
Dafuer ist es zunaechst noetig, die anderen Rechner
im LAN dazu zu bringen, alle fuer "Ausserhalb" be-
stimmten IP-Pakete an den Linux-Router zu uebergeben
und diesem die Weiterleitung zu ueberlassen.
Nichts leichter als das: Sowohl bei den verschiedenen
Windows-Versionen, als auch beim AmiTCP und beim
MacTCP gibt es in der Konfiguration den Stichwort
"Default-Gateway" oder nur "Gateway". Hier ist die
_lokale_ IP-Adresse des Routers einzutragen (denn
die spaetere Adresse, die vom Provider kommt, ist
ja erstens noch nicht bekannt und aendert sich zwei-
tens bei jedem Anruf).
Letzter Schritt ist dann, das "dial-on-demand" ein-
zurichten. In Verbindung mit isdn4linux gibt es dafuer
zwei Moeglichkeiten:
* Man verwendet synchrones PPP fuer die Verbindung
zum Provider, also den "ipppd". Dann ist nichts
weiter zu tun als dafuer zu sorgen, dass immer
die Default-Route des Routers auf das entsprechende
ipppx-Interface weist. Vorsicht: Beim Verbindungs-
abbau loescht der Kernel diese Route! Sie muss
also z.B. in der Datei /etc/ppp/ip-down neu gesetzt
werden.
Das Risiko bei diesem Verfahren sind Programme auf
den LAN-Rechnern, die mehr oder weniger regelmaessig
Nameserver-Requests, Keepalive-Pakete oder ARP-
Broadcastings erzeugen - dann stellt naemlich der
Router jedesmal eine Verbindung zum Provider her.
Die Telekom wird's danken.
Uebrigens kann es passieren, dass manche aus dem
LAN initiierte Verbindungen recht lange auf Antwort
warten. Ich weiss nicht, ob Kernel oder ipppd das
"ausloesende" Paket verschlucken, oder die Antwort
darauf unterschlagen; ich weiss aber, dass es
hilft, z.B. bei Netscape wenige Sekunden nach
Anforderung der ersten Seite auf den "roten Knopf"
zu druecken und die Seite nochmals anzufordern.
Wie bereits erwaehnt: Die Konfiguration des ipppd
wird an anderer Stelle ausfuehrlicher und kompeten-
ter erklaert, als ich es koennte [3]
* Benutzt man asynchrones ppp oder gar SLIP/CSLIP
fuer die Verbindung zum Provider, kann man das
Programm "diald" [4] verwenden. Es bietet zudem
den Vorteil, extrem stark konfigurierbar zu sein;
so kann man z.B. festlegen, dass zwischen 0900
und 1200 grundsaetzlich keine Verbindung aufgebaut
wird, dass Nameserver-Anfragen eine Verbindung zwar
nicht aufbauen, aber offenhalten koennen u.v.m.
Wer sich mit diesen Konfigurationsmoeglichkeiten
nicht herumschlagen mag, braucht das indes auch
nicht - die Default-Konfiguration kann man ohne
Gefahr fuer Leib und Geldboerse uebernehmen :-)
So. Wenn jetzt das Masquerading eingerichtet wurde.
Wenn der Linux-Router auf allen LAN-Rechnern als
Gateway eingetragen wurde. Wenn ein "ping abc.edu",
eingetippt auf der Console des Routers, eine Verbin-
dung zum Provider aufbaut. _Dann_ sollte damit auch
fuer alle Rechner im LAN der Weg ins Internet frei sein.
Troubleshooting:
Problem: "Alles schoen und gut. Aber wenn ich z.B. von der
W95-Kiste aus mit Netscape eine Seite aufrufe,
bekomme ich als Antwort nur "unknown host" Loesung: "Was ist denn auf der "Win95-Kiste" als Nameserver
eingetragen? Sofern auf dem Router kein eigener
NS laeuft, muss natuerlich auf allen LAN-Rechnern
der NS des Providers eingetragen sein."
Problem: "Die Adressen werden jetzt aufgeloest, aber statt
der gewuenschten Seite bekomme ich die Meldung
"no route to host"!"
Loesung: "Bitte pruefen:
* Ist auf dem LAN-Rechner der Linux-Router als
Gateway eingetragen (manche "Betriebssysteme"
muss man komplett resetten, bevor Sie da eine
Aenderung mitbekommen)?
* Liegt auf dem Router die Default-Route auf dem
"Bereitschafts-Interface" zum Provider (z.B.
auf ippp0 bei synch. PPP, oder auf sl0 bei
diald (auch wenn die "echte" Verbindung nachher
per ppp0 geht - diald benutzt ein SLIP-Interface
als "Tuerklingel") ?
* Erzwingt der Provider die Verwendung von Proxies?
Dann muessen die IP-Adressen der Provider-Proxies
auch in den entsprechenden Programmen der LAN-
Rechner eingetragen sein!
Problem: "Warum sind bei diesem FAQ keine ausfuehrlichen
Beispielscripte fuer ipppd, diald usw.?" Loesung: "Weil dies eine FAQ ist und keine eierlegende
Wollmilchsau. Ein Beispiel fuer diald haengt
trotzdem hinten dran."
Problem: "Was muss ich fuer diese supertolle FAQ bezahlen?" Loesung: "Wenn es nach meiner Frau ginge, mindestens 250
Mark - so hoch veranschlagt sie den Abend, den ich
mit Schreiben verbrachte und der ihr daher entging.
Da es aber nicht nach meiner Frau geht, sondern nach
mir ;-), steht die FAQ unter GPL. Kost' also nix."
################################################################
[1] Wer mag, kann die ISDN-Treiber natuerlich auch direkt in den
Kernel einbauen, anstatt sie als Module zu verwenden.
[2] Das Programm ipfwadm gibt es per Anon-FTP als
ftp://ftp.xos.nl/pub/linux/ipfwadm/ipfwadm-2.3.0.tar.gz
[3] Bernhard Hailer hat das Ganze auf seinen www-Seiten sehr
ausfuehrlich und verstaendlich beschrieben. Die URL ist
http://www.chemie.uni-muenchen.de/ac/boehm/beh.html
################################################################
Beispielscripte fuer die Verwendung von isdn4linux mit diald. Die verbindung zum provider wird per X75 aufgebaut, das Protokoll ist dann PPP, ohne PAPpy/CHAPpy usw. Ein einfacher Login. Und Telefonnummer, Name sowie Passwort sind natuerlich gefaelscht :-)
-------------------
# zuerst wird - gleich beim Booten - diald "scharf gemacht" #
# /etc/rc.d/rc.diald
/usr/sbin/diald /dev/ttyI4 -m ppp local 192.168.90.9 remote 192.168.90.1 \
defaultroute dynamic modem crtscts lock connect "chat -v -f \
/etc/ppp/chat.provider"
#
-------------------
#
# /etc/ppp/chat.provider
#
TIMEOUT 240 "" AT&E1234 OK ATD047110815 ogin: Puser sword: topsecret #
-------------------
--------------------------------------------------- To remove yourself from this mailing list send email to majordomo@hub-wue.franken.de containing "unsubscribe isdn4linux <your_email_address>" in the message body [-vg]
Date: Tue, 29 Oct 1996 03:57:50 +0000 (GMT) From: Rainer May <r_may@khavi.desaster.heide.de> X-Sender: r_may@kahvi.desaster.heide.de To: isdn4linux@hub-wue.franken.de
Subject: i4l und Masquerading
X-Flags: MN
Sender: owner-isdn4linux@hub-wue.franken.de Reply-To: isdn4linux@hub-wue.franken.de
Nachdem ich leichtsinnig genug irgendwo mal verkuendet hatte, dass ich hier ein LAN hinter einem Linux-Server mit i4l bei meinem Provider einspeise, platzte mein Postfach aus den Naehten. Bevor ich alles immer wieder aufs Neue abtippe, hab' ich das Procedere in einer Art FAQ aufgeschrieben.
Vielleicht interessiert sich ja wer dafuer. Wer den Text in irgendwelche Webpages aufnehmen, ausdrucken und aufs Klo haengen oder sonstwas damit machen will, meinen Segen hat er.
Rainer
###########################
isdn4linux und IP-Masquerading im LAN
-------------------------------------
Problem: "Ich habe ein lokales Netzwerk (LAN), in dem Rechner
der verschiedensten Plattformen - Win95, Win311, NT,
Amiga (AmiTCP) und MacIntosh (MacTCP) - ueber einen
Linux-Router mit der Aussenwelt verbunden werden
sollen. In der Linux-Maschine steckt eine ISDN-
Karte. Von meinem Provider bekomme ich dynamisch
eine IP-Adresse zugewiesen, wenn die Verbindung auf-
gebaut wird. Nun moechte ich aber nicht nur vom
Linux-Router direkt, sondern von jedem Rechner im
LAN ins Internet kommen. Wie?"
Loesung: "Die meiste Arbeit ist auf Linux-Seite zu erledigen.
Zunaechst einmal braucht man einen Kernel mit ein-
gebautem IP-Forwarding und Masquerading. D.h., bei
"make config" muessen folgende Fragen mit "Y" be-
antwortet werden:
Prompt for development and/or incomplete code/drivers Y
Enable loadable module support Y
Networking support Y
Network firewalls Y
TCP/IP networking Y
IP: forwarding/gatewaying Y
IP: firewalling Y
IP: masquerading Y
PPP (point-to-point) support (wenn PPP zum Provider) Y
SLIP (serial line) support Y
Ethernet (10 or 100Mbit) (oder Arcnet oder ...) Y
ISDN support [1] M
Support synchronous PPP (wenn ipppd benutzt wird) Y
HiSax SiemensChipSet driver support M
(dann den HiSax fuer die ISDN Karte waehlen)
Anschliessend den Kernel wie ueblich mit "make dep",
"make clean", "make zImage", "make modules" und
"make modules_install" bauen.
Auf das Installieren von PPP und der ISDN-Treiber
wird an anderer Stelle ausfuehrlich eingegangen.
Hier geht es weiter, wenn folgende Voraussetzungen
erfuellt sind:
* Das ISDN-Subsystem laeuft, d.h., von Linux aus
kann eine Verbindung zum Provider hergestellt
werden.
* Das lokale Netzwerk (Ethernet usw.) laeuft auch,
vorzugsweise unter Verwendung "freier" IP-
Adressen (z.B. 192.168.xx.xx), und der Linux-Host
kann von allen anderen Rechnern im LAN erreicht
werden (z.B. per ping).
Nun gilt es, zweierlei zu erreichen:
* Zugriffe von einem beliebigen Rechner im LAN
auf eine nicht-lokale IP-Adresse sollen den
Linux-Router veranlassen, eine Verbindung zum
Provider aufzubauen; und
* Der Linux-Router soll zwar die Rechner im LAN
mit dem Provider verbinden, diesem gegenueber
aber verheimlichen, dass nicht der Router
selbst Empfaenger/Absender der entsprechenden
IP-Pakete ist.
Beginnen wir mit dem zweiten Punkt. Dieses "Ver-
heimlichen" hat nichts damit zu tun, dass man
seinen Provider hintergehen will (obwohl man auf
diese Weise auch selbst Provider spielen und
seine Kunden klammheimlich ueber _einen_ billigen
"Privat-Zugang" ins Internet bringen kann), son-
dern mit technischen Notwendigkeiten. Denn nur
das Interface des Linux-Rechners, das die Verbin-
dung zum Provider herstellt, bekommt von diesem
eine IP-Adresse verpasst, die der Provider auch
kennt. Traegt z.B. der Router im LAN die lokale
IP-Adresse 192.168.1.1, und ein anderer Rechner
die 192.168.1.2, dann kennt der Provider diese
Adressen ja nicht. Er weist z.B. dem PPP-Inter-
face des Routers die Adresse 123.234.345.99 zu -
und nur bei Paketen aus dem Internet, die an
diese Nummer adressiert sind, weiss er auch, an
wen er die Pakete schicken soll. Daher muss der
Router Pakete von anderen Rechnern im LAN "mas-
kieren" - mit seiner eigenen, dynamisch zugewie-
senen Adresse (und dabei natuerlich Buch darueber
fuehren, was an wen von wem kam, um die Antwort-
Pakete richtig zuzustellen).
Zum Glueck ist diese Funktion in den Linux-Kernel
=>2.0.0 schon eingebaut (s.o.) - sie nennt sich
"IP-Masquerading". Vereinfacht ausgedrueckt geht
das so:
Ein LAN-Rechner schickt ein Paket ab, das neben
IP-Nummer und Ziel-Port des Empfaengers auch die
"Absender-Adresse" in Form einer IP-Nummer und
eines Antwort-Ports traegt. Der maskierende
Router nun ersetzt die Absender-IP durch seine
eigene und den Ruecksende-Port durch einen freien
aus seinem Fundus. Unter dieser "freien" Port-
nummer werden die originalen Absender-Daten ge-
speichert. Kommt nun ein Antwort-Paket aus dem
Internet an diesen Port, werden dessen Empfaenger-
Adresse und -Port mit der gespeicherten Ruecksende-
Adresse ueberschrieben und an den LAN-Rechner wei-
tergeleitet. Paket fuer Paket.
Leicht einsehbar ist uebrigens, dass dieses Verfahren
nur mit Diensten funktioniert, bei denen auch eine
Ruecksende-Adresse angegeben wird. Dazu gehoeren
u.a. telnet, http, ftp, irc (eingeschraenkt), nicht
aber Echo (ping).
Zurueck zur Praxis. Damit das Masquerading auch
bei FTP und IRC funktioniert, werden zunaechst
zwei Module geladen:
/sbin/modprobe ip_masq_ftp
/sbin/modprobe ip_masq_irc
Dann werden die Forward-Rules des Kernel zum
Masquerading gezwungen:
/sbin/ipfwadm -F -a m -P all -S 192.168.123.0/24 -D 0.0.0.0/0 -b [2]
In diesem Beispiel werden im LAN die IP-Adressen
192.168.123.1 bis 192.168.123.254 benutzt. Legen
wir zur Vereinfachung fest, der Linux-Router habe
dabei die Adresse 192.168.123.1
Obige Zeile bewirkt, dass IP-Pakete, die von
192.168.123.x ausgehen und an wenauchimmer gerichtet
sind, maskiert werden. Das hat den Nachteil, dass
auch innerhalb des LAN fleissig drauflosmaskiert
wird, was man aber durch Einfuegen weiterer Rules
vermeiden kann. "man ipfwadm" sei hier zur Lektuere
empfohlen.
Das "Verstecken" des LAN vor dem Provider haben wir
nun erreicht. Jetzt gilt es, bei Bedarf einen auto-
matischen Verbindungsaufbau zu erzwingen.
Dafuer ist es zunaechst noetig, die anderen Rechner
im LAN dazu zu bringen, alle fuer "Ausserhalb" be-
stimmten IP-Pakete an den Linux-Router zu uebergeben
und diesem die Weiterleitung zu ueberlassen.
Nichts leichter als das: Sowohl bei den verschiedenen
Windows-Versionen, als auch beim AmiTCP und beim
MacTCP gibt es in der Konfiguration den Stichwort
"Default-Gateway" oder nur "Gateway". Hier ist die
_lokale_ IP-Adresse des Routers einzutragen (denn
die spaetere Adresse, die vom Provider kommt, ist
ja erstens noch nicht bekannt und aendert sich zwei-
tens bei jedem Anruf).
Letzter Schritt ist dann, das "dial-on-demand" ein-
zurichten. In Verbindung mit isdn4linux gibt es dafuer
zwei Moeglichkeiten:
* Man verwendet synchrones PPP fuer die Verbindung
zum Provider, also den "ipppd". Dann ist nichts
weiter zu tun als dafuer zu sorgen, dass immer
die Default-Route des Routers auf das entsprechende
ipppx-Interface weist. Vorsicht: Beim Verbindungs-
abbau loescht der Kernel diese Route! Sie muss
also z.B. in der Datei /etc/ppp/ip-down neu gesetzt
werden.
Das Risiko bei diesem Verfahren sind Programme auf
den LAN-Rechnern, die mehr oder weniger regelmaessig
Nameserver-Requests, Keepalive-Pakete oder ARP-
Broadcastings erzeugen - dann stellt naemlich der
Router jedesmal eine Verbindung zum Provider her.
Die Telekom wird's danken.
Uebrigens kann es passieren, dass manche aus dem
LAN initiierte Verbindungen recht lange auf Antwort
warten. Ich weiss nicht, ob Kernel oder ipppd das
"ausloesende" Paket verschlucken, oder die Antwort
darauf unterschlagen; ich weiss aber, dass es
hilft, z.B. bei Netscape wenige Sekunden nach
Anforderung der ersten Seite auf den "roten Knopf"
zu druecken und die Seite nochmals anzufordern.
Wie bereits erwaehnt: Die Konfiguration des ipppd
wird an anderer Stelle ausfuehrlicher und kompeten-
ter erklaert, als ich es koennte [3]
* Benutzt man asynchrones ppp oder gar SLIP/CSLIP
fuer die Verbindung zum Provider, kann man das
Programm "diald" [4] verwenden. Es bietet zudem
den Vorteil, extrem stark konfigurierbar zu sein;
so kann man z.B. festlegen, dass zwischen 0900
und 1200 grundsaetzlich keine Verbindung aufgebaut
wird, dass Nameserver-Anfragen eine Verbindung zwar
nicht aufbauen, aber offenhalten koennen u.v.m.
Wer sich mit diesen Konfigurationsmoeglichkeiten
nicht herumschlagen mag, braucht das indes auch
nicht - die Default-Konfiguration kann man ohne
Gefahr fuer Leib und Geldboerse uebernehmen :-)
So. Wenn jetzt das Masquerading eingerichtet wurde.
Wenn der Linux-Router auf allen LAN-Rechnern als
Gateway eingetragen wurde. Wenn ein "ping abc.edu",
eingetippt auf der Console des Routers, eine Verbin-
dung zum Provider aufbaut. _Dann_ sollte damit auch
fuer alle Rechner im LAN der Weg ins Internet frei sein.
Troubleshooting:
Problem: "Alles schoen und gut. Aber wenn ich z.B. von der
W95-Kiste aus mit Netscape eine Seite aufrufe,
bekomme ich als Antwort nur "unknown host" Loesung: "Was ist denn auf der "Win95-Kiste" als Nameserver
eingetragen? Sofern auf dem Router kein eigener
NS laeuft, muss natuerlich auf allen LAN-Rechnern
der NS des Providers eingetragen sein."
Problem: "Die Adressen werden jetzt aufgeloest, aber statt
der gewuenschten Seite bekomme ich die Meldung
"no route to host"!"
Loesung: "Bitte pruefen:
* Ist auf dem LAN-Rechner der Linux-Router als
Gateway eingetragen (manche "Betriebssysteme"
muss man komplett resetten, bevor Sie da eine
Aenderung mitbekommen)?
* Liegt auf dem Router die Default-Route auf dem
"Bereitschafts-Interface" zum Provider (z.B.
auf ippp0 bei synch. PPP, oder auf sl0 bei
diald (auch wenn die "echte" Verbindung nachher
per ppp0 geht - diald benutzt ein SLIP-Interface
als "Tuerklingel") ?
* Erzwingt der Provider die Verwendung von Proxies?
Dann muessen die IP-Adressen der Provider-Proxies
auch in den entsprechenden Programmen der LAN-
Rechner eingetragen sein!
Problem: "Warum sind bei diesem FAQ keine ausfuehrlichen
Beispielscripte fuer ipppd, diald usw.?" Loesung: "Weil dies eine FAQ ist und keine eierlegende
Wollmilchsau. Ein Beispiel fuer diald haengt
trotzdem hinten dran."
Problem: "Was muss ich fuer diese supertolle FAQ bezahlen?" Loesung: "Wenn es nach meiner Frau ginge, mindestens 250
Mark - so hoch veranschlagt sie den Abend, den ich
mit Schreiben verbrachte und der ihr daher entging.
Da es aber nicht nach meiner Frau geht, sondern nach
mir ;-), steht die FAQ unter GPL. Kost' also nix."
################################################################
[1] Wer mag, kann die ISDN-Treiber natuerlich auch direkt in den
Kernel einbauen, anstatt sie als Module zu verwenden.
[2] Das Programm ipfwadm gibt es per Anon-FTP als
ftp://ftp.xos.nl/pub/linux/ipfwadm/ipfwadm-2.3.0.tar.gz
[3] Bernhard Hailer hat das Ganze auf seinen www-Seiten sehr
ausfuehrlich und verstaendlich beschrieben. Die URL ist
http://www.chemie.uni-muenchen.de/ac/boehm/beh.html
################################################################
Beispielscripte fuer die Verwendung von isdn4linux mit diald. Die verbindung zum provider wird per X75 aufgebaut, das Protokoll ist dann PPP, ohne PAPpy/CHAPpy usw. Ein einfacher Login. Und Telefonnummer, Name sowie Passwort sind natuerlich gefaelscht :-)
-------------------
# zuerst wird - gleich beim Booten - diald "scharf gemacht" #
# /etc/rc.d/rc.diald
/usr/sbin/diald /dev/ttyI4 -m ppp local 192.168.90.9 remote 192.168.90.1 \
defaultroute dynamic modem crtscts lock connect "chat -v -f \
/etc/ppp/chat.provider"
#
-------------------
#
# /etc/ppp/chat.provider
#
TIMEOUT 240 "" AT&E1234 OK ATD047110815 ogin: Puser sword: topsecret #
-------------------
--------------------------------------------------- To remove yourself from this mailing list send email to majordomo@hub-wue.franken.de containing "unsubscribe isdn4linux <your_email_address>" in the message body [-vg]

View File

@ -1,111 +1,111 @@
Date: Sat, 19 Oct 1996 02:21:45 +0200
X-Sender: sw0001@aixrs1.hrz.uni-essen.de To: isdn4linux@hub-wue.franken.de
From: Matthias Hessler <hessler@wi-inf.uni-essen.de> Subject: RE: options files
Sender: owner-isdn4linux@hub-wue.franken.de Reply-To: isdn4linux@hub-wue.franken.de
At 17:57 18.10.1996 +0200, you wrote:
>Matthias Hessler <hessler@wi-inf.uni-essen.de> ha escrito a
>isdn4linux@hub-wue.franken.de:
>
>> well, isdnctrl does not quite assign interface ipppx to /dev/ipppx by
>> default (e.g. interface ippp3 to /dev/ippp3). I'm not entirely sure how
>it
>> does its assignements, but I think it takes interface ipppx and binds it
>to
>> the first available /dev/ipppx, starting x with 0 and counting up (e.g.
>your
>> interface ippp3 gets bound to /dev/ippp0 because there is an ipppd
>already
>> waiting there)
>> Which leads to your problem: you want interface ippp3 _exclusively_ bound
>to
>> /dev/ippp3 because you want only your ipppd configured for /dev/ippp3
>> answering all the traffic from your interface ippp3.
>
>Hi Matthias
>
>Ok; for clarifying scripts (and my concepts :) I name net interfaces
>isdn0..isdn3, but when I try to launch ipppd, it tells me there must be at
>least ippp0 configured (???) Does it means i have to configure interfaces
>twice (one time for ipppX and other for isdnX)?
No.
Here is what happened: You named your net interfaces isdn0..isdn3 and did not use the pppbind option. Now isdnctrl has no clue that it should connect those interfaces to any /dev/ippp* .
If you name your net interfaces ippp0..ippp3, then isdnctrl _automatically_ recognizes (by the name of those interfaces) that those should be connected to the /dev/ippp* . It does it (if I'm not wrong about that default behavior) when data arrives by connecting a net interface to the first available /dev/ippp* .
Let's say if data arrives on net interface ippp3, it tries to connect it to /dev/ippp0, if that is available. If not (already another connection going on?), it tries /dev/ippp1, and so on.
As you have two ipppd's with different options running that is not what you want, because you can never tell in advance which data will be answered by which ipppd.
No matter how the name of your net interfaces is, if you use the "isdnctrl pppbind" option, you can tell isdnctrl to _always_ connect some netinterface with some /dev/ippp* . E.g.:
isdnctrl pppbind isdn3 2
tells isdnctrl to always put data from net interface isdn3 to /dev/ippp2.
That is very handy, if you want to have a special ipppd lurking on /dev/ippp2 that should get all that traffic from isdn3.
Isdnctrl acts like a switch board.
Default behaviour (using net interfaces ippp0 and ippp1): =========================================================
Kernel---------+
| |
Net interface ippp0 ippp1 (isdnctrl addif ippp*)
| |
| |
Isdnctrl (by default, to next available device
=> no isdnctrl pppbind necessary)
| |
| |
Device /dev/ippp0 /dev/ippp1 /dev/ippp2 /dev/ippp3
| | | |
ipppd ipppd ipppd ipppd
Default behaviour (using net interfaces isdn0, isdn1, isdn2, isdn3): ====================================================================
Kernel------+----------+----------+
| | | | Net interface isdn0 isdn1 isdn2 isdn3 (isdnctrl addif ippp*)
isdnctrl (no connection from isdn* to any /dev/ippp*,
because: name of net interface is not "ippp*")
Device /dev/ippp0 /dev/ippp1 /dev/ippp2 /dev/ippp3
| | | |
ipppd ipppd ipppd ipppd
Behavior using "isdnctrl pppbind" (A):
======================================
Kernel------+----------+----------+
| | | | Net interface isdn0 isdn1 isdn2 isdn3 (isdnctrl addif isdn*)
|
| Isdnctrl +-------+ (isdnctrl pppbind isdn3 2)
|
| Device /dev/ippp0 /dev/ippp1 /dev/ippp2 /dev/ippp3
| | | |
ipppd ipppd ipppd ipppd
Behavior using "isdnctrl pppbind" (A):
======================================
Kernel------+----------+----------+
| | | | Net interface isdn0 isdn1 isdn2 isdn3 (isdnctrl addif isdn*)
|
| Isdnctrl +-------+ (isdnctrl pppbind isdn2 1)
|
|
Device /dev/ippp0 /dev/ippp1 /dev/ippp2 /dev/ippp3
| | | |
ipppd ipppd ipppd ipppd
I hope that's correct. Please correct me if I'm wrong...
Bye,
Matthias
**************************************************************** Matthias Heßler Email: hessler@wi-inf.uni-essen.de Gelsenkirchener Str. 67 Tel. : 0201-8915964 45141 Essen Fax. : 0201-8915965 ****************************************************************
--------------------------------------------------- To remove yourself from this mailing list send email to majordomo@hub-wue.franken.de containing "unsubscribe isdn4linux <your_email_address>" in the message body [-vg]
Date: Sat, 19 Oct 1996 02:21:45 +0200
X-Sender: sw0001@aixrs1.hrz.uni-essen.de To: isdn4linux@hub-wue.franken.de
From: Matthias Hessler <hessler@wi-inf.uni-essen.de> Subject: RE: options files
Sender: owner-isdn4linux@hub-wue.franken.de Reply-To: isdn4linux@hub-wue.franken.de
At 17:57 18.10.1996 +0200, you wrote:
>Matthias Hessler <hessler@wi-inf.uni-essen.de> ha escrito a
>isdn4linux@hub-wue.franken.de:
>
>> well, isdnctrl does not quite assign interface ipppx to /dev/ipppx by
>> default (e.g. interface ippp3 to /dev/ippp3). I'm not entirely sure how
>it
>> does its assignements, but I think it takes interface ipppx and binds it
>to
>> the first available /dev/ipppx, starting x with 0 and counting up (e.g.
>your
>> interface ippp3 gets bound to /dev/ippp0 because there is an ipppd
>already
>> waiting there)
>> Which leads to your problem: you want interface ippp3 _exclusively_ bound
>to
>> /dev/ippp3 because you want only your ipppd configured for /dev/ippp3
>> answering all the traffic from your interface ippp3.
>
>Hi Matthias
>
>Ok; for clarifying scripts (and my concepts :) I name net interfaces
>isdn0..isdn3, but when I try to launch ipppd, it tells me there must be at
>least ippp0 configured (???) Does it means i have to configure interfaces
>twice (one time for ipppX and other for isdnX)?
No.
Here is what happened: You named your net interfaces isdn0..isdn3 and did not use the pppbind option. Now isdnctrl has no clue that it should connect those interfaces to any /dev/ippp* .
If you name your net interfaces ippp0..ippp3, then isdnctrl _automatically_ recognizes (by the name of those interfaces) that those should be connected to the /dev/ippp* . It does it (if I'm not wrong about that default behavior) when data arrives by connecting a net interface to the first available /dev/ippp* .
Let's say if data arrives on net interface ippp3, it tries to connect it to /dev/ippp0, if that is available. If not (already another connection going on?), it tries /dev/ippp1, and so on.
As you have two ipppd's with different options running that is not what you want, because you can never tell in advance which data will be answered by which ipppd.
No matter how the name of your net interfaces is, if you use the "isdnctrl pppbind" option, you can tell isdnctrl to _always_ connect some netinterface with some /dev/ippp* . E.g.:
isdnctrl pppbind isdn3 2
tells isdnctrl to always put data from net interface isdn3 to /dev/ippp2.
That is very handy, if you want to have a special ipppd lurking on /dev/ippp2 that should get all that traffic from isdn3.
Isdnctrl acts like a switch board.
Default behaviour (using net interfaces ippp0 and ippp1): =========================================================
Kernel---------+
| |
Net interface ippp0 ippp1 (isdnctrl addif ippp*)
| |
| |
Isdnctrl (by default, to next available device
=> no isdnctrl pppbind necessary)
| |
| |
Device /dev/ippp0 /dev/ippp1 /dev/ippp2 /dev/ippp3
| | | |
ipppd ipppd ipppd ipppd
Default behaviour (using net interfaces isdn0, isdn1, isdn2, isdn3): ====================================================================
Kernel------+----------+----------+
| | | | Net interface isdn0 isdn1 isdn2 isdn3 (isdnctrl addif ippp*)
isdnctrl (no connection from isdn* to any /dev/ippp*,
because: name of net interface is not "ippp*")
Device /dev/ippp0 /dev/ippp1 /dev/ippp2 /dev/ippp3
| | | |
ipppd ipppd ipppd ipppd
Behavior using "isdnctrl pppbind" (A):
======================================
Kernel------+----------+----------+
| | | | Net interface isdn0 isdn1 isdn2 isdn3 (isdnctrl addif isdn*)
|
| Isdnctrl +-------+ (isdnctrl pppbind isdn3 2)
|
| Device /dev/ippp0 /dev/ippp1 /dev/ippp2 /dev/ippp3
| | | |
ipppd ipppd ipppd ipppd
Behavior using "isdnctrl pppbind" (A):
======================================
Kernel------+----------+----------+
| | | | Net interface isdn0 isdn1 isdn2 isdn3 (isdnctrl addif isdn*)
|
| Isdnctrl +-------+ (isdnctrl pppbind isdn2 1)
|
|
Device /dev/ippp0 /dev/ippp1 /dev/ippp2 /dev/ippp3
| | | |
ipppd ipppd ipppd ipppd
I hope that's correct. Please correct me if I'm wrong...
Bye,
Matthias
**************************************************************** Matthias Heßler Email: hessler@wi-inf.uni-essen.de Gelsenkirchener Str. 67 Tel. : 0201-8915964 45141 Essen Fax. : 0201-8915965 ****************************************************************
--------------------------------------------------- To remove yourself from this mailing list send email to majordomo@hub-wue.franken.de containing "unsubscribe isdn4linux <your_email_address>" in the message body [-vg]

View File

@ -1,137 +1,137 @@
X-Sender: dekay@xplor.ipf.de
References: <m0vIIrY-000LHmC@scorpio.in-berlin.de> from "Gernot Zander" at Oct 29, 96 07:26:08 pm
Date: Wed, 30 Oct 1996 19:05:55 +0200
To: isdn4linux@hub-wue.franken.de, michael@abadonna.franken.de From: Darko Krizic <dekay@ipf.de>
Subject: Sounds erzeugen für vgetty/vboxgetty Cc: maze@frankfurt.netsurf.de
Sender: owner-isdn4linux@hub-wue.franken.de Reply-To: isdn4linux@hub-wue.franken.de
Ich möchte hier ein paar Erfahrungen mit vboxgetty zusammenzählen, insbesondere im Zusammenhang mit dem Erzeugen von Messages (Sounds)
Sound-Format
------------
Das Format ADPCM-4 generiert beim Aufzeichnen wesentlich kleinere Dateien als die Formate uLaw oder aLaw, deswegen ist dieses Format vorzuziehen.
Vorteil von uLaw ist allerdings, daß es dem au-Format entspricht und so direkt mit cat sound.au >/dev/audio angehört werden kann, allerdings gibt es zwei Probleme:
- Das ist nur interessant für Leute, die auch am Linux-Rechner sitzen und dieser eine Soundkarte besitzt. Viele Leute verwenden den Linux-Rechner als "echten" Server, der weder Monitor noch Soundkarte hat.
- Die aufgezeichneten Samples haben einen sehr schwachen Pegel, den man theoretisch mit
autopvf <x.msg | pvfamp 5 | pvftoau >x_laut.msg
verstärken könnte, allerdings muß man sich dann sowieso mit den pvf-Tools befassen und kann dann auch gleich auf ADPCM-4 umsteigen.
Aufzeichen über Telefon
-----------------------
Wie in der i4l-FAQ beschrieben ist es ohne Probleme möglich sich selbst auf den Anrufbeantworter zu sprechen und die entsprechende Datei in das Verzeichnis /var/spool/vobx/<user>/incoming/standard.msg zu kopieren.
Allerdings ist die Qualität bei weitem nicht ausreichend, unter anderem, weil sich am Anfang und Ende Geräusche oder Pausen befinden.
Selbst Dateien generieren
-------------------------
Ich habe einen Macintosh, der unter anderem die Möglichkeit bietet, Sound von Audio-CDs ohne Verluste per SCSI auf die Festplatte zu kopieren und nachträglich auf andere Samplegeschwindigkeit und Bitbreite zu konvertieren, z.B. "16bit, 44kHz -> 8bit, 22kHz". Desweiteren kann ich mit dem Mikrofon Sounds und am Ende alle Sounds manipulieren und mixen. Die beste Voraussetzungen für verrückte Ansagen.
Das Format, das der Macintosh verarbeitet ist AIFF. Dieser Standard wird auch von SGI und anderen namhaften Herstellern verwendet, allerdings konnte ich unter Linux kein Programm finden, das dieses Format versteht. Auf dem Macintosh gibt es allerdings das Programm "SoundApp", welches nach und von Suns .au konvertieren und ADPCM wenigstens abspielen kann. Anmerkung: Dummerweise nennt SoundApp das au-Format "NeXT", weil dieses Format dort verwendet wird, allerdings habe ich lange gebraucht, um herauszufinden, daß es dasselbe wie au ist.
Ich nehme mal an, daß unsere Windows-Freunde ähnliche Fähigkeiten haben.
Das Windows-Hausformat nennt sich WAV. Auch dieses Format kennen die PVF-Tools nicht, aber ich denke mal, daß es unter Windows ähnliche Werkezeuge gibt, die sogar ADPCM-4 generieren können.
Ich weiß nicht, wie man unter Linux Sounds aufzeichnen kann und welches Format diese haben, allerdings wird es wohl Sun-AU-Format haben, so daß der weitere Text auf für Linux-Benutzer interessant ist.
Sounds für vboxgetty konvertieren
---------------------------------
Wie bereits oben beschrieben, empfehle ich den Betrieb mit ADPCM-4. Bei mgetty befindet sich die pvf-Toolsammlung, welche Soundformate konvertieren und manipulieren kann, allerdings gab es Probleme mit den Formaten, die vboxgetty generiert hatte (ADPCM-4). Gegen dieses Problem gibt es Patches, allerdings enthält die neuste Version von mgetty (0.99 Okt02 und wahrscheinlich auch ein paar ältere) bereits die Programme "zyxeltopvf" und "pvftozyxel[234]", mit welchen genau diese Formate konvertiert werden können.
Mein Macintosh liefert die Sounds 22254Hz. Um daraus einen entsprechenden Sound in ADPCM-4 zu generieren verwende ich folgende Kommendozeile:
autopvf <standard.au \
| pvfspeed 2.73 \
| pvfamp 0.2 \
| pvftozyxel4 >standard.msg
autopvf konvertiert dan au-Sound nach pvf. pvfspeed ändert die Samplingrate auf 8000 (22554 / 8000 = 2.73), damit die Geschwindigkeit wieder stimmt.
pvfamp 0.2 senkt den Pegel auf 20%, weil der Sound sonst total verzerrt klingt, schließlich kennt das Telefon nur Frequenzen zwischen 300 und 3000Hz. Zuletzt legt pvftozyxel4 den Sound im richtigen Format ab.
Dadurch, daß weder Rauschen noch Klacken zu hören sind, klingen so generierte Ansagen einfach klasse. Wer etwas mit Sound-Manipulationsprogrammen spielen kann, der kann tolle Effekte generieren, allerdings sollte man damit wegen des beschränten Frequenzbandes echt sparsam umgehen, sonst versteht der Anrufende nichts.
Nachbarbeiteitung von aufgezeichneten Nachrichten ------------------------------------------------- Ich möchte, daß meine Nachrichten in ein auf dem Macintosh abspielbaren Format konvertiert werden und an eine e-mail an mich attached werden sollen. Ich konvertiere den Sound nach au mit folgenden Befehlen:
zyxeltopvf <sound.pvf \
| pvfamp 5
| pvfcut 0.2 0.2 \
| pvftoau 8000 >sound.au
zyxeltopvf konvertiert den aufgezeichneten Sound nach pvf und pvfamp verstärkt diesen auf das fünffache, weil der Pegel (s.ganz.o) sehr schwach ist. pvfcut schneidet 0.2 Sekunden vorne und hinten ab, weil man hinten z.B. das Auflegen des Telefons hört. Scheinbar zeichnet vboxgetty schon auf, während der Beep-Ton abgespielt wird, weil dieser ganz am Anfang zu hören ist. Die 8000 nach dem pvtoau ist sehr wichtig, weil diese sorgt, daß die Frequenz in den au-Header geschrieben wird, damit das abspielende Programm auch die richtige Rate spielt!
Namen des Anrufenden in der Mail
--------------------------------
vboxgetty kennt den Namen des Anrufenden, während es die Nachricht aufzeichnet, dummerweise wird dieser Name nicht an das Programm "-p /usr/local/vbox/new_voice" mit übergeben. Ich habe deswegen einen (very dirty) hack von vboxgetty erzeugt, welches als 4ten Parameter den Namen an new_voice übergibt, damit ist es möglich, daß das Subject der generierten Mail aussieht wie "Voice from Darko Krizic" oder zumindest "Voice from Unknown". Da bei internationalen Calls zumindest die Landeskennung übergeben wird, kann eine Nachricht aus USA ein Subject wie "Voice from USA" haben.
Ich bitte hiermit den Autor von vbox selbst die Änderungen zu machen.
Beispiel für ein new_voice-Script
---------------------------------
Das Nachfolgende Shellscript hat bei mir den Namen /usr/local/vbox/new_voice und in der Inittab hängt noch "-p /usr/local/vbox/new_voice" als Parameter, damit dieses Programm nach dem Aufzeichnen einer Nachricht aufgerufen wird.
Die Datei wird nach .au konvertiert und als MIME-encoded Message an den Benutzer für den die Nachricht aufgezeichnet wurde, geschickt. Ich verwende übrigens mimeencode nicht. Wenn diese Mail von Eudora auf dem Macintosh empfangen wird, wird der Sound als Icon angezeigt. Ein Doppelklick reicht aus, um den Sound abzuspielen.
#! /bin/sh
#
# Creates a new MIME-encoded mail to the user with an attached .au file # Written 1996 by Darko Krizic
PATH="${PATH}:/usr/local/vbox"
TMP="/tmp/vboxmime.$$"
ME="`basename $0`"
mailer="/usr/sbin/sendmail -t"
bound="NewVoice_-${$}${$}"
type="audio/ulaw"
file="${1}"
id="${2}"
user="${3}"
name="${4}"
date="`date +%y%m%d%H%M`"
newname=${date}-${id}.au
if [ -z "$name" ]
then
name=$id
fi
echo "\
Subject: Voice from $name
From: root@xplor.ipf.de (Voice Subsystem) To: $user
Content-type: multipart/mixed; boundary=\"$bound\"
--$bound
Content-Type: text/pain
A new voice has arrived
Sender ID: $id
Name: $name
File: $file
--$bound
Content-Type: application/octet-stream; name=\"$newname\" Content-transfer-encoding: x-uuencode
" >$TMP
/usr/local/bin/zyxeltopvf <$file \
| /usr/local/bin/pvfamp 5 \
| /usr/local/bin/pvfcut 0.2 0.2 \
| /usr/local/bin/pvftoau 8000 \
| /usr/bin/uuencode $newname >>$TMP
#rmdcutheader <$file | uuencode $newname >>$TMP echo "--$bound--" >>$TMP
$mailer -t <$TMP
#cat $TMP
rm $TMP
Anmerkungen: Es handelt sich dabei nur um ein Beispiel, welches ich schnell für mich zusammengehackt habe. Wenn jemand Anmerkugen und Ideen hat, soll ich bei mir melden. Ich erwähne nochmal: Das Script funktioniert zwar auch so, allerdings macht es erst richtig sinn, wenn vboxgetty als 4ten Parameter den Namen des Anrufenden übertragt, sonst ist das Subject immer "Voice from Unkown".
Darko Krizic
----------------------------------------------------------------------- Darko Krizic Phrankphurt Germany mailto:dekay@xplor.ipf.de
--------------------------------------------------- To remove yourself from this mailing list send email to majordomo@hub-wue.franken.de containing "unsubscribe isdn4linux <your_email_address>" in the message body [-vg]
X-Sender: dekay@xplor.ipf.de
References: <m0vIIrY-000LHmC@scorpio.in-berlin.de> from "Gernot Zander" at Oct 29, 96 07:26:08 pm
Date: Wed, 30 Oct 1996 19:05:55 +0200
To: isdn4linux@hub-wue.franken.de, michael@abadonna.franken.de From: Darko Krizic <dekay@ipf.de>
Subject: Sounds erzeugen für vgetty/vboxgetty Cc: maze@frankfurt.netsurf.de
Sender: owner-isdn4linux@hub-wue.franken.de Reply-To: isdn4linux@hub-wue.franken.de
Ich möchte hier ein paar Erfahrungen mit vboxgetty zusammenzählen, insbesondere im Zusammenhang mit dem Erzeugen von Messages (Sounds)
Sound-Format
------------
Das Format ADPCM-4 generiert beim Aufzeichnen wesentlich kleinere Dateien als die Formate uLaw oder aLaw, deswegen ist dieses Format vorzuziehen.
Vorteil von uLaw ist allerdings, daß es dem au-Format entspricht und so direkt mit cat sound.au >/dev/audio angehört werden kann, allerdings gibt es zwei Probleme:
- Das ist nur interessant für Leute, die auch am Linux-Rechner sitzen und dieser eine Soundkarte besitzt. Viele Leute verwenden den Linux-Rechner als "echten" Server, der weder Monitor noch Soundkarte hat.
- Die aufgezeichneten Samples haben einen sehr schwachen Pegel, den man theoretisch mit
autopvf <x.msg | pvfamp 5 | pvftoau >x_laut.msg
verstärken könnte, allerdings muß man sich dann sowieso mit den pvf-Tools befassen und kann dann auch gleich auf ADPCM-4 umsteigen.
Aufzeichen über Telefon
-----------------------
Wie in der i4l-FAQ beschrieben ist es ohne Probleme möglich sich selbst auf den Anrufbeantworter zu sprechen und die entsprechende Datei in das Verzeichnis /var/spool/vobx/<user>/incoming/standard.msg zu kopieren.
Allerdings ist die Qualität bei weitem nicht ausreichend, unter anderem, weil sich am Anfang und Ende Geräusche oder Pausen befinden.
Selbst Dateien generieren
-------------------------
Ich habe einen Macintosh, der unter anderem die Möglichkeit bietet, Sound von Audio-CDs ohne Verluste per SCSI auf die Festplatte zu kopieren und nachträglich auf andere Samplegeschwindigkeit und Bitbreite zu konvertieren, z.B. "16bit, 44kHz -> 8bit, 22kHz". Desweiteren kann ich mit dem Mikrofon Sounds und am Ende alle Sounds manipulieren und mixen. Die beste Voraussetzungen für verrückte Ansagen.
Das Format, das der Macintosh verarbeitet ist AIFF. Dieser Standard wird auch von SGI und anderen namhaften Herstellern verwendet, allerdings konnte ich unter Linux kein Programm finden, das dieses Format versteht. Auf dem Macintosh gibt es allerdings das Programm "SoundApp", welches nach und von Suns .au konvertieren und ADPCM wenigstens abspielen kann. Anmerkung: Dummerweise nennt SoundApp das au-Format "NeXT", weil dieses Format dort verwendet wird, allerdings habe ich lange gebraucht, um herauszufinden, daß es dasselbe wie au ist.
Ich nehme mal an, daß unsere Windows-Freunde ähnliche Fähigkeiten haben.
Das Windows-Hausformat nennt sich WAV. Auch dieses Format kennen die PVF-Tools nicht, aber ich denke mal, daß es unter Windows ähnliche Werkezeuge gibt, die sogar ADPCM-4 generieren können.
Ich weiß nicht, wie man unter Linux Sounds aufzeichnen kann und welches Format diese haben, allerdings wird es wohl Sun-AU-Format haben, so daß der weitere Text auf für Linux-Benutzer interessant ist.
Sounds für vboxgetty konvertieren
---------------------------------
Wie bereits oben beschrieben, empfehle ich den Betrieb mit ADPCM-4. Bei mgetty befindet sich die pvf-Toolsammlung, welche Soundformate konvertieren und manipulieren kann, allerdings gab es Probleme mit den Formaten, die vboxgetty generiert hatte (ADPCM-4). Gegen dieses Problem gibt es Patches, allerdings enthält die neuste Version von mgetty (0.99 Okt02 und wahrscheinlich auch ein paar ältere) bereits die Programme "zyxeltopvf" und "pvftozyxel[234]", mit welchen genau diese Formate konvertiert werden können.
Mein Macintosh liefert die Sounds 22254Hz. Um daraus einen entsprechenden Sound in ADPCM-4 zu generieren verwende ich folgende Kommendozeile:
autopvf <standard.au \
| pvfspeed 2.73 \
| pvfamp 0.2 \
| pvftozyxel4 >standard.msg
autopvf konvertiert dan au-Sound nach pvf. pvfspeed ändert die Samplingrate auf 8000 (22554 / 8000 = 2.73), damit die Geschwindigkeit wieder stimmt.
pvfamp 0.2 senkt den Pegel auf 20%, weil der Sound sonst total verzerrt klingt, schließlich kennt das Telefon nur Frequenzen zwischen 300 und 3000Hz. Zuletzt legt pvftozyxel4 den Sound im richtigen Format ab.
Dadurch, daß weder Rauschen noch Klacken zu hören sind, klingen so generierte Ansagen einfach klasse. Wer etwas mit Sound-Manipulationsprogrammen spielen kann, der kann tolle Effekte generieren, allerdings sollte man damit wegen des beschränten Frequenzbandes echt sparsam umgehen, sonst versteht der Anrufende nichts.
Nachbarbeiteitung von aufgezeichneten Nachrichten ------------------------------------------------- Ich möchte, daß meine Nachrichten in ein auf dem Macintosh abspielbaren Format konvertiert werden und an eine e-mail an mich attached werden sollen. Ich konvertiere den Sound nach au mit folgenden Befehlen:
zyxeltopvf <sound.pvf \
| pvfamp 5
| pvfcut 0.2 0.2 \
| pvftoau 8000 >sound.au
zyxeltopvf konvertiert den aufgezeichneten Sound nach pvf und pvfamp verstärkt diesen auf das fünffache, weil der Pegel (s.ganz.o) sehr schwach ist. pvfcut schneidet 0.2 Sekunden vorne und hinten ab, weil man hinten z.B. das Auflegen des Telefons hört. Scheinbar zeichnet vboxgetty schon auf, während der Beep-Ton abgespielt wird, weil dieser ganz am Anfang zu hören ist. Die 8000 nach dem pvtoau ist sehr wichtig, weil diese sorgt, daß die Frequenz in den au-Header geschrieben wird, damit das abspielende Programm auch die richtige Rate spielt!
Namen des Anrufenden in der Mail
--------------------------------
vboxgetty kennt den Namen des Anrufenden, während es die Nachricht aufzeichnet, dummerweise wird dieser Name nicht an das Programm "-p /usr/local/vbox/new_voice" mit übergeben. Ich habe deswegen einen (very dirty) hack von vboxgetty erzeugt, welches als 4ten Parameter den Namen an new_voice übergibt, damit ist es möglich, daß das Subject der generierten Mail aussieht wie "Voice from Darko Krizic" oder zumindest "Voice from Unknown". Da bei internationalen Calls zumindest die Landeskennung übergeben wird, kann eine Nachricht aus USA ein Subject wie "Voice from USA" haben.
Ich bitte hiermit den Autor von vbox selbst die Änderungen zu machen.
Beispiel für ein new_voice-Script
---------------------------------
Das Nachfolgende Shellscript hat bei mir den Namen /usr/local/vbox/new_voice und in der Inittab hängt noch "-p /usr/local/vbox/new_voice" als Parameter, damit dieses Programm nach dem Aufzeichnen einer Nachricht aufgerufen wird.
Die Datei wird nach .au konvertiert und als MIME-encoded Message an den Benutzer für den die Nachricht aufgezeichnet wurde, geschickt. Ich verwende übrigens mimeencode nicht. Wenn diese Mail von Eudora auf dem Macintosh empfangen wird, wird der Sound als Icon angezeigt. Ein Doppelklick reicht aus, um den Sound abzuspielen.
#! /bin/sh
#
# Creates a new MIME-encoded mail to the user with an attached .au file # Written 1996 by Darko Krizic
PATH="${PATH}:/usr/local/vbox"
TMP="/tmp/vboxmime.$$"
ME="`basename $0`"
mailer="/usr/sbin/sendmail -t"
bound="NewVoice_-${$}${$}"
type="audio/ulaw"
file="${1}"
id="${2}"
user="${3}"
name="${4}"
date="`date +%y%m%d%H%M`"
newname=${date}-${id}.au
if [ -z "$name" ]
then
name=$id
fi
echo "\
Subject: Voice from $name
From: root@xplor.ipf.de (Voice Subsystem) To: $user
Content-type: multipart/mixed; boundary=\"$bound\"
--$bound
Content-Type: text/pain
A new voice has arrived
Sender ID: $id
Name: $name
File: $file
--$bound
Content-Type: application/octet-stream; name=\"$newname\" Content-transfer-encoding: x-uuencode
" >$TMP
/usr/local/bin/zyxeltopvf <$file \
| /usr/local/bin/pvfamp 5 \
| /usr/local/bin/pvfcut 0.2 0.2 \
| /usr/local/bin/pvftoau 8000 \
| /usr/bin/uuencode $newname >>$TMP
#rmdcutheader <$file | uuencode $newname >>$TMP echo "--$bound--" >>$TMP
$mailer -t <$TMP
#cat $TMP
rm $TMP
Anmerkungen: Es handelt sich dabei nur um ein Beispiel, welches ich schnell für mich zusammengehackt habe. Wenn jemand Anmerkugen und Ideen hat, soll ich bei mir melden. Ich erwähne nochmal: Das Script funktioniert zwar auch so, allerdings macht es erst richtig sinn, wenn vboxgetty als 4ten Parameter den Namen des Anrufenden übertragt, sonst ist das Subject immer "Voice from Unkown".
Darko Krizic
----------------------------------------------------------------------- Darko Krizic Phrankphurt Germany mailto:dekay@xplor.ipf.de
--------------------------------------------------- To remove yourself from this mailing list send email to majordomo@hub-wue.franken.de containing "unsubscribe isdn4linux <your_email_address>" in the message body [-vg]

View File

@ -1,276 +1,277 @@
========
Newsgroups: uninews.comp
Subject: Mit Crosspoint an der Uni pollen.
From: mklose@UNI-DUISBURG.DE (Michael Klose)
Date: 28 Jul 1996 23:26:00 +0200
Hallo!
Ich wollte was erklären (siehe Betreff):
Für die Leute, die nicht wissen, was Crosspoint (ab hier mit XP abgekürzt)
ist, hier ein kleiner Ausschnitt aus der Dok:
-------------------------------------------------------------------------
CrossPoint ist eine Multinetz-Pointsoftware. Oder ausführlicher:
CrossPoint ist ein Programm, mit dem Sie auf sehr bequeme Weise
Daten mit Mailboxen austauschen und insbesondere elektronische Post
(E-Mail) versenden, empfangen und verwalten können. Wichtig ist
dabei, daß CrossPoint verschiedene, technische Mailbox-(Netz)-
Standards unterstützt. Dadurch benötigen Sie für verschiedene Netze
nur EIN Programm mit einer einheitlichen Benutzeroberfläche. Wichtig
ist auch, daß CrossPoint nicht nur den kleinsten gemeinsamen Nenner
der verschiedenen Netze bildet, sondern Ihnen zusätzlich ermöglicht,
die Features einzelner Netze voll auszunutzen. Dazu zählen z.B. das
Bestellen von Dateien im FidoNet, Löschnachrichten im Usenet und das
Nachrichtenstatus-System im MausNet.
-------------------------------------------------------------------------
Crosspoint bietet aber leider nur für Usenet eine Möglichkeit per UUCP zu
pollen, nicht mit einer PPP oder SLIP Verbindung.
Es geht aber trotzdem, und zwar mit einem Zusatztool (UKA_PPP), welches
sogar Freeware ist.
Leider funktioniert UKA_PPP nicht richtig unter NT :-(( Windows 95 weiß
ich nicht, ich kann nur sagen, daß es unter DOS und Win 3.11 läuft.
Warum also Crosspoint benutzen?
Crosspoint ist IMHO der beste Maileditor, den es gibt, er ist nicht nr für
e-Mail, sondern auch ein Newsreader. Ich habe bisher noch kein einziges
Programm gesehen, welches solch einen Funktionsumfang hat. Sogar PGP
Unterstützung ist eingebaut, MIME sowieso (obwohl hier eines der wenigen
Schwachstellen in XP liegt, er beherrscht keine Multipart MIME Mails).
Vor allem kann man es für fast alle Netze einsetzten: ich verwende es für
meine beiden Fido Adressen, für meine Internetaccounts und für den T-
Online Zugang meines Vaters.
Wer XP noch nicht hat, kann es sich z.B. bei mvmpc9.ciw.uni-karlsruhe.de
holen zusammen mit UKA_PPP. (Egal ob mit FTP oder WWW).
Benötigt werden folgende Pakete:
XP311-1.EXE
XP311-2.EXE
XP311-U.EXE (so heißt das DIng glaube ich - auf jednen Fall der UUCP Teil)
Wer es noch für FIDO nutzen möchte auch noch:
XP311-F.EXE
Fangen wir an:
Wer XP schon installiert hat für Fido, der braucht nur die UUZ.EXE aus dem
UUCP Paket - eine erneute Registrierung (falls nur für Fido regristriert)
ist nicht erforderlich, so steht es jedenfalls in der DOK von UKA_PPP.
Was ist UKA_PPP?
UKA_PPP ist ein Paket, welches es ermöglicht unter DOS eine PPP/SLIP/CSLIP
Verbindung aufzubauen, und womit man den POP, SMPT und NEWS Server
ansprechen kann. Zusätzlich beigefügt ist ein Telnet und Ftp Client.
BTW: UKA_PPP bekommt man am besten direkt beim Autor: Wieder:
mvmpc9.ciw.uni-karlsruhe.de
Aktuell ist die Version 1.51.
Möchte man, daß sich UKA_PPP ins Verzeichnis \DFUe installiert (Umlaute im
Verzeichnisnamen stören UKA_PPP zwar nicht, aber falls man später PGP
installieren möchte, dann ist es empfehlenswert gleich ein Verzeichnis
ohne Umlaute zu wählen, da PGP diese nicht mag).
Wo waren wir? Verzeichnic anlegen:
md \DFUe
cd \DFUe
[Verzeichnis, wo die UKA_PPP.EXE steht]\UKA_PPP
Jetzt entpackt UKA_PPP alle seine Installationsdateien.
Jetzt die SETUP.BAT laufen lassen.
Es richtet automatisch ein Unterverzeichnis für UKA_PPP ein.
Es erscheint jetzt ein Setup Bildschirm:
Jetzt 'Default' angeben.
Jetzt werden zuerst nach den Schnittstellenparameter gefragt:
Falls das Modem an COM2 hängt, 2F8 angeben, falls an COM1 3F8.
Wenn COM2, dann IRQ3 sonst IRQ4.
Bei der Baudrate 57600 angeben.
Bei der Initstring verwendet man am besten ATZ (ENTER)
Dann verwendet das Modem die gespeicherten Einstellungen.
Jetzt muß man die Anwahlstring des Internetproviders angeben.
Falls Pulswahl ATDP02033789353 btw. Tonwahl: ATDT02033789353
Dann fragt er uns nach dem Protokoll. PPP wählen.
Beim Packettreiberinterrupt, einfach ENTER drücken um die
Defaulteinstellung von 61h zu nehmen.
Jetzt bekommen wir einen neuen Bildschirm. Es steht zwar geschrieben, daß
wir die Infos erst später eingeben müssen, aber wir geben sie jetzt
trotzdem ein.
Dommain Suffix ist bei uns: uni-duisburg.de
IP OF Nameserver ist bei uns: 134.91.3.16
Unser IP ist egal, weil die wegen der PPP Verbindung dynamisch zugewiesen
wird, hier einfach ENTER drücken.
Unsere Gateway ist 134.91.4.1, da wir uns über die 0203/3789353 eingewählt
haben. Irgendwie bekomme ich bei der 0203/378950 keine PPP Verbindung zu
Stande mit UKA_PPP, unter Windows habe ich auch nur diese Nummer
konfiguriert, die andere habe ich noch gar nicht versucht.
Und er soll natürlich den internen Packet Treiber verwenden. :-))
Als nächstes werden die Server für die E-Mail konfiguriert:
POP Srever ist der Rechner, auf dem das Home Verzeichnis liegt, bei mir
e45-hrze.uni-duisburg.de
POP USER ID ist der Loginusername, bei mir sl652kl
POP PASSWORD ist das Passwort, was es bei mir ist, sage ich nicht! :-)
Jetzt fragt er nach dem SMPT Server. Das ist bei uns die unidui.uni-
duisburg.de
Timeserver haben wir nicht, also 0 eingeben. Den Vorgeschlagenen Server
der Uni Karlsruhe können wir nicht benutzen, da wir mit unserer PPP
Verbindung keine Rechner außerhalb der Uni ohne Proxies ansprechen können
:-(((
Time Offset ist -1.
Jetzt wieder Default eingeben (also 3).
News ist als Newsserver OK, also ENTER eingeben.
Nein, jetzt keine Newsgroup abbonnieren.
YARN brauchen wir nicht zu installieren, also n.
Jetzt möchte er eine Probeverbindung aufbauen, um das Login zu 'lernen'. y
für Ja eingeben.
Jetzt baut er eine Verbindung auf. Bei der Frage Host: einfach PPP und
Enter eingeben, eine Sekunde warten, bis komische Zeichen erscheinen
(dürfte dann fat sofort passieren), dann ALT-X drücken.
UKA_PPP meldet sich jetzt akustisch, daß er es geschafft hat eine PPP
Verbindung aufzubauen.
Jetzt solange ENTER drücken, bis wir am Bildschirm sind, wo er wieder
fragt Compuserve, Default oder T-Online steht. Hier natürlich wieder
Default wählen.
Jetzt kommt eine Fehlermeldung, naja, eigentlich nur eine Warnung, daß wir
Online sind, einfach mit ENTER weiter.
Jetzt landen wir im Hauptmenü von UKA_PPP. UKA_PPP ist jetzt fertig
installiert.
Testweise kann man sich eine Telnetverbindung aufbauen zu seinem
Homeverzeichnis.
Auf jeden Fall sollte man nicht vergessen aufzulegen! :-)
Den größten Schritt haben wir jetzt hinter uns. Jetzt muß UKA_PPP nur noch
in Crosspoint eingebunden werden.
Das ist aber gar nicht so schwer.
Unter EDIT/BOXEN eine neue ZCONNECT Box anlegen.
Boxname: UNI-DUISBURG (eigentlich egal)
Username: Der alias oder falls nicht vorhanden, die Benutzerkennung.
(bei mir: mklose)
Kommentar: (beliebig), bei mir Uni-Duisburg Account
MAPS-NAME: Spielt keine Rolle, egal was hier steht.
Realname: Dein ECHTER Name mit Vor und Nachname. Bei mir Michael Klose
Domain: .DE
Jetzt auf den neuen EIntrag gehen, und (E)DIT/(P)oint.
Unter Pointname hier die Benutzerkennung eingeben (bei mir sl652kl). Der
Rest ist egal (einfach so lassen)
Unter (E)dit/(D)iverses unter Eingangsfilter (da steht als Überschrift
Filter dann da drunter Eingang und Ausgang, der Eingangsfilter ist
wichtig) folgendes eintragen:
[UKA_PPP VERZEICHNIS]\x_script.exe xpnews
Das ist bei diesem Bildschirm alles, was eingestellt werden muß.
Jetzt unter /(E)dit/(S)ysopmode folgendes eintragen:
Eingangspuffer: [UKA_PPP Verzeichnis]\INFILE.Z
Ausgangspuffer: [UKA_PPP Verzeichnis]\OUTFILE.Z
Herzlichen Glückwunsch! Crosspoint ist jetzt für den Uni Zugang
eingerichtet! Jetzt kann man ganz normal unter /Netcall/Einzeln pollen!
Newsgroups kann man aber nicht an/abbestellen in Crosspoint. Das An/
Absbestellen von Newsgroups geht über die UKA_PPP Programme SUBSCRIBE und
UNSUBSCRIBE oder so ähnlich. Einfacher ist es ins UKA_PPP Verzeichnis zu
gehen, und die Batchdatei GO aufzurufen:
Jetzt unter:
Setup/Server kann man Unsubscribe oder Subsrcribe wählen.
Dieses macht vor dem ersten poll wenig Sinn, da UKA_PPP sich noch keine
Newsgroupliste geholt hat.
------------- Kleine Anmerkung(en) --------------------------------------
Wundert EUch nicht darüber, daß zuerst die ganzen Newsgroup Messages in
/Junk wandern. Dieses liegt am folgendem:
Wenn eine Mail in *einem* Brett kommt, und dieses Brett noch nicht
existiert, so legt XP das neue Brett an.
Kommen aber nur tausend Crosspostings, weiß XP nicht in welcher Gruppe er
es hinlegen soll, da er keine Lust hat tausend Bretter anzulegen.
Meistens gibt es aber doch ein paar Mails, die nur zu der bestellten
Newsgroup gehören, und dann auch ein Brett angelegt wird.
Falls mehrere der Bretter, wo die Mail cross gepostet ist, in XP angelegt
sind, so ist der Artikel in jeder von diesen zu sehen.
Das nur so als kleien Anmerkung. ich habe auch zuerst gedacht, daß UKA_PPP
Scheiße baut, ist aber nicht so.
BTW: Für XP kann ich noch dringend den Filter Crosssecretary empfehlen.
Ciao!
Michael
Fido: 2:2446/301.7 [PGP KEY per EB]
Internet: mklose@uni-duisburg.de ET 2. Semester
...Diese Zeile ist Werbefrei und Unzensiert!
========
Newsgroups: uninews.comp
Subject: Mit Crosspoint an der Uni pollen.
From: mklose@UNI-DUISBURG.DE (Michael Klose)
Date: 28 Jul 1996 23:26:00 +0200
Hallo!
Ich wollte was erklären (siehe Betreff):
Für die Leute, die nicht wissen, was Crosspoint (ab hier mit XP abgekürzt)
ist, hier ein kleiner Ausschnitt aus der Dok:
-------------------------------------------------------------------------
CrossPoint ist eine Multinetz-Pointsoftware. Oder ausführlicher:
CrossPoint ist ein Programm, mit dem Sie auf sehr bequeme Weise
Daten mit Mailboxen austauschen und insbesondere elektronische Post
(E-Mail) versenden, empfangen und verwalten können. Wichtig ist
dabei, daß CrossPoint verschiedene, technische Mailbox-(Netz)-
Standards unterstützt. Dadurch benötigen Sie für verschiedene Netze
nur EIN Programm mit einer einheitlichen Benutzeroberfläche. Wichtig
ist auch, daß CrossPoint nicht nur den kleinsten gemeinsamen Nenner
der verschiedenen Netze bildet, sondern Ihnen zusätzlich ermöglicht,
die Features einzelner Netze voll auszunutzen. Dazu zählen z.B. das
Bestellen von Dateien im FidoNet, Löschnachrichten im Usenet und das
Nachrichtenstatus-System im MausNet.
-------------------------------------------------------------------------
Crosspoint bietet aber leider nur für Usenet eine Möglichkeit per UUCP zu
pollen, nicht mit einer PPP oder SLIP Verbindung.
Es geht aber trotzdem, und zwar mit einem Zusatztool (UKA_PPP), welches
sogar Freeware ist.
Leider funktioniert UKA_PPP nicht richtig unter NT :-(( Windows 95 weiß
ich nicht, ich kann nur sagen, daß es unter DOS und Win 3.11 läuft.
Warum also Crosspoint benutzen?
Crosspoint ist IMHO der beste Maileditor, den es gibt, er ist nicht nr für
e-Mail, sondern auch ein Newsreader. Ich habe bisher noch kein einziges
Programm gesehen, welches solch einen Funktionsumfang hat. Sogar PGP
Unterstützung ist eingebaut, MIME sowieso (obwohl hier eines der wenigen
Schwachstellen in XP liegt, er beherrscht keine Multipart MIME Mails).
Vor allem kann man es für fast alle Netze einsetzten: ich verwende es für
meine beiden Fido Adressen, für meine Internetaccounts und für den T-
Online Zugang meines Vaters.
Wer XP noch nicht hat, kann es sich z.B. bei mvmpc9.ciw.uni-karlsruhe.de
holen zusammen mit UKA_PPP. (Egal ob mit FTP oder WWW).
Benötigt werden folgende Pakete:
XP311-1.EXE
XP311-2.EXE
XP311-U.EXE (so heißt das DIng glaube ich - auf jednen Fall der UUCP Teil)
Wer es noch für FIDO nutzen möchte auch noch:
XP311-F.EXE
Fangen wir an:
Wer XP schon installiert hat für Fido, der braucht nur die UUZ.EXE aus dem
UUCP Paket - eine erneute Registrierung (falls nur für Fido regristriert)
ist nicht erforderlich, so steht es jedenfalls in der DOK von UKA_PPP.
Was ist UKA_PPP?
UKA_PPP ist ein Paket, welches es ermöglicht unter DOS eine PPP/SLIP/CSLIP
Verbindung aufzubauen, und womit man den POP, SMPT und NEWS Server
ansprechen kann. Zusätzlich beigefügt ist ein Telnet und Ftp Client.
BTW: UKA_PPP bekommt man am besten direkt beim Autor: Wieder:
mvmpc9.ciw.uni-karlsruhe.de
Aktuell ist die Version 1.51.
Möchte man, daß sich UKA_PPP ins Verzeichnis \DFUe installiert (Umlaute im
Verzeichnisnamen stören UKA_PPP zwar nicht, aber falls man später PGP
installieren möchte, dann ist es empfehlenswert gleich ein Verzeichnis
ohne Umlaute zu wählen, da PGP diese nicht mag).
Wo waren wir? Verzeichnic anlegen:
md \DFUe
cd \DFUe
[Verzeichnis, wo die UKA_PPP.EXE steht]\UKA_PPP
Jetzt entpackt UKA_PPP alle seine Installationsdateien.
Jetzt die SETUP.BAT laufen lassen.
Es richtet automatisch ein Unterverzeichnis für UKA_PPP ein.
Es erscheint jetzt ein Setup Bildschirm:
Jetzt 'Default' angeben.
Jetzt werden zuerst nach den Schnittstellenparameter gefragt:
Falls das Modem an COM2 hängt, 2F8 angeben, falls an COM1 3F8.
Wenn COM2, dann IRQ3 sonst IRQ4.
Bei der Baudrate 57600 angeben.
Bei der Initstring verwendet man am besten ATZ (ENTER)
Dann verwendet das Modem die gespeicherten Einstellungen.
Jetzt muß man die Anwahlstring des Internetproviders angeben.
Falls Pulswahl ATDP02033789353 btw. Tonwahl: ATDT02033789353
Dann fragt er uns nach dem Protokoll. PPP wählen.
Beim Packettreiberinterrupt, einfach ENTER drücken um die
Defaulteinstellung von 61h zu nehmen.
Jetzt bekommen wir einen neuen Bildschirm. Es steht zwar geschrieben, daß
wir die Infos erst später eingeben müssen, aber wir geben sie jetzt
trotzdem ein.
Dommain Suffix ist bei uns: uni-duisburg.de
IP OF Nameserver ist bei uns: 134.91.3.16
Unser IP ist egal, weil die wegen der PPP Verbindung dynamisch zugewiesen
wird, hier einfach ENTER drücken.
Unsere Gateway ist 134.91.4.1, da wir uns über die 0203/3789353 eingewählt
haben. Irgendwie bekomme ich bei der 0203/378950 keine PPP Verbindung zu
Stande mit UKA_PPP, unter Windows habe ich auch nur diese Nummer
konfiguriert, die andere habe ich noch gar nicht versucht.
Und er soll natürlich den internen Packet Treiber verwenden. :-))
Als nächstes werden die Server für die E-Mail konfiguriert:
POP Srever ist der Rechner, auf dem das Home Verzeichnis liegt, bei mir
e45-hrze.uni-duisburg.de
POP USER ID ist der Loginusername, bei mir sl652kl
POP PASSWORD ist das Passwort, was es bei mir ist, sage ich nicht! :-)
Jetzt fragt er nach dem SMPT Server. Das ist bei uns die unidui.uni-
duisburg.de
Timeserver haben wir nicht, also 0 eingeben. Den Vorgeschlagenen Server
der Uni Karlsruhe können wir nicht benutzen, da wir mit unserer PPP
Verbindung keine Rechner außerhalb der Uni ohne Proxies ansprechen können
:-(((
Time Offset ist -1.
Jetzt wieder Default eingeben (also 3).
News ist als Newsserver OK, also ENTER eingeben.
Nein, jetzt keine Newsgroup abbonnieren.
YARN brauchen wir nicht zu installieren, also n.
Jetzt möchte er eine Probeverbindung aufbauen, um das Login zu 'lernen'. y
für Ja eingeben.
Jetzt baut er eine Verbindung auf. Bei der Frage Host: einfach PPP und
Enter eingeben, eine Sekunde warten, bis komische Zeichen erscheinen
(dürfte dann fat sofort passieren), dann ALT-X drücken.
UKA_PPP meldet sich jetzt akustisch, daß er es geschafft hat eine PPP
Verbindung aufzubauen.
Jetzt solange ENTER drücken, bis wir am Bildschirm sind, wo er wieder
fragt Compuserve, Default oder T-Online steht. Hier natürlich wieder
Default wählen.
Jetzt kommt eine Fehlermeldung, naja, eigentlich nur eine Warnung, daß wir
Online sind, einfach mit ENTER weiter.
Jetzt landen wir im Hauptmenü von UKA_PPP. UKA_PPP ist jetzt fertig
installiert.
Testweise kann man sich eine Telnetverbindung aufbauen zu seinem
Homeverzeichnis.
Auf jeden Fall sollte man nicht vergessen aufzulegen! :-)
Den größten Schritt haben wir jetzt hinter uns. Jetzt muß UKA_PPP nur noch
in Crosspoint eingebunden werden.
Das ist aber gar nicht so schwer.
Unter EDIT/BOXEN eine neue ZCONNECT Box anlegen.
Boxname: UNI-DUISBURG (eigentlich egal)
Username: Der alias oder falls nicht vorhanden, die Benutzerkennung.
(bei mir: mklose)
Kommentar: (beliebig), bei mir Uni-Duisburg Account
MAPS-NAME: Spielt keine Rolle, egal was hier steht.
Realname: Dein ECHTER Name mit Vor und Nachname. Bei mir Michael Klose
Domain: .DE
Jetzt auf den neuen EIntrag gehen, und (E)DIT/(P)oint.
Unter Pointname hier die Benutzerkennung eingeben (bei mir sl652kl). Der
Rest ist egal (einfach so lassen)
Unter (E)dit/(D)iverses unter Eingangsfilter (da steht als Überschrift
Filter dann da drunter Eingang und Ausgang, der Eingangsfilter ist
wichtig) folgendes eintragen:
[UKA_PPP VERZEICHNIS]\x_script.exe xpnews
Das ist bei diesem Bildschirm alles, was eingestellt werden muß.
Jetzt unter /(E)dit/(S)ysopmode folgendes eintragen:
Eingangspuffer: [UKA_PPP Verzeichnis]\INFILE.Z
Ausgangspuffer: [UKA_PPP Verzeichnis]\OUTFILE.Z
Herzlichen Glückwunsch! Crosspoint ist jetzt für den Uni Zugang
eingerichtet! Jetzt kann man ganz normal unter /Netcall/Einzeln pollen!
Newsgroups kann man aber nicht an/abbestellen in Crosspoint. Das An/
Absbestellen von Newsgroups geht über die UKA_PPP Programme SUBSCRIBE und
UNSUBSCRIBE oder so ähnlich. Einfacher ist es ins UKA_PPP Verzeichnis zu
gehen, und die Batchdatei GO aufzurufen:
Jetzt unter:
Setup/Server kann man Unsubscribe oder Subsrcribe wählen.
Dieses macht vor dem ersten poll wenig Sinn, da UKA_PPP sich noch keine
Newsgroupliste geholt hat.
------------- Kleine Anmerkung(en) --------------------------------------
Wundert EUch nicht darüber, daß zuerst die ganzen Newsgroup Messages in
/Junk wandern. Dieses liegt am folgendem:
Wenn eine Mail in *einem* Brett kommt, und dieses Brett noch nicht
existiert, so legt XP das neue Brett an.
Kommen aber nur tausend Crosspostings, weiß XP nicht in welcher Gruppe er
es hinlegen soll, da er keine Lust hat tausend Bretter anzulegen.
Meistens gibt es aber doch ein paar Mails, die nur zu der bestellten
Newsgroup gehören, und dann auch ein Brett angelegt wird.
Falls mehrere der Bretter, wo die Mail cross gepostet ist, in XP angelegt
sind, so ist der Artikel in jeder von diesen zu sehen.
Das nur so als kleien Anmerkung. ich habe auch zuerst gedacht, daß UKA_PPP
Scheiße baut, ist aber nicht so.
BTW: Für XP kann ich noch dringend den Filter Crosssecretary empfehlen.
Ciao!
Michael
Fido: 2:2446/301.7 [PGP KEY per EB]
Internet: mklose@uni-duisburg.de ET 2. Semester
...Diese Zeile ist Werbefrei und Unzensiert!

3271
FAQ/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1498,12 +1498,12 @@ und wird von ihrem Linuxtreiber sehr gut unterst&uuml;tzt. Sie ist zur
Zeit eine der wenigen ISDN Karten mit denen Du unter ISDN4LINUX Faxe
versenden kannst oder die das CAPI 2.0 Interface unterst&uuml;tzen. Die
neuesten Treiber bekommst Du auf <url
url="ftp://calle.in-berlin.de/pub/capi4linux/">.
<p>
url="ftp://calle.in-berlin.de/pub/capi4linux/">.<BR>
Zum Downloaden der Firmware ben&ouml;tigen Sie die beiden Perl-Scripts von:
<url url="ftp://calle.in-berlin.de/pub/capi4linux/firmware/">.
Diese Scripts bewirken den Download und das Auspacken der Firmware: <url url="ftp://ftp.in-berlin.de/pub/capi4linux/firmware/b1/">.
Diese Scripts bewirken den Download und das Auspacken der Firmware vom AVM
FTP-Server: <url url="ftp://ftp.avm.de/cardware/b1/linux/">.
Zum Gebrauch der AVM an einem Anlagenanschluss musst Du 'DSS1 P2P' zum
Ladebefehl der Firmware hinzuf&uuml;gen:

View File

@ -590,7 +590,7 @@ stuff.
Yes, isdn4linux does support subaddressing (available in France).
To configure it, give HiSax the number in this format:
<tt>&lt;number&gt;.&lt;subaddress&gt;</tt>. However, you may have to order
it separately and pay extra for receiving it (sending is free), depending
it seperately and pay extra for receiving it (sending is free), depeding
on your ISDN provider.
Additionally, please note that if you are connected through a PBX, it will
most likely filter out all the subaddressing stuff.
@ -1453,7 +1453,8 @@ CAPI 2.0 interface. You can get the newest driver from:
<url url="ftp://ftp.in-berlin.de/pub/capi4linux/">.
To get the firmware download the two perl scripts from:
<url url="ftp://ftp.in-berlin.de/pub/capi4linux/firmware/">
They will download and extract the firmware from: <url url="ftp://ftp.in-berlin.de/pub/capi4linux/firmware/b1/3-11-03/">.
They will download and extract the firmware from tar files on the avm
ftp server on: <url url="ftp://ftp.avm.de/cardware/b1/linux/">.
To use the AVM on a point-to-point connection (&dquot;Anlagenanschluss&dquot;)
add &dquot;DSS1 P2P&dquot; to the load command for the firmware, like:
@ -1797,7 +1798,7 @@ modprobe -v hisax protocol=2,2 type=28,28
</code>
<item>Driver ID: the HiSax driver uses 'HiSax' as the default for a driver
id if you have only one card. For more cards you have to set the id
explicitly, e.g. for two cards in the form of
explicitely, e.g. for two cards in the form of
<code>
id="contr0%contr1"
</code>
@ -5061,7 +5062,7 @@ ipppd. Please note these hints from NOTES.IPPPD:
ie: 'callback 0' -> simple callback (info via auth. etc.)
'callback 3,12346' -> us E.164 (tel) number 123456 for callback
'callback 6' is different. This value means, that the whole negotiation
is done with a separate protocol after the authentication phase. Currently
is done with a seperate protocol after the authentification phase. Currently
it's not possible to set any options in this case. The ipppd accepts
everything from the remote side.
</verb>

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
$Id: LEGAL.ipppcomp,v 1.1 1999/11/04 23:12:31 he Exp $
$Id$
In certain countries, distributing or using the software contained
in the 'ipppcomp' directory might conflict with patent law or the

View File

@ -1,11 +1,11 @@
# $Id: Makefile,v 1.65 2008/08/31 11:38:16 keil Exp $
# $Id$
#
# Toplevel Makefile for isdn4k-utils
#
.EXPORT_ALL_VARIABLES:
export I4LVERSION = 3.22
export I4LVERSION = 3.13
all: do-it-all
@ -18,8 +18,8 @@ LIBDIR:=/usr/lib
# Following line is important for lib and isdnlog (sl).
export ROOTDIR=$(shell pwd)
ifeq (scripts/autoconf.mk,$(wildcard scripts/autoconf.mk))
include scripts/autoconf.mk
ifeq (.config,$(wildcard .config))
include .config
do-it-all: subtargets
else
CONFIGURATION = config
@ -50,6 +50,9 @@ endif
ifeq ($(CONFIG_ICNCTRL),y)
SUBDIRS := $(SUBDIRS) icn
endif
ifeq ($(CONFIG_PCBITCTL),y)
SUBDIRS := $(SUBDIRS) pcbit
endif
ifeq ($(CONFIG_HISAXCTRL),y)
SUBDIRS := $(SUBDIRS) hisax
endif
@ -175,8 +178,7 @@ distclean: clean
if [ -f $$i/Makefile ]; then $(MAKE) -i -C $$i distclean; fi; \
done;
-rm -f *~ .config .config.old scripts/autoconf.h .menuconfig \
Makefile.tmp .menuconfig.log scripts/defconfig.old \
scripts/autoconf.mk \
Makefile.tmp .menuconfig.log scripts/defconfig.old
find . -name '.#*' -exec rm -f {} \;
scripts/lxdialog/lxdialog:
@ -185,9 +187,6 @@ scripts/lxdialog/lxdialog:
scripts/autoconf.h: .config
perl scripts/mk_autoconf.pl
scripts/autoconf.mk: .config
perl scripts/mk_autoconf.pl
cfgerror:
@echo ""
@echo "WARNING! Configure in $(ERRDIR) failed, disabling package"
@ -200,22 +199,12 @@ cfgerror:
# - if a Makefile.in exists, make -f Makefile.in config
# - if a Makefile already exists, make config
#
subconfig: scripts/autoconf.h scripts/autoconf.mk
subconfig: scripts/autoconf.h
@echo Selected subdirs: $(BUILD_ONLY) $(SUBDIRS)
@set -e; \
for i in `echo $(BUILD_ONLY) $(SUBDIRS)`; do \
@set -e; for i in `echo $(BUILD_ONLY) $(SUBDIRS)`; do \
if [ -x $$i/configure ] ; then \
/bin/echo -e "\nRunning configure in $$i ...\n"; sleep 1; \
(cd $$i; \
test "$$i" = "eicon" && FIRMWAREDIR_OPT="--with-firmware=$(CONFIG_DATADIR)"; \
./configure $(FIRMWAREDIR_OPT) \
--sbindir=$(CONFIG_SBINDIR) \
--bindir=$(CONFIG_BINDIR) \
--mandir=$(CONFIG_MANDIR) \
--datadir=$(CONFIG_DATADIR) \
--libdir=$(LIBDIR) \
--sysconfdir=$(CONFIG_I4LCONFDIR) \
|| $(MAKE) -C ../ ERRDIR=$$i cfgerror); \
(cd $$i; ./configure --sbindir=$(CONFIG_SBINDIR) --bindir=$(CONFIG_BINDIR) --mandir=$(CONFIG_MANDIR) --datadir=$(CONFIG_DATADIR) --libdir=$(LIBDIR) || $(MAKE) -C ../ ERRDIR=$$i cfgerror); \
elif [ -f $$i/Makefile.in ] ; then \
/bin/echo -e "\nRunning make -f Makefile.in config in $$i ...\n"; sleep 1; \
$(MAKE) -C $$i -f Makefile.in config; \
@ -246,16 +235,18 @@ config: menuconfig
mrproper: distclean
archive: distclean
@(ln -nvfs $(ROOTDIR) ../isdn4k-utils-$(I4LVERSION) ;\
mkdir -p ../distisdn ;\
tar cvhzf ../distisdn/isdn4k-utils-$(I4LVERSION).tar.gz --exclude-vcs ../isdn4k-utils-$(I4LVERSION) ;\
rm ../isdn4k-utils-$(I4LVERSION) )
@(cd .. ;\
ln -nfs isdn4k-utils isdn4k-utils-$(I4LVERSION) ;\
mkdir -p distisdn ;\
tar cvhzf distisdn/isdn4k-utils-$(I4LVERSION).tar.gz isdn4k-utils-$(I4LVERSION) ;\
rm isdn4k-utils-$(I4LVERSION) )
distarch: distclean
(ln -nvfs $(ROOTDIR) ../isdn4k-utils-$(I4LVERSION) ;\
mkdir -p ../distisdn ;\
tar -cvhz -X distexclude -f ../distisdn/isdn4k-utils-$(I4LVERSION).tar.gz \
--exclude-vcs ../isdn4k-utils-$(I4LVERSION) ;\
rm ../isdn4k-utils-$(I4LVERSION) )
(cd .. ;\
ln -nfs isdn4k-utils isdn4k-utils-$(I4LVERSION) ;\
mkdir -p distisdn ;\
tar -cvhz -X isdn4k-utils/distexclude -f distisdn/isdn4k-utils-$(I4LVERSION).tar.gz \
isdn4k-utils-$(I4LVERSION) ;\
rm isdn4k-utils-$(I4LVERSION) )
dist: distarch

1
Mini-FAQ/.cvsignore Normal file
View File

@ -0,0 +1 @@
isdn-faq.html

42
README
View File

@ -1,4 +1,6 @@
#
# $Id$
#
This is the README file for the "isdn4k-utils" package from "The i4l-crew".
This package contains the following stuff:
@ -8,20 +10,13 @@ This package contains the following stuff:
iprofd, daemon for realizing AT&W0 on ttyI's.
icnctrl, setup utility for the icn driver.
hisaxctrl, setup utility for the HiSax driver.
pcbitctl, setup utility for the pcbit driver.
avmcapictrl setup utility for the avmb1 driver.
actctrl setup utility for the act2000 driver.
eiconctrl setup utility for the eicon driver.
divertctrl setup utility for dss1 diversion services
2. Libraries for applications
libcapi20 a modular CAPI20 library which supports modules for different
Controller types such as native CAPI20 kernel drivers and
different remote CAPI versions. A CAPI library module for
mISDNv2 is available in the mISDNuser project.
3. Tools for monitoring activity:
2. Tools for monitoring activity:
imon, a ncurses based utility for monitoring ISDN-activities.
imontty, a tty based utility for monitoring ISDN-activities.
isdnlog, a set of utilities for connection logging.
@ -30,17 +25,14 @@ This package contains the following stuff:
xmonisdn, a utility for monitoring and controlling ISDN-activity.
isdnmon, a Tcl/Tk based utility for monitoring ISDN-activities.
4. Applications:
3. Applications:
vbox, an answering machine/voice mailbox.
ipppd, daemon need for syncPPP and MPP.
5. Miscellaneous:
4. Miscellaneous:
scripts/makedev.sh for creating the ISDN device files under /dev .
6. Documentation:
5. Documentation:
A very detailed FAQ and the generic manpages ttyI.4, isdninfo.4,
isdn_audio.4 and isdn_cause.7.
Manpages for the above utilities:
@ -49,7 +41,6 @@ This package contains the following stuff:
isdnrate.1, rate-files.5, xisdnload.1x and xmonisdn.1x
IMPORTANT:
This will be the last release of isdn4k-utils as is. From now
(February 2000) on, the package will be splitted into the
following packages:
@ -66,30 +57,27 @@ IMPORTANT:
act2000: tools for IBM Active 2000
eicon: tools for Eicon.Diehl *active* cards
icn: tools for ICN 2B and 4B
pcbit: tools for PCBIT-D
loop: tools for the loopback isdn device
These packages will appear on ftp.isdn4linux.de when they are ready.
COPYRIGHT/COPYING:
Unless explicitly stated, all programs in this package can be freely
Until explicitely stated, all programs in this package can be freely
redistributed and/or modified under the terms of the GNU General
Public License as published by the Free Software Foundation; either
version 2, or (at your option) any later version.
(see gpl-2.0.txt)
Some parts (e.g libraries) are covered by the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
(see lgpl-2.1.txt)
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU General Public License for more details. (File: COPYING)
You will find detatils about which license apply in the README files
of the subdirectories.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
System prerequisites:

View File

@ -1,4 +1,4 @@
# $Id: Makefile.in,v 1.5 2002/07/19 19:03:49 keil Exp $
# $Id$
#
# Makefile for actctrl
# (C) 1997 Fritz Elfert
@ -23,9 +23,7 @@ INSTALL_DATA = $(INSTALL) -o 0 -g 0 -m 0644
INSTALL_MAN = $(INSTALL) -o 0 -g 0 -m 0644
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
datadir = @datadir@
CC = @CC@
CC = @CC@
.SUFFIXES:
.SUFFIXES: .c .o

View File

@ -1,6 +1,6 @@
/* API only version generated from kernel drivers/isdn/act2000/act2000.h */
/* $Id: act2000.h,v 1.1 2002/07/19 19:03:49 keil Exp $
/* $Id$
*
* ISDN lowlevel-module for the IBM ISDN-S0 Active 2000.
*

View File

@ -1,4 +1,4 @@
/* $Id: actctrl.c,v 1.4 2007/03/05 18:04:34 keil Exp $
/* $Id$
* IBM Active 2000 ISDN driver for Linux. (Control-Utility)
*
@ -18,10 +18,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: actctrl.c,v $
* Revision 1.4 2007/03/05 18:04:34 keil
* Small fixes to avoid warnings with newer gcc
*
* $Log$
* Revision 1.3 2002/01/31 18:50:51 paul
* #include <stdlib.h> for prototypes against warnings.
*

View File

@ -1,8 +1,12 @@
.\" $Id$
.\"
.\" CHECKIN $Date$
.\"
.\" Process this file with
.\" groff -man -Tascii actctrl.1 for ASCII output, or
.\" groff -man -Tps actctrl.1 for PostScript output
.\"
.TH ACTCTRL 8 "September 1999" isdn4k-utils-@I4LVERSION@ "Linux System Administration"
.TH ACTCTRL 8 "@MANDATE@" isdn4k-utils-@I4LVERSION@ "Linux System Administration"
.SH NAME
actctrl \- configure IBM Active 2000 ISDN adaptor
.SH SYNOPSIS

5437
act2000/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,38 +0,0 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.68])
AC_INIT(actctrl.c)
AC_PREFIX_DEFAULT(/usr)
I4LVERSION=${I4LVERSION:-"?.?"}
CONFIG_DATADIR=${CONFIG_FIRMWAREDIR:-"/usr/lib/isdn"}
CONFIG_MANDIR=${mandir:-"/usr/man"}
CONFIG_SBINDIR=${CONFIG_CARD_SBINDIR:-"/sbin"}
dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_CC
dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h)
dnl Checks for library functions.
AC_FUNC_MMAP
dnl Optional firmware directory
AC_ARG_WITH(firmware,
[ --with-firmware=DIR Set dir where firmware installed. [/usr/lib/isdn]],
AC_DEFINE(CONFIG_DATADIR, "${withval}", [directory where firmware installed]),
)
dnl Define which variables to substitute & which files to generate
AC_SUBST(CONFIG_DATADIR)
AC_SUBST(CONFIG_SBINDIR)
AC_SUBST(CONFIG_MANDIR)
AC_SUBST(I4LVERSION)
AC_OUTPUT(Makefile actctrl.man)

56
act2000/configure.in Normal file
View File

@ -0,0 +1,56 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(actctrl.c)
AC_PREFIX_DEFAULT(/usr)
I4LCONFDIR=${I4LCONFDIR:-"/etc/isdn"}
I4LVERSION=${I4LVERSION:-"?.?"}
CONFIG_DATADIR=${CONFIG_FIRMWAREDIR:-"/usr/lib/isdn"}
CONFIG_MANDIR=`eval echo ${CONFIG_MANDIR:-"/usr/man"}`
CONFIG_SBINDIR=`eval echo ${CONFIG_CARD_SBINDIR:-"/sbin"}`
MANDATE=`grep CHECKIN actctrl.man.in | awk '{print $4}'`
dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_CC
dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MMAP
dnl Optional firmware directory
AC_ARG_WITH(firmware,
[ --with-firmware=DIR Set dir where firmware istalled. [/usr/lib/isdn]],
CONFIG_DATADIR="${withval}"
AC_DEFINE(CONFIG_DATADIR,"${withval}"),
)
dnl Optional sbin directory
AC_ARG_WITH(sbin,
[ --with-sbin=DIR Set dir where binary is istalled. [/sbin]],
CONFIG_SBINDIR="${withval}"
AC_DEFINE(CONFIG_SBINDIR,"${withval}"),
)
dnl Optional man directory
AC_ARG_WITH(man,
[ --with-man=DIR Set manpage dir. [/usr/man]],
CONFIG_MANDIR="${withval}"
AC_DEFINE(CONFIG_MANDIR,"${withval}"),
)
AC_SUBST(INSTALL)
AC_SUBST(MANDATE)
AC_SUBST(CONFIG_DATADIR)
AC_SUBST(CONFIG_SBINDIR)
AC_SUBST(CONFIG_MANDIR)
AC_SUBST(I4LCONFDIR)
AC_SUBST(I4LVERSION)
AC_OUTPUT(Makefile actctrl.man)

View File

@ -1 +0,0 @@
../gpl-2.0.txt

340
ant-phone/COPYING Normal file
View File

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

View File

@ -4,9 +4,9 @@
# the original Makefile, it is called GNUmakefile.
#
ifeq (../scripts/autoconf.mk,$(wildcard ../scripts/autoconf.mk))
include ../scripts/autoconf.mk
DATAOPTS := DATATARGET=$(DESTDIR)$(CONFIG_DATADIR)/areacodes
ifeq (../.config,$(wildcard ../.config))
include ../.config
DATAOPTS := DATATARGET=$(shell echo $(DESTDIR)$(CONFIG_DATADIR))/areacodes
#
# Install as root with numeric Id's, since these are the
# only ones that _really_ exist on _every_ system.
@ -42,4 +42,4 @@ ifeq ($(CONFIG_LIB_AREACODE),y)
endif
uninstall:
rm -f $(DESTDIR)$(CONFIG_DATADIR)/areacodes
rm -f $(shell echo $(DESTDIR)$(CONFIG_DATADIR))/areacodes

View File

@ -11,15 +11,9 @@
# $Id: linux.mak,v 1.2 1998/12/09 19:21:16 akool Exp $
#
# $Log: linux.mak,v $
# Revision 1.2 1998/12/09 19:21:16 akool
# new "Areacode" lib version 2.0
# from Ullrich von Bassewitz (uz@wuschel.musoftware.de)
# now we are supporting .at .ch .de .nl .uk and .us
# ATTENTION: The database-format has changed!
# $Id$
#
# $Log$
# Revision 1.1 1997/03/03 04:21:46 fritz
# Added files in areacode/make
#

View File

@ -14,12 +14,9 @@
# $Id: svr40.mak,v 1.1 1997/03/03 04:21:46 fritz Exp $
#
# $Log: svr40.mak,v $
# Revision 1.1 1997/03/03 04:21:46 fritz
# Added files in areacode/make
# $Id$
#
# $Log$
#
#

View File

@ -11,12 +11,9 @@
# $Id: watcom.mak,v 1.1 1997/03/03 04:21:47 fritz Exp $
#
# $Log: watcom.mak,v $
# Revision 1.1 1997/03/03 04:21:47 fritz
# Added files in areacode/make
# $Id$
#
# $Log$
#
#

6
avmb1/.cvsignore Normal file
View File

@ -0,0 +1,6 @@
config.*
*.o
*.8
avmcapictrl
avmcapictrl.man
Makefile

View File

@ -1,16 +0,0 @@
##
## Makefile.am
##
AUTOMAKE_OPTIONS = foreign
CLEANFILES = *~
MAINTAINERCLEANFILES = configure aclocal.m4 Makefile.in
CFLAGS = -Wall -O2
sbin_PROGRAMS = avmcapictrl
avmcapictrl_SOURCES = avmcapictrl.c
man_MANS = avmcapictrl.8

View File

@ -1,704 +1,68 @@
# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# $Id$
#
# Makefile for avmcapictrl
# (C) 1997 Carsten Paeth
#
#
SHELL = /bin/sh
CFLAGS = -Wall -O2
LDFLAGS = -L../lib @LIBS@
INCLUDES = -I.
PROGRAMS = avmcapictrl
MODULES = avmcapictrl.o
MANPAGES = avmcapictrl.8
SBINDIR = @CONFIG_SBINDIR@
MANDIR = @CONFIG_MANDIR@
MAN8DIR = $(MANDIR)/man8
INSTALL = @INSTALL@
INSTALL_PROGRAM = $(INSTALL) -o 0 -g 0 -m 0750
INSTALL_MAN = $(INSTALL) -o 0 -g 0 -m 0644
prefix = @prefix@
exec_prefix = @exec_prefix@
CC = @CC@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in 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.
%.8: %.man
cp $< $@
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
%.o: %.c Makefile
$(CC) $(CFLAGS) $(INCLUDES) $(DEFS) -c -o $@ $<
@SET_MAKE@
all: $(PROGRAMS) $(MANPAGES)
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
sbin_PROGRAMS = avmcapictrl$(EXEEXT)
subdir = .
DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/avmcapictrl.8.in \
$(top_srcdir)/configure depcomp install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES = avmcapictrl.8
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"
PROGRAMS = $(sbin_PROGRAMS)
am_avmcapictrl_OBJECTS = avmcapictrl.$(OBJEXT)
avmcapictrl_OBJECTS = $(am_avmcapictrl_OBJECTS)
avmcapictrl_LDADD = $(LDADD)
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(avmcapictrl_SOURCES)
DIST_SOURCES = $(avmcapictrl_SOURCES)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
man8dir = $(mandir)/man8
NROFF = nroff
MANS = $(man_MANS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
if test -d "$(distdir)"; then \
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = -Wall -O2
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GREP = @GREP@
I4LVERSION = @I4LVERSION@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign
CLEANFILES = *~
MAINTAINERCLEANFILES = configure aclocal.m4 Makefile.in
avmcapictrl_SOURCES = avmcapictrl.c
man_MANS = avmcapictrl.8
all: all-am
config:
@./configure
.SUFFIXES:
.SUFFIXES: .c .o .obj
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
Makefile: Makefile.in config.status
./config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
config.status: configure
./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
avmcapictrl.8: $(top_builddir)/config.status $(srcdir)/avmcapictrl.8.in
cd $(top_builddir) && $(SHELL) ./config.status $@
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p; \
then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
} \
; done
avmcapictrl: $(MODULES)
$(CC) $(CFLAGS) $? $(LDFLAGS) -o $@
uninstall-sbinPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(sbindir)" && rm -f $$files
install: $(PROGRAMS) $(MANPAGES)
mkdir -p $(DESTDIR)$(SBINDIR)
$(INSTALL_PROGRAM) $(PROGRAMS) $(DESTDIR)$(SBINDIR)
mkdir -p $(DESTDIR)$(MAN8DIR)
$(INSTALL_MAN) $(MANPAGES) $(DESTDIR)$(MAN8DIR)
clean-sbinPROGRAMS:
-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
avmcapictrl$(EXEEXT): $(avmcapictrl_OBJECTS) $(avmcapictrl_DEPENDENCIES) $(EXTRA_avmcapictrl_DEPENDENCIES)
@rm -f avmcapictrl$(EXEEXT)
$(LINK) $(avmcapictrl_OBJECTS) $(avmcapictrl_LDADD) $(LIBS)
install-strip: $(PROGRAMS) $(MANPAGES)
mkdir -p $(DESTDIR)$(SBINDIR)
$(INSTALL_PROGRAM) -s $(PROGRAMS) $(DESTDIR)$(SBINDIR)
mkdir -p $(DESTDIR)$(MAN8DIR)
$(INSTALL_MAN) $(MANPAGES) $(DESTDIR)$(MAN8DIR)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avmcapictrl.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
install-man8: $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
@list=''; test -n "$(man8dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.8[a-z]*$$/p'; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
done | \
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
sed 'N;N;s,\n, ,g' | { \
list=; while read file base inst; do \
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
fi; \
done; \
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
while read files; do \
test -z "$$files" || { \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
done; }
uninstall-man8:
@$(NORMAL_UNINSTALL)
@list=''; test -n "$(man8dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.8[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@list='$(MANS)'; if test -n "$$list"; then \
list=`for p in $$list; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
if test -n "$$list" && \
grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
echo " typically \`make maintainer-clean' will remove them" >&2; \
exit 1; \
else :; fi; \
else :; fi
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
uninstall:
@for i in `echo $(PROGRAMS)` ; do \
rm -f $(DESTDIR)$(SBINDIR)/$$i ; \
done
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__remove_distdir)
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@test -n '$(distuninstallcheck_dir)' || { \
echo 'ERROR: trying to run $@ with an empty' \
'$$(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
$(am__cd) '$(distuninstallcheck_dir)' || { \
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS) $(MANS)
installdirs:
for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
@for i in `echo $(MANPAGES)` ; do \
rm -f $(DESTDIR)$(MAN8DIR)/$$i ; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
clean:
rm -f *.o *~ $(PROGRAMS) *.8
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am
clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-man
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-sbinPROGRAMS
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man: install-man8
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-man uninstall-sbinPROGRAMS
uninstall-man: uninstall-man8
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
clean-generic clean-sbinPROGRAMS ctags dist dist-all \
dist-bzip2 dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ \
dist-xz dist-zip distcheck distclean distclean-compile \
distclean-generic distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-man8 install-pdf install-pdf-am install-ps \
install-ps-am install-sbinPROGRAMS install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-man uninstall-man8 \
uninstall-sbinPROGRAMS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
distclean: clean
rm -f config.status config.cache config.log confdefs.h Makefile *.man

971
avmb1/aclocal.m4 vendored
View File

@ -1,971 +0,0 @@
# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
# Inc.
# 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.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
[m4_warning([this file was generated for autoconf 2.68.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
# Foundation, Inc.
#
# 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 1
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.11'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.11.3], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
# _AM_AUTOCONF_VERSION(VERSION)
# -----------------------------
# aclocal traces this macro to find the Autoconf version.
# This is a private macro too. Using m4_define simplifies
# the logic in aclocal, which can simply ignore this definition.
m4_define([_AM_AUTOCONF_VERSION], [])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.11.3])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
#
# 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 1
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
#
# Of course, Automake must honor this variable whenever it calls a
# tool from the auxiliary directory. The problem is that $srcdir (and
# therefore $ac_aux_dir as well) can be either absolute or relative,
# depending on how configure is run. This is pretty annoying, since
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
# source directory, any form will work fine, but in subdirectories a
# relative path needs to be adjusted first.
#
# $ac_aux_dir/missing
# fails when called from a subdirectory if $ac_aux_dir is relative
# $top_srcdir/$ac_aux_dir/missing
# fails if $ac_aux_dir is absolute,
# fails when called from a subdirectory in a VPATH build with
# a relative $ac_aux_dir
#
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
# are both prefixed by $srcdir. In an in-source build this is usually
# harmless because $srcdir is `.', but things will broke when you
# start a VPATH build or use an absolute $srcdir.
#
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
# and then we would define $MISSING as
# MISSING="\${SHELL} $am_aux_dir/missing"
# This will work as long as MISSING is not called from configure, because
# unfortunately $(top_srcdir) has no meaning in configure.
# However there are other variables, like CC, which are often used in
# configure, and could therefore not use this "fixed" $ac_aux_dir.
#
# Another solution, used here, is to always expand $ac_aux_dir to an
# absolute PATH. The drawback is that using absolute paths prevent a
# configured tree to be moved without reconfiguration.
AC_DEFUN([AM_AUX_DIR_EXPAND],
[dnl Rely on autoconf to set up CDPATH properly.
AC_PREREQ([2.50])dnl
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
])
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
# Free Software Foundation, Inc.
#
# 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 9
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
[AC_PREREQ(2.52)dnl
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])dnl
AC_SUBST([$1_FALSE])dnl
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
m4_define([_AM_COND_VALUE_$1], [$2])dnl
if $2; then
$1_TRUE=
$1_FALSE='#'
else
$1_TRUE='#'
$1_FALSE=
fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
AC_MSG_ERROR([[conditional "$1" was never defined.
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
# 2010, 2011 Free Software Foundation, Inc.
#
# 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 12
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
# _AM_DEPENDENCIES(NAME)
# ----------------------
# See how the compiler implements dependency checking.
# NAME is "CC", "CXX", "GCJ", or "OBJC".
# We try a few techniques and use that to set a single cache variable.
#
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
# dependency, and given that the user is not expected to run this macro,
# just rely on AC_PROG_CC.
AC_DEFUN([_AM_DEPENDENCIES],
[AC_REQUIRE([AM_SET_DEPDIR])dnl
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
[$1], CXX, [depcc="$CXX" am_compiler_list=],
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
[$1], UPC, [depcc="$UPC" am_compiler_list=],
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
[depcc="$$1" am_compiler_list=])
AC_CACHE_CHECK([dependency style of $depcc],
[am_cv_$1_dependencies_compiler_type],
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
# We will build objects and dependencies in a subdirectory because
# it helps to detect inapplicable dependency modes. For instance
# both Tru64's cc and ICC support -MD to output dependencies as a
# side effect of compilation, but ICC will put the dependencies in
# the current directory while Tru64 will put them in the object
# directory.
mkdir sub
am_cv_$1_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
am__universal=false
m4_case([$1], [CC],
[case " $depcc " in #(
*\ -arch\ *\ -arch\ *) am__universal=true ;;
esac],
[CXX],
[case " $depcc " in #(
*\ -arch\ *\ -arch\ *) am__universal=true ;;
esac])
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
# we should not choose a depcomp mode which is confused by this.
#
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
# Solaris 8's {/usr,}/bin/sh.
touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this. Also, some Intel
# versions had trouble with output in subdirs
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
gcc)
# This depmode causes a compiler race in universal mode.
test "$am__universal" = false || continue
;;
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
am__minus_obj=
;;
none) break ;;
esac
if depmode=$depmode \
source=sub/conftest.c object=$am__obj \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_$1_dependencies_compiler_type=$depmode
break
fi
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_$1_dependencies_compiler_type=none
fi
])
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
AM_CONDITIONAL([am__fastdep$1], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
])
# AM_SET_DEPDIR
# -------------
# Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
AC_DEFUN([AM_SET_DEPDIR],
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
])
# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
[AC_ARG_ENABLE(dependency-tracking,
[ --disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
am__nodep='_no'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])dnl
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
AC_SUBST([am__nodep])dnl
_AM_SUBST_NOTMAKE([am__nodep])dnl
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
#
# 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
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[{
# Autoconf 2.62 quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
*\'*) eval set x "$CONFIG_FILES" ;;
*) set x $CONFIG_FILES ;;
esac
shift
for mf
do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
# We used to match only the files named `Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
# from the Makefile without running `make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n 's/^U = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
AS_MKDIR_P([$dirpart/$fdir])
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
}
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
# AM_OUTPUT_DEPENDENCY_COMMANDS
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
# This code is only required when automatic dependency tracking
# is enabled. FIXME. This creates each `.P' file that we will
# need in order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
#
# 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 16
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
# The call with PACKAGE and VERSION arguments is the old style
# call (pre autoconf-2.50), which is being phased out. PACKAGE
# and VERSION should now be passed to AC_INIT and removed from
# the call to AM_INIT_AUTOMAKE.
# We support both call styles for the transition. After
# the next Automake release, Autoconf can make the AC_INIT
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.62])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
if test "`cd $srcdir && pwd`" != "`pwd`"; then
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
# is not polluted with repeated "-I."
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
# test to see if srcdir already configured
if test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
fi
# test whether we have cygpath
if test -z "$CYGPATH_W"; then
if (cygpath --version) >/dev/null 2>/dev/null; then
CYGPATH_W='cygpath -w'
else
CYGPATH_W=echo
fi
fi
AC_SUBST([CYGPATH_W])
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
AM_MISSING_PROG(AUTOCONF, autoconf)
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo)
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
[_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES(CC)],
[define([AC_PROG_CC],
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[_AM_DEPENDENCIES(CXX)],
[define([AC_PROG_CXX],
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
[_AM_DEPENDENCIES(OBJC)],
[define([AC_PROG_OBJC],
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
])
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
])
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
# loop where config.status creates the headers, so we can generate
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
_am_arg=$1
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
$_am_arg | $_am_arg:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
# Inc.
#
# 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 1
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
if test x"${install_sh}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
*)
install_sh="\${SHELL} $am_aux_dir/install-sh"
esac
fi
AC_SUBST(install_sh)])
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
#
# 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 2
# Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't.
AC_DEFUN([AM_SET_LEADING_DOT],
[rm -rf .tst 2>/dev/null
mkdir .tst 2>/dev/null
if test -d .tst; then
am__leading_dot=.
else
am__leading_dot=_
fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
#
# 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
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
am__doit:
@echo this is the am__doit target
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#"
am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# Ignore all kinds of additional output from `make'.
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=include
am__quote=
_am_result=GNU
;;
esac
# Now try BSD make style include.
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=.include
am__quote="\""
_am_result=BSD
;;
esac
fi
AC_SUBST([am__include])
AC_SUBST([am__quote])
AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
#
# 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
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
[AC_REQUIRE([AM_MISSING_HAS_RUN])
$1=${$1-"${am_missing_run}$2"}
AC_SUBST($1)])
# AM_MISSING_HAS_RUN
# ------------------
# Define MISSING if not defined so far and test if it supports --run.
# If it does, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl
if test x"${MISSING+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
*)
MISSING="\${SHELL} $am_aux_dir/missing" ;;
esac
fi
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
AC_MSG_WARN([`missing' script is too old or missing])
fi
])
# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
# Inc.
#
# 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 1
# AM_PROG_MKDIR_P
# ---------------
# Check for `mkdir -p'.
AC_DEFUN([AM_PROG_MKDIR_P],
[AC_PREREQ([2.60])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
dnl while keeping a definition of mkdir_p for backward compatibility.
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
dnl Makefile.ins that do not define MKDIR_P, so we do our own
dnl adjustment using top_builddir (which is defined more often than
dnl MKDIR_P).
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
case $mkdir_p in
[[\\/$]]* | ?:[[\\/]]*) ;;
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
esac
])
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
# Foundation, Inc.
#
# 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
# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
# --------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
# _AM_SET_OPTIONS(OPTIONS)
# ------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
# -------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
# Free Software Foundation, Inc.
#
# 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
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
echo timestamp > conftest.file
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
'
case `pwd` in
*[[\\\"\#\$\&\'\`$am_lf]]*)
AC_MSG_ERROR([unsafe absolute working directory name]);;
esac
case $srcdir in
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
esac
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
if test "$[*]" = "X"; then
# -L didn't work.
set X `ls -t "$srcdir/configure" conftest.file`
fi
rm -f conftest.file
if test "$[*]" != "X $srcdir/configure conftest.file" \
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
alias in your environment])
fi
test "$[2]" = conftest.file
)
then
# Ok.
:
else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
AC_MSG_RESULT(yes)])
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
#
# 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 1
# AM_PROG_INSTALL_STRIP
# ---------------------
# One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
# is unlikely to handle the host's binaries.
# Fortunately install-sh will honor a STRIPPROG variable, so we
# always use install-sh in `make install-strip', and initialize
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
# Installed binaries are usually stripped using `strip' when the user
# run `make install-strip'. However `strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the `STRIP' environment variable to overrule this program.
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
#
# 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 3
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
# This macro is traced by Automake.
AC_DEFUN([_AM_SUBST_NOTMAKE])
# AM_SUBST_NOTMAKE(VARIABLE)
# --------------------------
# Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
#
# 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 2
# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
# FORMAT should be one of `v7', `ustar', or `pax'.
#
# Substitute a variable $(am__tar) that is a command
# writing to stdout a FORMAT-tarball containing the directory
# $tardir.
# tardir=directory && $(am__tar) > result.tar
#
# Substitute a variable $(am__untar) that extract such
# a tarball read from stdin.
# $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR],
[# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AC_SUBST([AMTAR], ['$${TAR-tar}'])
m4_if([$1], [v7],
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
# Loop over all known methods to create a tar archive until one works.
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
# Do not fold the above two line into one, because Tru64 sh and
# Solaris sh will not grok spaces in the rhs of `-'.
for _am_tool in $_am_tools
do
case $_am_tool in
gnutar)
for _am_tar in tar gnutar gtar;
do
AM_RUN_LOG([$_am_tar --version]) && break
done
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
am__untar="$_am_tar -xf -"
;;
plaintar)
# Must skip GNU tar: if it does not support --format= it doesn't create
# ustar tarball either.
(tar --version) >/dev/null 2>&1 && continue
am__tar='tar chf - "$$tardir"'
am__tar_='tar chf - "$tardir"'
am__untar='tar xf -'
;;
pax)
am__tar='pax -L -x $1 -w "$$tardir"'
am__tar_='pax -L -x $1 -w "$tardir"'
am__untar='pax -r'
;;
cpio)
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
am__untar='cpio -i -H $1 -d'
;;
none)
am__tar=false
am__tar_=false
am__untar=false
;;
esac
# If the value was cached, stop now. We just wanted to have am__tar
# and am__untar set.
test -n "${am_cv_prog_tar_$1}" && break
# tar/untar a dummy directory, and stop if the command works
rm -rf conftest.dir
mkdir conftest.dir
echo GrepMe > conftest.dir/file
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
rm -rf conftest.dir
if test -s conftest.tar; then
AM_RUN_LOG([$am__untar <conftest.tar])
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
fi
done
rm -rf conftest.dir
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR

View File

@ -1,14 +1,11 @@
/*
* $Id: avmcapictrl.c,v 1.17 2004/01/16 15:27:13 calle Exp $
* $Id$
*
* AVM-B1-ISDN driver for Linux. (Control-Utility)
*
* Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: avmcapictrl.c,v $
* Revision 1.17 2004/01/16 15:27:13 calle
* remove several warnings.
*
* $Log$
* Revision 1.16 2001/03/01 14:59:11 paul
* Various patches to fix errors when using the newest glibc,
* replaced use of insecure tempnam() function

View File

@ -1,4 +1,8 @@
.TH AVMCAPICTRL 8 "January 2000" isdn4k-utils-@I4LVERSION@ "Linux System Administration"
.\" $Id$
.\"
.\" CHECKIN $Date$
.\"
.TH AVMCAPICTRL 8 "@MANDATE@" isdn4k-utils-@I4LVERSION@ "Linux System Administration"
.UC 4
.SH NAME
avmcapictrl \- Add, reset or remove active AVM cards and load firmware
@ -18,20 +22,20 @@ avmcapictrl trace [contrnr] [off|short|on|full|shortnodata|nodata]
avmcapictrl addcard <driver> <portbase> <irq> [ <membase> [ <cardnr> ] ]
.SH DESCRIPTION
.I avmcapictrl
is used to register active AVM ISA cards to the kernelcapi system and
therewith to the ISDN system. You need it also to upload the
firmware to any active AVM card. If an error occurs please also
check the kernel error messages using the command dmesg(8).
is used to register active AVM ISA cards kernelcapi system and
therewith to the isdn system. You need it also to upload the
firmware to any active AVM card. If an error occure please also
check the kernel error messages by using the command dmesg(8).
.LP
.SH COMMANDS
.TP 5
.B add <portbase> <irq> <type>
is used to add an ISA card to the kernel-capi2.0 system.
is used to add a ISA card to the kernel-capi2.0 system.
The
.I portbase
can have the values 0x150, 0x250, 0x300 and 0x340 for
the B1 ISA cards, look at the jumper on the card.
For a T1-ISA (HEMA) card you can select a wide range
For a T1-ISA (HEMA) card you can select an wide range
of ports.
.br
.I irq
@ -48,10 +52,10 @@ can be B1 or T1.
is used to load the firmware to a card
.I bootcode
is a t4-file. The actual versions of the t4-files for the different
D channel protocols can be found at
ftp://ftp.in-berlin.de/pub/capi4linux/firmware/b1/
d-channel protocols can be found at
ftp://ftp.avm.de/cardware/b1/linux/firmware.
.br
You need different t4-files for different D channel protocols:
You need different t4-files for different d channel protocols:
b1-1tr6.t4 for 1TR6, b1.t4 for DSS1 and
.br
b1-usa.t4 for 5ESS and NI1 (DSS1 is also supported).
@ -74,15 +78,15 @@ is for the american protocols 5ESS and NI1.
.TP 5
.B reset [contrnr]
is used to reset a card if loading has failed.
This function only makes sense if a card is not successfully loaded.
This function only make sence if card is not successfully loaded.
.br
.I contrnr
is the number of the controller (card) starting from 1.
.LP
.TP 5
.B remove [contrnr]
is used to remove a card previously added. You can also remove
cards added automatically (for example a B1-PCI card).
is used to remove a card previous added. You can also remove
automatic added cards (for example a B1-PCI card).
.br
.I contrnr
is the number of the controller (card) starting from 1.
@ -96,16 +100,16 @@ as kernel messages, see dmesg(8).
is the number of the controller (card) starting from 1.
.br
.I off
switch off tracing
switch traceing off
.br
.I short
switch on "one line per CAPI2.0 message" tracing
switch one line per CAPI2.0 message tracing on
.br
.I on | full
switch on "full decode" tracing
switch on full decode tracing
.br
.I shortnodata
switch on "one line per CAPI2.0 message" tracing, but exclude
switch on line per CAPI2.0 message tracing on, but exclude
DATA_B3_IND and DATA_B3_REQ messages.
.br
.I on | full
@ -134,7 +138,7 @@ can be selected from the following values:
memory address if needed by driver
.br
.I cardnr
only useful with driver t1isa
only usefull with driver t1isa
.SH AUTHOR
Carsten Paeth <calle@calle.in-berlin.de>

6071
avmb1/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +0,0 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.68])
AC_INIT([avmcapictrl],[1.17])
AM_INIT_AUTOMAKE
AC_PREFIX_DEFAULT([/usr])
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
I4LVERSION=${I4LVERSION:-"?.?"}
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h)
dnl Checks for library functions.
AC_CHECK_FUNCS(mmap)
dnl Define which variables to substitute & which files to generate
AC_SUBST(I4LVERSION)
AC_OUTPUT(Makefile avmcapictrl.8)

55
avmb1/configure.in Normal file
View File

@ -0,0 +1,55 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(avmcapictrl.c)
AC_PREFIX_DEFAULT(/usr)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
I4LCONFDIR=${I4LCONFDIR:-"/etc/isdn"}
I4LVERSION=${I4LVERSION:-"?.?"}
CONFIG_DATADIR=${CONFIG_FIRMWAREDIR:-"/usr/lib/isdn"}
CONFIG_MANDIR=`eval echo ${CONFIG_MANDIR:-"/usr/man"}`
CONFIG_SBINDIR=`eval echo ${CONFIG_CARD_SBINDIR:-"/sbin"}`
MANDATE=`grep CHECKIN avmcapictrl.man.in | awk '{print $4}'`
dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_CHECK_FUNCS(mmap)
dnl Optional firmware directory
AC_ARG_WITH(firmware,
[ --with-firmware=DIR Set dir where firmware istalled. [/usr/lib/isdn]],
CONFIG_DATADIR="${withval}"
AC_DEFINE(CONFIG_DATADIR,"${withval}"),
)
dnl Optional sbin directory
AC_ARG_WITH(sbin,
[ --with-sbin=DIR Set dir where binary is istalled. [/sbin]],
CONFIG_SBINDIR="${withval}"
AC_DEFINE(CONFIG_SBINDIR,"${withval}"),
)
dnl Optional man directory
AC_ARG_WITH(man,
[ --with-man=DIR Set manpage dir. [/usr/man]],
CONFIG_MANDIR="${withval}"
AC_DEFINE(CONFIG_MANDIR,"${withval}"),
)
AC_SUBST(INSTALL)
AC_SUBST(MANDATE)
AC_SUBST(I4LVERSION)
AC_SUBST(CONFIG_SBINDIR)
AC_SUBST(CONFIG_DATADIR)
AC_SUBST(CONFIG_MANDIR)
AC_OUTPUT(Makefile avmcapictrl.man)

View File

@ -1,688 +0,0 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2011-12-04.11; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
# 2011 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputting dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvisualcpp
fi
if test "$depmode" = msvc7msys; then
# This is just like msvc7 but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvc7
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well. hp depmode also adds that space, but also prefixes the VPATH
## to the object. Take care to not repeat it in the output.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> "$depfile"
echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
sed -ne '2,${
s/^ *//
s/ \\*$//
s/$/:/
p
}' "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
# static library. This mechanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
tmpdepfile2=$dir$base.o.d # libtool 1.5
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.o.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
tmpdepfile4=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
msvc7)
if test "$libtool" = yes; then
showIncludes=-Wc,-showIncludes
else
showIncludes=-showIncludes
fi
"$@" $showIncludes > "$tmpdepfile"
stat=$?
grep -v '^Note: including file: ' "$tmpdepfile"
if test "$stat" = 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
# The first sed program below extracts the file names and escapes
# backslashes for cygpath. The second sed program outputs the file
# name when reading, but also accumulates all include files in the
# hold buffer in order to output them again at the end. This only
# works with sed implementations that can handle large buffers.
sed < "$tmpdepfile" -n '
/^Note: including file: *\(.*\)/ {
s//\1/
s/\\/\\\\/g
p
}' | $cygpath_u | sort -u | sed -n '
s/ /\\ /g
s/\(.*\)/ \1 \\/p
s/.\(.*\) \\/\1:/
H
$ {
s/.*/ /
G
p
}' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvc7msys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no eat=no
for arg
do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
if test $eat = yes; then
eat=no
continue
fi
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-arch)
eat=yes ;;
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix=`echo "$object" | sed 's/^.*\././'`
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
# makedepend may prepend the VPATH from the source file name to the object.
# No need to regex-escape $object, excess matching of '.' is harmless.
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
IFS=" "
for arg
do
case "$arg" in
-o)
shift
;;
$object)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E 2>/dev/null |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvcmsys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# 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:

View File

@ -1,527 +1,2 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2011-01-19.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
# Protect names problematic for `test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
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
# Protect names problematic for `test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
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
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 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 problematic for `test' and other utilities.
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
# 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 X"$d" = X && 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:
exit 0

View File

@ -1,331 +0,0 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2012-01-06.13; # UTC
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
msg="missing on your system"
case $1 in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
\`g' are ignored when checking the name.
Send bug reports to <bug-automake@gnu.org>."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
esac
# normalize program name to check for.
program=`echo "$1" | sed '
s/^gnu-//; t
s/^gnu//; t
s/^g//; t'`
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program). This is about non-GNU programs, so use $1 not
# $program.
case $1 in
lex*|yacc*)
# Not GNU programs, they don't have --version.
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case $program in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case $f in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te*)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison*|yacc*)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if test $# -ne 1; then
eval LASTARG=\${$#}
case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if test ! -f y.tab.h; then
echo >y.tab.h
fi
if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex*|flex*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if test $# -ne 1; then
eval LASTARG=\${$#}
case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit $?
fi
;;
makeinfo*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '
/^@setfilename/{
s/.* \([^ ]*\) *$/\1/
p
q
}' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
# If the file does not exist, the user really needs makeinfo;
# let's fail without touching anything.
test -f $file || exit 1
touch $file
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0
# 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:

341
capi20.new/LICENSE Normal file
View File

@ -0,0 +1,341 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

43
capi20.new/Makefile.am Normal file
View File

@ -0,0 +1,43 @@
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = no-dependencies foreign
CLEANFILES = *~ comperr
DISTCLEANFILES = intltool-extract intltool-merge intltool-update
MAINTAINERCLEANFILES = configure aclocal.m4 Makefile.in config.h.in
stamp-h.in
include_HEADERS = capi20.h capiutils.h capicmd.h
lib_LTLIBRARIES = libcapi20.la
lib_LIBRARIES = libcapi20dyn.a
libcapi20_la_SOURCES = capi20.c capifunc.c convert.c
libcapi20_la_LDFLAGS = -version-info ${LIBCAPI_VERSION}:${LIBCAPI_VERSION_RELEASE}:${LIBCAPI_VERSION_AGE} -lc -ldl -rdynamic
libcapi20_la_CFLAGS = -fno-strict-aliasing -DLIBDIR=\"$(libdir)/capi\"
modulesdir = $(libdir)/capi
modules_LTLIBRARIES = lib_capi_mod_std.la lib_capi_mod_fritzbox.la lib_capi_mod_rcapi.la
lib_capi_mod_std_la_SOURCES = capi_mod_std.c
lib_capi_mod_std_la_CFLAGS = -fno-strict-aliasing
lib_capi_mod_std_la_LDFLAGS = -shared
lib_capi_mod_fritzbox_la_SOURCES = capi_mod_fritzbox.c
lib_capi_mod_fritzbox_la_CFLAGS = -fno-strict-aliasing
lib_capi_mod_fritzbox_la_LDFLAGS = -shared
lib_capi_mod_rcapi_la_SOURCES = capi_mod_rcapi.c
lib_capi_mod_rcapi_la_CFLAGS = -fno-strict-aliasing
lib_capi_mod_rcapi_la_LDFLAGS = -shared
libcapi20dyn_a_SOURCES = capidyn.c
libcapi20dyn_a_CFLAGS = -fPIC
# libcapi20_la_LIBADD = $(LIBADD_DL)
pcdir = ${libdir}/pkgconfig
pc_DATA = capi20.pc
$(OBJECTS): libtool
export SED
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.8.3 from Makefile.am.
# Makefile.in generated by automake 1.10.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in 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.
@ -16,15 +16,11 @@
SOURCES = $(libcapi20dyn_a_SOURCES) $(libcapi20_la_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
@ -37,47 +33,93 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(am__configure_deps) $(include_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/configure compile config.guess config.sub \
install-sh ltmain.sh missing mkinstalldirs
subdir = .
DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/capi20.pc.in $(top_srcdir)/configure config.guess \
config.sub install-sh ltmain.sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
ARFLAGS = cru
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES = capi20.pc
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libdir)" \
"$(DESTDIR)$(modulesdir)" "$(DESTDIR)$(pcdir)" \
"$(DESTDIR)$(includedir)"
libLIBRARIES_INSTALL = $(INSTALL_DATA)
LIBRARIES = $(lib_LIBRARIES)
ARFLAGS = cru
libcapi20dyn_a_AR = $(AR) $(ARFLAGS)
libcapi20dyn_a_LIBADD =
am_libcapi20dyn_a_OBJECTS = libcapi20dyn_a-capidyn.$(OBJEXT)
libcapi20dyn_a_OBJECTS = $(am_libcapi20dyn_a_OBJECTS)
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
modulesLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES) $(modules_LTLIBRARIES)
lib_capi_mod_fritzbox_la_LIBADD =
am_lib_capi_mod_fritzbox_la_OBJECTS = \
lib_capi_mod_fritzbox_la-capi_mod_fritzbox.lo
lib_capi_mod_fritzbox_la_OBJECTS = \
$(am_lib_capi_mod_fritzbox_la_OBJECTS)
lib_capi_mod_fritzbox_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(lib_capi_mod_fritzbox_la_CFLAGS) $(CFLAGS) \
$(lib_capi_mod_fritzbox_la_LDFLAGS) $(LDFLAGS) -o $@
lib_capi_mod_rcapi_la_LIBADD =
am_lib_capi_mod_rcapi_la_OBJECTS = \
lib_capi_mod_rcapi_la-capi_mod_rcapi.lo
lib_capi_mod_rcapi_la_OBJECTS = $(am_lib_capi_mod_rcapi_la_OBJECTS)
lib_capi_mod_rcapi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(lib_capi_mod_rcapi_la_CFLAGS) $(CFLAGS) \
$(lib_capi_mod_rcapi_la_LDFLAGS) $(LDFLAGS) -o $@
lib_capi_mod_std_la_LIBADD =
am_lib_capi_mod_std_la_OBJECTS = lib_capi_mod_std_la-capi_mod_std.lo
lib_capi_mod_std_la_OBJECTS = $(am_lib_capi_mod_std_la_OBJECTS)
lib_capi_mod_std_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(lib_capi_mod_std_la_CFLAGS) $(CFLAGS) \
$(lib_capi_mod_std_la_LDFLAGS) $(LDFLAGS) -o $@
libcapi20_la_LIBADD =
am_libcapi20_la_OBJECTS = libcapi20_la-capi20.lo \
libcapi20_la-capifunc.lo libcapi20_la-convert.lo
libcapi20_la_OBJECTS = $(am_libcapi20_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir)
libcapi20_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libcapi20_la_CFLAGS) \
$(CFLAGS) $(libcapi20_la_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp =
am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(libcapi20dyn_a_SOURCES) $(libcapi20_la_SOURCES)
DIST_SOURCES = $(libcapi20dyn_a_SOURCES) $(libcapi20_la_SOURCES)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(libcapi20dyn_a_SOURCES) \
$(lib_capi_mod_fritzbox_la_SOURCES) \
$(lib_capi_mod_rcapi_la_SOURCES) \
$(lib_capi_mod_std_la_SOURCES) $(libcapi20_la_SOURCES)
DIST_SOURCES = $(libcapi20dyn_a_SOURCES) \
$(lib_capi_mod_fritzbox_la_SOURCES) \
$(lib_capi_mod_rcapi_la_SOURCES) \
$(lib_capi_mod_std_la_SOURCES) $(libcapi20_la_SOURCES)
pcDATA_INSTALL = $(INSTALL_DATA)
DATA = $(pc_DATA)
includeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(include_HEADERS)
ETAGS = etags
@ -93,10 +135,7 @@ DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
INSTALL = @INSTALL@
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@ -108,25 +147,24 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
FGREP = @FGREP@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBCAPI_VERSION = @LIBCAPI_VERSION@
LIBCAPI_VERSION_AGE = @LIBCAPI_VERSION_AGE@
@ -135,10 +173,17 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@ -152,58 +197,84 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = no-dependencies foreign
CLEANFILES = *~ comperr
DISTCLEANFILES = intltool-extract intltool-merge intltool-update
MAINTAINERCLEANFILES = configure aclocal.m4 Makefile.in config.h.in
include_HEADERS = capi20.h capiutils.h capicmd.h
lib_LTLIBRARIES = libcapi20.la
lib_LIBRARIES = libcapi20dyn.a
libcapi20_la_SOURCES = capi20.c capifunc.c convert.c
libcapi20_la_LDFLAGS = -version-info ${LIBCAPI_VERSION}:${LIBCAPI_VERSION_RELEASE}:${LIBCAPI_VERSION_AGE}
libcapi20_la_CFLAGS = -fno-strict-aliasing
libcapi20_la_LDFLAGS = -version-info ${LIBCAPI_VERSION}:${LIBCAPI_VERSION_RELEASE}:${LIBCAPI_VERSION_AGE} -lc -ldl -rdynamic
libcapi20_la_CFLAGS = -fno-strict-aliasing -DLIBDIR=\"$(libdir)/capi\"
modulesdir = $(libdir)/capi
modules_LTLIBRARIES = lib_capi_mod_std.la lib_capi_mod_fritzbox.la lib_capi_mod_rcapi.la
lib_capi_mod_std_la_SOURCES = capi_mod_std.c
lib_capi_mod_std_la_CFLAGS = -fno-strict-aliasing
lib_capi_mod_std_la_LDFLAGS = -shared
lib_capi_mod_fritzbox_la_SOURCES = capi_mod_fritzbox.c
lib_capi_mod_fritzbox_la_CFLAGS = -fno-strict-aliasing
lib_capi_mod_fritzbox_la_LDFLAGS = -shared
lib_capi_mod_rcapi_la_SOURCES = capi_mod_rcapi.c
lib_capi_mod_rcapi_la_CFLAGS = -fno-strict-aliasing
lib_capi_mod_rcapi_la_LDFLAGS = -shared
libcapi20dyn_a_SOURCES = capidyn.c
libcapi20dyn_a_CFLAGS = -fPIC
# libcapi20_la_LIBADD = $(LIBADD_DL)
pcdir = ${libdir}/pkgconfig
pc_DATA = capi20.pc
all: all-am
.SUFFIXES:
@ -241,12 +312,14 @@ $(top_srcdir)/configure: $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
capi20.pc: $(top_builddir)/config.status $(srcdir)/capi20.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $@
install-libLIBRARIES: $(lib_LIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
f="`echo $$p | sed -e 's|^.*/||'`"; \
f=$(am__strip_dir) \
echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
$(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
else :; fi; \
@ -254,7 +327,7 @@ install-libLIBRARIES: $(lib_LIBRARIES)
@$(POST_INSTALL)
@list='$(lib_LIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
p="`echo $$p | sed -e 's|^.*/||'`"; \
p=$(am__strip_dir) \
echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \
$(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \
else :; fi; \
@ -263,46 +336,79 @@ install-libLIBRARIES: $(lib_LIBRARIES)
uninstall-libLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(lib_LIBRARIES)'; for p in $$list; do \
p="`echo $$p | sed -e 's|^.*/||'`"; \
p=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \
rm -f "$(DESTDIR)$(libdir)/$$p"; \
done
clean-libLIBRARIES:
-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
libcapi20dyn.a: $(libcapi20dyn_a_OBJECTS) $(libcapi20dyn_a_DEPENDENCIES)
libcapi20dyn.a: $(libcapi20dyn_a_OBJECTS) $(libcapi20dyn_a_DEPENDENCIES)
-rm -f libcapi20dyn.a
$(libcapi20dyn_a_AR) libcapi20dyn.a $(libcapi20dyn_a_OBJECTS) $(libcapi20dyn_a_LIBADD)
$(RANLIB) libcapi20dyn.a
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
f=$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
else :; fi; \
done
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
p="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
p=$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
done
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" = "$$p" && dir=.; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libcapi20.la: $(libcapi20_la_OBJECTS) $(libcapi20_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libcapi20_la_LDFLAGS) $(libcapi20_la_OBJECTS) $(libcapi20_la_LIBADD) $(LIBS)
install-modulesLTLIBRARIES: $(modules_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(modulesdir)" || $(MKDIR_P) "$(DESTDIR)$(modulesdir)"
@list='$(modules_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
f=$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(modulesLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(modulesdir)/$$f'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(modulesLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(modulesdir)/$$f"; \
else :; fi; \
done
uninstall-modulesLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(modules_LTLIBRARIES)'; for p in $$list; do \
p=$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(modulesdir)/$$p'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(modulesdir)/$$p"; \
done
clean-modulesLTLIBRARIES:
-test -z "$(modules_LTLIBRARIES)" || rm -f $(modules_LTLIBRARIES)
@list='$(modules_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
lib_capi_mod_fritzbox.la: $(lib_capi_mod_fritzbox_la_OBJECTS) $(lib_capi_mod_fritzbox_la_DEPENDENCIES)
$(lib_capi_mod_fritzbox_la_LINK) -rpath $(modulesdir) $(lib_capi_mod_fritzbox_la_OBJECTS) $(lib_capi_mod_fritzbox_la_LIBADD) $(LIBS)
lib_capi_mod_rcapi.la: $(lib_capi_mod_rcapi_la_OBJECTS) $(lib_capi_mod_rcapi_la_DEPENDENCIES)
$(lib_capi_mod_rcapi_la_LINK) -rpath $(modulesdir) $(lib_capi_mod_rcapi_la_OBJECTS) $(lib_capi_mod_rcapi_la_LIBADD) $(LIBS)
lib_capi_mod_std.la: $(lib_capi_mod_std_la_OBJECTS) $(lib_capi_mod_std_la_DEPENDENCIES)
$(lib_capi_mod_std_la_LINK) -rpath $(modulesdir) $(lib_capi_mod_std_la_OBJECTS) $(lib_capi_mod_std_la_LIBADD) $(LIBS)
libcapi20.la: $(libcapi20_la_OBJECTS) $(libcapi20_la_DEPENDENCIES)
$(libcapi20_la_LINK) -rpath $(libdir) $(libcapi20_la_OBJECTS) $(libcapi20_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@ -325,35 +431,23 @@ libcapi20dyn_a-capidyn.o: capidyn.c
libcapi20dyn_a-capidyn.obj: capidyn.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcapi20dyn_a_CFLAGS) $(CFLAGS) -c -o libcapi20dyn_a-capidyn.obj `if test -f 'capidyn.c'; then $(CYGPATH_W) 'capidyn.c'; else $(CYGPATH_W) '$(srcdir)/capidyn.c'; fi`
libcapi20dyn_a-capidyn.lo: capidyn.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcapi20dyn_a_CFLAGS) $(CFLAGS) -c -o libcapi20dyn_a-capidyn.lo `test -f 'capidyn.c' || echo '$(srcdir)/'`capidyn.c
lib_capi_mod_fritzbox_la-capi_mod_fritzbox.lo: capi_mod_fritzbox.c
$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_capi_mod_fritzbox_la_CFLAGS) $(CFLAGS) -c -o lib_capi_mod_fritzbox_la-capi_mod_fritzbox.lo `test -f 'capi_mod_fritzbox.c' || echo '$(srcdir)/'`capi_mod_fritzbox.c
libcapi20_la-capi20.o: capi20.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcapi20_la_CFLAGS) $(CFLAGS) -c -o libcapi20_la-capi20.o `test -f 'capi20.c' || echo '$(srcdir)/'`capi20.c
lib_capi_mod_rcapi_la-capi_mod_rcapi.lo: capi_mod_rcapi.c
$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_capi_mod_rcapi_la_CFLAGS) $(CFLAGS) -c -o lib_capi_mod_rcapi_la-capi_mod_rcapi.lo `test -f 'capi_mod_rcapi.c' || echo '$(srcdir)/'`capi_mod_rcapi.c
libcapi20_la-capi20.obj: capi20.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcapi20_la_CFLAGS) $(CFLAGS) -c -o libcapi20_la-capi20.obj `if test -f 'capi20.c'; then $(CYGPATH_W) 'capi20.c'; else $(CYGPATH_W) '$(srcdir)/capi20.c'; fi`
lib_capi_mod_std_la-capi_mod_std.lo: capi_mod_std.c
$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_capi_mod_std_la_CFLAGS) $(CFLAGS) -c -o lib_capi_mod_std_la-capi_mod_std.lo `test -f 'capi_mod_std.c' || echo '$(srcdir)/'`capi_mod_std.c
libcapi20_la-capi20.lo: capi20.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcapi20_la_CFLAGS) $(CFLAGS) -c -o libcapi20_la-capi20.lo `test -f 'capi20.c' || echo '$(srcdir)/'`capi20.c
libcapi20_la-capifunc.o: capifunc.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcapi20_la_CFLAGS) $(CFLAGS) -c -o libcapi20_la-capifunc.o `test -f 'capifunc.c' || echo '$(srcdir)/'`capifunc.c
libcapi20_la-capifunc.obj: capifunc.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcapi20_la_CFLAGS) $(CFLAGS) -c -o libcapi20_la-capifunc.obj `if test -f 'capifunc.c'; then $(CYGPATH_W) 'capifunc.c'; else $(CYGPATH_W) '$(srcdir)/capifunc.c'; fi`
$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcapi20_la_CFLAGS) $(CFLAGS) -c -o libcapi20_la-capi20.lo `test -f 'capi20.c' || echo '$(srcdir)/'`capi20.c
libcapi20_la-capifunc.lo: capifunc.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcapi20_la_CFLAGS) $(CFLAGS) -c -o libcapi20_la-capifunc.lo `test -f 'capifunc.c' || echo '$(srcdir)/'`capifunc.c
libcapi20_la-convert.o: convert.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcapi20_la_CFLAGS) $(CFLAGS) -c -o libcapi20_la-convert.o `test -f 'convert.c' || echo '$(srcdir)/'`convert.c
libcapi20_la-convert.obj: convert.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcapi20_la_CFLAGS) $(CFLAGS) -c -o libcapi20_la-convert.obj `if test -f 'convert.c'; then $(CYGPATH_W) 'convert.c'; else $(CYGPATH_W) '$(srcdir)/convert.c'; fi`
$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcapi20_la_CFLAGS) $(CFLAGS) -c -o libcapi20_la-capifunc.lo `test -f 'capifunc.c' || echo '$(srcdir)/'`capifunc.c
libcapi20_la-convert.lo: convert.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcapi20_la_CFLAGS) $(CFLAGS) -c -o libcapi20_la-convert.lo `test -f 'convert.c' || echo '$(srcdir)/'`convert.c
$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcapi20_la_CFLAGS) $(CFLAGS) -c -o libcapi20_la-convert.lo `test -f 'convert.c' || echo '$(srcdir)/'`convert.c
mostlyclean-libtool:
-rm -f *.lo
@ -362,14 +456,30 @@ clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
-rm -f libtool config.lt
install-pcDATA: $(pc_DATA)
@$(NORMAL_INSTALL)
test -z "$(pcdir)" || $(MKDIR_P) "$(DESTDIR)$(pcdir)"
@list='$(pc_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(pcDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pcdir)/$$f'"; \
$(pcDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pcdir)/$$f"; \
done
uninstall-pcDATA:
@$(NORMAL_UNINSTALL)
@list='$(pc_DATA)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(pcdir)/$$f'"; \
rm -f "$(DESTDIR)$(pcdir)/$$f"; \
done
install-includeHEADERS: $(include_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
@list='$(include_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
f=$(am__strip_dir) \
echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
$(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
done
@ -377,7 +487,7 @@ install-includeHEADERS: $(include_HEADERS)
uninstall-includeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(include_HEADERS)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
rm -f "$(DESTDIR)$(includedir)/$$f"; \
done
@ -387,8 +497,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@ -400,22 +510,23 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
@ -430,23 +541,22 @@ distclean-tags:
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
test -d $(distdir) || mkdir $(distdir)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@ -460,18 +570,22 @@ distdir: $(DISTFILES)
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
dist-tarZ: distdir
$(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
@ -484,7 +598,7 @@ dist-zip: distdir
$(am__remove_distdir)
dist dist-all: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
@ -493,13 +607,15 @@ dist dist-all: distdir
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | unshar ;;\
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
@ -535,7 +651,7 @@ distcheck: dist
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
@ -556,10 +672,10 @@ distcleancheck: distclean
exit 1; } >&2
check-am: all-am
check: check-am
all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS)
all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(modulesdir)" "$(DESTDIR)$(pcdir)" "$(DESTDIR)$(includedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@ -581,7 +697,8 @@ clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@ -590,7 +707,7 @@ maintainer-clean-generic:
clean: clean-am
clean-am: clean-generic clean-libLIBRARIES clean-libLTLIBRARIES \
clean-libtool mostlyclean-am
clean-libtool clean-modulesLTLIBRARIES mostlyclean-am
distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
@ -608,14 +725,23 @@ info: info-am
info-am:
install-data-am: install-includeHEADERS
install-data-am: install-includeHEADERS install-modulesLTLIBRARIES \
install-pcDATA
install-dvi: install-dvi-am
install-exec-am: install-libLIBRARIES install-libLTLIBRARIES
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
@ -637,28 +763,34 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-includeHEADERS uninstall-info-am \
uninstall-libLIBRARIES uninstall-libLTLIBRARIES
uninstall-am: uninstall-includeHEADERS uninstall-libLIBRARIES \
uninstall-libLTLIBRARIES uninstall-modulesLTLIBRARIES \
uninstall-pcDATA
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
clean-generic clean-libLIBRARIES clean-libLTLIBRARIES \
clean-libtool ctags dist dist-all dist-bzip2 dist-gzip \
dist-shar dist-tarZ dist-zip distcheck distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-includeHEADERS install-info install-info-am \
install-libLIBRARIES install-libLTLIBRARIES install-man \
clean-libtool clean-modulesLTLIBRARIES ctags dist dist-all \
dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ dist-zip \
distcheck distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-includeHEADERS install-info \
install-info-am install-libLIBRARIES install-libLTLIBRARIES \
install-man install-modulesLTLIBRARIES install-pcDATA \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-includeHEADERS uninstall-info-am \
uninstall-libLIBRARIES uninstall-libLTLIBRARIES
uninstall-includeHEADERS uninstall-libLIBRARIES \
uninstall-libLTLIBRARIES uninstall-modulesLTLIBRARIES \
uninstall-pcDATA
stamp-h.in
# libcapi20_la_LIBADD = $(LIBADD_DL)
$(OBJECTS): libtool

View File

@ -17,7 +17,7 @@ if it doesn't exist look for
To set the remote machine, the above file need to have
the following line
REMOTE <driver> <remote hostname|ip-address> <remote port>
Drivers:
* fritzbox - Remote CAPI via FRITZ!Box
* rcapi - Melware Remote CAPI

8841
capi20.new/aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

981
capi20.new/capi20.c Normal file
View File

@ -0,0 +1,981 @@
/*
* CAPI 2.0 library
*
* 2002-03-27 - Added remote capi features.
* Armin Schindler <armin@melware.de>
*
* This program is free software and may be modified and
* distributed under the terms of the GNU Public License.
*
*/
#include <sys/types.h>
#include <sys/ioctl.h>
#include <dirent.h>
#include <dlfcn.h>
#include <fcntl.h>
#include <errno.h>
#include <limits.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <ctype.h>
#include <assert.h>
#include <stdarg.h>
#define _LINUX_LIST_H
#include <linux/capi.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include "capi20.h"
#include "capi_mod.h"
#ifndef CAPI_GET_FLAGS
#define CAPI_GET_FLAGS _IOR('C',0x23, unsigned)
#endif
#ifndef CAPI_SET_FLAGS
#define CAPI_SET_FLAGS _IOR('C',0x24, unsigned)
#endif
#ifndef CAPI_CLR_FLAGS
#define CAPI_CLR_FLAGS _IOR('C',0x25, unsigned)
#endif
#ifndef CAPI_NCCI_OPENCOUNT
#define CAPI_NCCI_OPENCOUNT _IOR('C',0x26, unsigned)
#endif
#ifndef CAPI_NCCI_GETUNIT
#define CAPI_NCCI_GETUNIT _IOR('C',0x27, unsigned)
#endif
static int capi_fd = -1;
static char *globalconfigfilename = "/etc/capi20.conf";
static char *userconfigfilename = ".capi20rc";
static short port = -1;
static char driver[1024] = "";
static char hostname[1024] = "";
static int tracelevel;
static char *tracefile;
/** debug level, for debugging purpose */
static int nDebugLevel = 0;
/**
* \brief CapiDebug output functions
* \param nLevel debug level of following message
* \param pnFormat formatted string
*/
void CapiDebug( int nLevel, const char *pnFormat, ... ) {
if ( nLevel <= nDebugLevel ) {
char anOutput[ 512 ];
va_list pArgs;
time_t sTime = time( NULL );
struct tm *psNow = localtime( &sTime );
va_start( pArgs, pnFormat );
vsnprintf( anOutput, sizeof( anOutput ), pnFormat, pArgs );
printf( "[%s] %02d.%02d.%d %02d:%02d:%02d - %s\n", "libcapi", psNow -> tm_mday, psNow -> tm_mon + 1, psNow -> tm_year + 1900, psNow -> tm_hour, psNow -> tm_min, psNow -> tm_sec, anOutput );
va_end( pArgs );
}
}
/**
* \brief Get byte from data buffer and increase buffer pointer
* \param ppnPtr data buffer pointer
* \return byte from buffer
*/
unsigned short get_byte( unsigned char **ppnPtr ) {
*ppnPtr += 1;
return ( ( unsigned char ) *( *ppnPtr - 1 ) );
}
/**
* \brief Get word from data buffer and increase buffer pointer
* \param ppnPtr data buffer pointer
* \return word from buffer
*/
unsigned short get_word( unsigned char **ppnPtr ) {
return ( ( get_byte( ppnPtr ) ) | get_byte( ppnPtr ) << 8 );
}
/**
* \brief Get netword (lo/hi switch) from data buffer and increase
* \param ppnPtr data buffer pointer
* \brief buffer pointer
* \return networdword from buffer
*/
unsigned short get_netword( unsigned char **ppnPtr ) {
return ( ( get_byte( ppnPtr ) << 8 ) | get_byte( ppnPtr ) );
}
/**
* \brief Put byte to data buffer and increase buffer pointer
* \param ppnPtr data buffer pointer
* \param nVal byte number
* \return byte from buffer
*/
unsigned char *put_byte( unsigned char **ppnPtr, _cbyte nVal ) {
**ppnPtr = nVal;
*ppnPtr += 1;
return *ppnPtr;
}
/**
* \brief Put word to data buffer and increase buffer pointer
* \param ppnPtr data buffer pointer
* \param nVal word number
* \return word from buffer
*/
unsigned char *put_word( unsigned char **ppnPtr, _cword nVal ) {
put_byte( ppnPtr, nVal & 0xFF );
put_byte( ppnPtr, ( nVal & 0xFF00 ) >> 8 );
return *ppnPtr;
}
/**
* \brief Put dword to data buffer and increase buffer pointer
* \param ppnPtr data buffer pointer
* \param nVal dword number
* \return dword from buffer
*/
unsigned char *put_dword( unsigned char **ppnPtr, _cdword nVal ) {
put_byte( ppnPtr, nVal & 0xFF );
put_byte( ppnPtr, ( nVal & 0xFF00 ) >> 8 );
put_byte( ppnPtr, ( nVal & 0xFF0000 ) >> 16 );
put_byte( ppnPtr, ( nVal & 0xFF000000 ) >> 24 );
return *ppnPtr;
}
/**
* \brief Put netword to data buffer and increase buffer pointer
* \param ppnPtr data buffer pointer
* \param nVal netword number
* \return netword from buffer
*/
unsigned char *put_netword( unsigned char **ppnPtr, _cword nVal ) {
put_byte( ppnPtr, ( nVal & 0xFF00 ) >> 8 );
put_byte( ppnPtr, nVal & 0xFF );
return *ppnPtr;
}
static char *skip_whitespace( char *s ) {
while ( *s && isspace( *s ) ) {
s++;
}
return s;
}
static char *skip_nonwhitespace(char *s)
{
while (*s && !isspace(*s)) s++;
return s;
}
/*
* read config file
*/
static int read_config(void)
{
FILE *fp = NULL;
char *s, *t;
char buf[1024];
if ((s = getenv("HOME")) != NULL) {
strcpy(buf, s);
strcat(buf, "/");
strcat(buf, userconfigfilename);
fp = fopen(buf, "r");
}
if ((!fp) && ((fp = fopen(globalconfigfilename, "r")) == NULL))
return(0);
while(fgets(buf, sizeof(buf), fp)) {
buf[strlen(buf)-1] = 0;
s = skip_whitespace(buf);
if (*s == 0 || *s == '#')
continue;
if (!(strncmp(s, "REMOTE", 6))) {
s = skip_nonwhitespace(s);
t = skip_whitespace(s);
s = skip_nonwhitespace(t);
if (*s) *s++ = 0;
strncpy(driver, t, (sizeof(driver) - 1));
t = skip_whitespace(s);
s = skip_nonwhitespace(t);
if (*s) *s++ = 0;
strncpy(hostname, t, (sizeof(hostname) - 1));
t = skip_whitespace(s);
s = skip_nonwhitespace(t);
if (*s) *s++ = 0;
port = strtol(t, NULL, 10);
if (!port)
port = 2662;
continue;
} else if (!(strncmp(s, "TRACELEVEL", 10))) {
t = skip_nonwhitespace(s);
s = skip_whitespace(t);
tracelevel = (int)strtol(s, NULL, 10);
continue;
} else if (!(strncmp(s, "TRACEFILE", 9))) {
t = skip_nonwhitespace(s);
s = skip_whitespace(t);
t = skip_nonwhitespace(s);
if (*t) *t++ = 0;
tracefile = strdup(s);
continue;
}
}
fclose(fp);
return(1);
}
int getPort( void ) {
return port;
}
void setPort( int nPortNumber ) {
port = nPortNumber;
}
char *getHostName( void ) {
return hostname;
}
void setHostName( char *pnHostName ) {
snprintf( hostname, sizeof( hostname ), "%s", pnHostName );
}
/*
* managment of application ids
*/
#define MAX_APPL 1024
static int applidmap[MAX_APPL];
static inline int remember_applid(unsigned applid, int fd)
{
if (applid >= MAX_APPL)
return -1;
applidmap[applid] = fd;
return 0;
}
static inline unsigned alloc_applid(int fd)
{
unsigned applid;
for (applid = 1; applid < MAX_APPL; applid++) {
if (applidmap[applid] < 0) {
applidmap[applid] = fd;
return applid;
}
}
return 0;
}
static inline void freeapplid(unsigned applid)
{
if (applid < MAX_APPL)
applidmap[applid] = -1;
}
static inline int validapplid(unsigned applid)
{
return ((applid > 0) && (applid < MAX_APPL) && (applidmap[applid] >= 0));
}
inline int applid2fd(unsigned applid)
{
if (applid < MAX_APPL)
return applidmap[applid];
return -1;
}
/*
* buffer management
*/
struct recvbuffer {
struct recvbuffer *next;
unsigned int datahandle;
unsigned int used;
unsigned int ncci;
unsigned char *buf; /* 128 + MaxSizeB3 */
};
struct applinfo {
unsigned maxbufs;
unsigned nbufs;
size_t recvbuffersize;
struct recvbuffer *buffers;
struct recvbuffer *firstfree;
struct recvbuffer *lastfree;
unsigned char *bufferstart;
};
static struct applinfo *alloc_buffers(
unsigned MaxB3Connection,
unsigned MaxB3Blks,
unsigned MaxSizeB3)
{
struct applinfo *ap;
unsigned nbufs = 2 + MaxB3Connection * (MaxB3Blks + 1);
size_t recvbuffersize = 128 + MaxSizeB3;
unsigned i;
size_t size;
if (recvbuffersize < 2048)
recvbuffersize = 2048;
size = sizeof(struct applinfo);
size += sizeof(struct recvbuffer) * nbufs;
size += recvbuffersize * nbufs;
ap = (struct applinfo *)malloc(size);
if (ap == 0)
return 0;
memset(ap, 0, size);
ap->maxbufs = nbufs;
ap->recvbuffersize = recvbuffersize;
ap->buffers = (struct recvbuffer *)(ap+1);
ap->firstfree = ap->buffers;
ap->bufferstart = (unsigned char *)(ap->buffers+nbufs);
for (i = 0; i < ap->maxbufs; i++) {
ap->buffers[i].next = &ap->buffers[i+1];
ap->buffers[i].used = 0;
ap->buffers[i].ncci = 0;
ap->buffers[i].buf = ap->bufferstart+(recvbuffersize*i);
}
ap->lastfree = &ap->buffers[ap->maxbufs-1];
ap->lastfree->next = 0;
return ap;
}
static void free_buffers(struct applinfo *ap)
{
free(ap);
}
static struct applinfo *applinfo[MAX_APPL];
unsigned char *get_buffer(unsigned applid, size_t *sizep, unsigned *handle)
{
struct applinfo *ap;
struct recvbuffer *buf;
assert(validapplid(applid));
ap = applinfo[applid];
if ((buf = ap->firstfree) == 0)
return 0;
ap->firstfree = buf->next;
buf->next = 0;
buf->used = 1;
ap->nbufs++;
*sizep = ap->recvbuffersize;
*handle = (buf->buf-ap->bufferstart)/ap->recvbuffersize;
return buf->buf;
}
void save_datahandle(
unsigned char applid,
unsigned offset,
unsigned datahandle,
unsigned ncci)
{
struct applinfo *ap;
struct recvbuffer *buf;
assert(validapplid(applid));
ap = applinfo[applid];
assert(offset < ap->maxbufs);
buf = ap->buffers+offset;
buf->datahandle = datahandle;
buf->ncci = ncci;
}
unsigned return_buffer(unsigned char applid, unsigned offset)
{
struct applinfo *ap;
struct recvbuffer *buf;
assert(validapplid(applid));
ap = applinfo[applid];
assert(offset < ap->maxbufs);
buf = ap->buffers+offset;
assert(buf->used == 1);
assert(buf->next == 0);
if (ap->lastfree) {
ap->lastfree->next = buf;
ap->lastfree = buf;
} else {
ap->firstfree = ap->lastfree = buf;
}
buf->used = 0;
buf->ncci = 0;
assert(ap->nbufs-- > 0);
return buf->datahandle;
}
void cleanup_buffers_for_ncci(unsigned char applid, unsigned ncci)
{
struct applinfo *ap;
unsigned i;
assert(validapplid(applid));
ap = applinfo[applid];
for (i = 0; i < ap->maxbufs; i++) {
if (ap->buffers[i].used) {
assert(ap->buffers[i].ncci != 0);
if (ap->buffers[i].ncci == ncci) {
return_buffer(applid, i);
}
}
}
}
void cleanup_buffers_for_plci(unsigned char applid, unsigned plci)
{
struct applinfo *ap;
unsigned i;
assert(validapplid(applid));
ap = applinfo[applid];
for (i = 0; i < ap->maxbufs; i++) {
if (ap->buffers[i].used) {
assert(ap->buffers[i].ncci != 0);
if ((ap->buffers[i].ncci & 0xffff) == plci) {
return_buffer(applid, i);
}
}
}
}
/*
* CAPI2.0 functions
*/
/** Simple single-linked list for modules */
struct sList {
struct sModule *psMod;
struct sList *psNext;
};
/* Active module pointer */
static struct sModule *psModule = NULL;
/* Global loaded module list */
static struct sList *psModuleList = NULL;
/**
* \brief Register Module - add it to psModuleList
* \param psMod new module pointer
* \return error code. 0 on success, else error occurred
*/
static int RegisterModule( struct sModule *psMod ) {
struct sList *psList;
if ( psMod == NULL || psMod -> pnName == NULL || psMod -> nVersion != MODULE_LOADER_VERSION || psMod -> psOperations == NULL ) {
return -1;
}
if ( psModuleList == NULL ) {
psModuleList = malloc( sizeof( struct sList ) );
if ( psModuleList != NULL ) {
psModuleList -> psMod = psMod;
psModuleList -> psNext = NULL;
}
return psModuleList != NULL ? 0 : -1;
}
psList = psModuleList;
while ( psList -> psNext ) {
psList = psList -> psNext;
}
psList -> psNext = malloc( sizeof( struct sList ) );
if ( psList -> psNext != NULL ) {
psList -> psNext -> psMod = psMod;
psList -> psNext -> psNext = NULL;
return 0;
}
return -2;
}
/**
* \brief Try to load the module and register it
* \param pnName full path name to module
* \return error code, see RegisterModule
*/
static int LoadModule( char *pnName ) {
struct sModule *psMod;
void *pHandle;
typedef int ( *InitModule )( struct sModule *psModule );
InitModule initModule;
/* Try to open module */
pHandle = dlopen( pnName, RTLD_GLOBAL | RTLD_LAZY );
if ( pHandle == NULL ) {
CapiDebug( 1, "Could not open module!\n" );
return -1;
}
/* Find InitModule function within module */
initModule = dlsym( pHandle, "InitModule" );
if ( initModule == NULL ) {
CapiDebug( 1, "Module has no InitModule!\n" );
dlclose( pHandle );
return -2;
}
/* Create new module structure */
psMod = malloc( sizeof( struct sModule ) );
if ( psMod == NULL ) {
CapiDebug( 1, "Could not alloc memory for module structure!\n" );
dlclose( pHandle );
return -2;
}
/* Initialize module */
if ( initModule( psMod ) != 0 ) {
CapiDebug( 1, "Could not init!\n" );
free( psMod );
psMod = NULL;
dlclose( pHandle );
return -3;
}
/* Success, add handle to module structure */
psMod -> pHandle = pHandle;
/* register module */
return RegisterModule( psMod );
}
/**
* \brief Initialize module
* \param pnModuleDir directory where we can find the modules
*/
static void InitModules( char *pnModuleDir ) {
DIR *psDir;
struct dirent *psEntry;
char *pnFullName;
int nLen;
/* try to open module directory */
psDir = opendir( pnModuleDir );
if ( psDir != NULL ) {
/* read entry by entry */
while ( ( psEntry = readdir( psDir ) ) != NULL ) {
/* skip ".", ".." and files which do not end with "so" */
nLen = strlen( psEntry -> d_name );
switch ( nLen ) {
case 1:
if ( psEntry -> d_name[ 0 ] == '.' ) {
continue;
}
break;
case 2:
if ( psEntry -> d_name[ 0 ] == '.' && psEntry -> d_name[ 1 ] == '.' ) {
continue;
}
break;
default:
if ( strncmp( psEntry -> d_name + nLen - 3, ".so", nLen ) ) {
continue;
}
break;
}
/* len of complete path + filename */
nLen = strlen( pnModuleDir ) + strlen( psEntry -> d_name ) + 2;
pnFullName = malloc( nLen );
if ( pnFullName != NULL ) {
/* create full name */
snprintf( pnFullName, nLen, "%s/%s", pnModuleDir, psEntry -> d_name );
/* load module */
LoadModule( pnFullName );
/* free full name */
free( pnFullName );
pnFullName = NULL;
}
}
/* close directory */
closedir( psDir );
}
}
unsigned capi20_isinstalled( void ) {
struct sList *psList;
/* check if we are already opened */
if ( capi_fd >= 0 ) {
return CapiNoError;
}
/* Load and initialize modules */
InitModules( LIBDIR );
if ( psModuleList == NULL ) {
/* if no modules are loaded, psModuleList is NULL, abort */
return CapiRegNotInstalled;
}
/* read configuration file */
read_config();
/* no special driver requested, auto-detect */
if ( strlen( driver ) <= 0 ) {
/* backwards-compatible: check standard interface fist */
psList = psModuleList;
while ( psList != NULL ) {
if ( !strcasecmp( psList -> psMod -> pnName, "standard" ) ) {
psModule = psList -> psMod;
capi_fd = psModule -> psOperations -> IsInstalled();
if ( capi_fd >= 0 ) {
/* no error */
return CapiNoError;
}
}
psList = psList -> psNext;
}
/* no standard device detect, try the other modules */
psList = psModuleList;
while ( psList != NULL ) {
if ( strcasecmp( psList -> psMod -> pnName, "standard" ) ) {
psModule = psList -> psMod;
capi_fd = psModule -> psOperations -> IsInstalled();
if ( capi_fd >= 0 ) {
/* no error */
return CapiNoError;
}
}
psList = psList -> psNext;
}
} else {
/* Find requested driver in list */
psList = psModuleList;
while ( psList != NULL ) {
if ( !strcasecmp( psList -> psMod -> pnName, driver ) ) {
psModule = psList -> psMod;
capi_fd = psModule -> psOperations -> IsInstalled();
if ( capi_fd >= 0 ) {
/* no error */
return CapiNoError;
}
break;
}
psList = psList -> psNext;
}
}
/* uhh, not installed */
return CapiRegNotInstalled;
}
unsigned capi20_register( unsigned MaxB3Connection, unsigned MaxB3Blks, unsigned MaxSizeB3, unsigned *ApplID ) {
int applid = 0;
int fd = -1;
*ApplID = 0;
if (capi20_isinstalled() != CapiNoError)
return CapiRegNotInstalled;
fd = psModule -> psOperations -> Register( MaxB3Connection, MaxB3Blks, MaxSizeB3, &applid );
if ( fd < 0 ) {
return CapiRegOSResourceErr;
}
if (remember_applid(applid, fd) < 0) {
close(fd);
return CapiRegOSResourceErr;
}
applinfo[applid] = alloc_buffers(MaxB3Connection, MaxB3Blks, MaxSizeB3);
if (applinfo[applid] == 0) {
close(fd);
return CapiRegOSResourceErr;
}
*ApplID = applid;
return CapiNoError;
}
unsigned
capi20_release (unsigned ApplID)
{
if (capi20_isinstalled() != CapiNoError)
return CapiRegNotInstalled;
if (!validapplid(ApplID))
return CapiIllAppNr;
if ( psModule -> psOperations -> Release != NULL ) {
psModule -> psOperations -> Release( applid2fd( ApplID ), ApplID );
}
(void)close(applid2fd(ApplID));
freeapplid(ApplID);
free_buffers(applinfo[ApplID]);
applinfo[ApplID] = 0;
return CapiNoError;
}
/**
* \brief Process data message (should be moved up to capi20.c as it is general)
* \param pnMsg message data pointer
* \param nApplId application id
* \param nCommand major packet command
* \param nSubCommand minor packet command
* \param nLen len of message
* \return length of full packet
*/
int processMessage( unsigned char *pnMsg, int nApplId, int nCommand, int nSubCommand, int nLen ) {
/* DATA_B3_REQ specific:
* we have to copy the buffer and patch the buffer address!
*/
if ( nCommand == CAPI_DATA_B3 ) {
if ( nSubCommand == CAPI_REQ ) {
int nDataLen = CAPIMSG_DATALEN( pnMsg );
void *pDataPtr;
if ( sizeof( void * ) != 4 ) {
if ( nLen >= 30 ) {
/* 64Bit CAPI-extension */
u_int64_t nData64;
memcpy( &nData64, pnMsg + 22, sizeof( u_int64_t ) );
if ( nData64 != 0 ) {
pDataPtr = ( void * )( unsigned long ) nData64;
} else {
/* Assume data after message */
pDataPtr = pnMsg + nLen;
}
} else {
/* Assume data after message */
pDataPtr = pnMsg + nLen;
}
} else {
u_int32_t nData;
memcpy( &nData, pnMsg + 12, sizeof( u_int32_t ) );
if ( nData != 0 ) {
pDataPtr = ( void * )( ( unsigned long ) nData );
} else {
pDataPtr = pnMsg + nLen;
}
}
if ( nLen + nDataLen > SEND_BUFSIZ ) {
return CapiMsgOSResourceErr;
}
memcpy( pnMsg + nLen, pDataPtr, nDataLen );
nLen += nDataLen;
} else if ( nSubCommand == CAPI_RESP ) {
capimsg_setu16( pnMsg, 12, return_buffer( nApplId, CAPIMSG_U16( pnMsg, 12 ) ) );
}
}
if ( nCommand == CAPI_DISCONNECT_B3 && nSubCommand == CAPI_RESP ) {
cleanup_buffers_for_ncci( nApplId, CAPIMSG_U32( pnMsg, 8 ) );
}
return nLen;
}
unsigned capi20_put_message( unsigned ApplID, unsigned char *Msg ) {
if (capi20_isinstalled() != CapiNoError) {
return CapiRegNotInstalled;
}
if (!validapplid(ApplID)) {
return CapiIllAppNr;
}
return psModule -> psOperations -> PutMessage( applid2fd(ApplID), ApplID, Msg );
}
unsigned capi20_get_message( unsigned ApplID, unsigned char **Buf ) {
if (capi20_isinstalled() != CapiNoError)
return CapiRegNotInstalled;
if (!validapplid(ApplID))
return CapiIllAppNr;
return psModule -> psOperations -> GetMessage( applid2fd(ApplID), ApplID, Buf );
}
unsigned char *capi20_get_manufacturer( unsigned Ctrl, unsigned char *Buf ) {
if (capi20_isinstalled() != CapiNoError)
return 0;
return psModule -> psOperations -> GetManufactor( capi_fd, Ctrl, Buf );
}
unsigned char *
capi20_get_version(unsigned Ctrl, unsigned char *Buf)
{
if (capi20_isinstalled() != CapiNoError)
return 0;
return psModule -> psOperations -> GetVersion( capi_fd, Ctrl, Buf );
}
unsigned char *
capi20_get_serial_number(unsigned Ctrl, unsigned char *Buf)
{
if (capi20_isinstalled() != CapiNoError)
return 0;
return psModule -> psOperations -> GetSerialNumber( capi_fd, Ctrl, Buf );
}
unsigned
capi20_get_profile(unsigned Ctrl, unsigned char *Buf)
{
if (capi20_isinstalled() != CapiNoError)
return CapiMsgNotInstalled;
return psModule -> psOperations -> GetProfile( capi_fd, Ctrl, Buf );
}
/*
* functions added to the CAPI2.0 spec
*/
unsigned
capi20_waitformessage(unsigned ApplID, struct timeval *TimeOut)
{
int fd;
fd_set rfds;
FD_ZERO(&rfds);
if (capi20_isinstalled() != CapiNoError)
return CapiRegNotInstalled;
if (!validapplid(ApplID))
return CapiIllAppNr;
fd = applid2fd(ApplID);
FD_SET(fd, &rfds);
if (select(fd + 1, &rfds, NULL, NULL, TimeOut) < 1)
return CapiReceiveQueueEmpty;
return CapiNoError;
}
int
capi20_fileno(unsigned ApplID)
{
return applid2fd(ApplID);
}
/*
* Extensions for middleware
*/
int
capi20ext_get_flags(unsigned ApplID, unsigned *flagsptr)
{
if ( psModule && psModule -> psOperations -> GetFlags ) {
return psModule -> psOperations -> GetFlags( ApplID, flagsptr );
}
return CapiMsgOSResourceErr;
}
int
capi20ext_set_flags(unsigned ApplID, unsigned flags)
{
if ( psModule && psModule -> psOperations -> SetFlags ) {
return psModule -> psOperations -> SetFlags( ApplID, flags );
}
return CapiMsgOSResourceErr;
}
int
capi20ext_clr_flags(unsigned ApplID, unsigned flags)
{
if ( psModule && psModule -> psOperations -> ClearFlags ) {
return psModule -> psOperations -> ClearFlags( ApplID, flags );
}
return CapiMsgOSResourceErr;
}
char *
capi20ext_get_tty_devname(unsigned applid, unsigned ncci, char *buf, size_t size)
{
if ( psModule && psModule -> psOperations -> GetTtyDeviceName ) {
return psModule -> psOperations -> GetTtyDeviceName( applid, ncci, buf, size );
}
return NULL;
}
char *capi20ext_get_raw_devname( unsigned applid, unsigned ncci, char *buf, size_t size ) {
if ( psModule && psModule -> psOperations -> GetRawDeviceName ) {
return psModule -> psOperations -> GetRawDeviceName( applid, ncci, buf, size );
}
return NULL;
}
int capi20ext_ncci_opencount( unsigned applid, unsigned ncci ) {
if ( psModule && psModule -> psOperations -> GetNcciOpenCount ) {
return psModule -> psOperations -> GetNcciOpenCount( applid, ncci );
}
return CapiMsgOSResourceErr;
}
static void initlib( void ) __attribute__( ( constructor ) );
static void exitlib( void ) __attribute__( ( destructor ) );
static void initlib( void ) {
int i;
for ( i = 0; i < MAX_APPL; i++ ) {
applidmap[ i ] = -1;
}
}
static void exitlib( void ) {
if ( capi_fd >= 0 ) {
close( capi_fd );
capi_fd = -1;
}
}

View File

@ -1,23 +1,8 @@
/*
* $Id: capi20.h,v 1.11 2007/11/26 13:13:00 keil Exp $
* CAPI 2.0 library
*
* $Log: capi20.h,v $
* Revision 1.11 2007/11/26 13:13:00 keil
* newer gcc do not include stdlib.h by default (needed for size_t)
*
* Revision 1.10 2000/04/03 14:27:15 calle
* non CAPI2.0 standard functions now named capi20ext not capi20.
* Extentionfunctions will work with actual driver version.
*
* Revision 1.9 2000/03/03 15:56:14 calle
* - now uses cloning device /dev/capi20.
* - middleware extentions prepared.
*
* Revision 1.8 1999/12/06 17:08:30 calle
* - Splitted capi20.h into capi20.h and capiutils.h.
* - capi20.h: the functions from the CAPI-2.0 Spec
* - capiutils.h: the "CAPI-ADK" functions
* - bug in 64Bit-Support fixed.
* This program is free software and may be modified and
* distributed under the terms of the GNU Public License.
*
*/
#ifndef __CAPI20_H__
@ -28,15 +13,17 @@ extern "C" {
#endif
#include <stdlib.h>
#include <stddef.h>
#include <sys/time.h>
#define SEND_BUFSIZ (128+2048)
/* standard CAPI2.0 functions */
unsigned capi20_register (unsigned MaxLogicalConnection,
unsigned MaxBDataBlocks,
unsigned MaxBDataLen,
unsigned *ApplIDp);
unsigned capi20_register (
unsigned MaxLogicalConnection,
unsigned MaxBDataBlocks,
unsigned MaxBDataLen,
unsigned *ApplIDp);
unsigned capi20_release (unsigned ApplID);
@ -66,10 +53,17 @@ int capi20ext_get_flags(unsigned ApplID, unsigned *flagsptr);
int capi20ext_set_flags(unsigned ApplID, unsigned flags);
int capi20ext_clr_flags(unsigned ApplID, unsigned flags);
char *capi20ext_get_tty_devname(unsigned applid, unsigned ncci,
char *buf, size_t size);
char *capi20ext_get_raw_devname(unsigned applid, unsigned ncci,
char *buf, size_t size);
char *capi20ext_get_tty_devname(
unsigned applid,
unsigned ncci,
char *buf,
size_t size);
char *capi20ext_get_raw_devname(
unsigned applid,
unsigned ncci,
char *buf,
size_t size);
int capi20ext_ncci_opencount(unsigned applid, unsigned ncci);
@ -84,3 +78,4 @@ int capi20ext_ncci_opencount(unsigned applid, unsigned ncci);
#endif
#endif /* __CAPI20_H */

View File

@ -1,26 +1,3 @@
/*
* capi_mod.h
*
* Author Jan-Michael Brummer
* Author Marco Zissen
*
* Copyright 2008 by Jan-Michael Brummer, Marco Zissen
*
* Author Karsten Keil <kkeil@linux-pingi.de>
*
* Copyright 2011 by Karsten Keil <kkeil@linux-pingi.de>
*
* This code is free software; you can redistribute it and/or modify
* it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE
* version 2.1 as published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU LESSER GENERAL PUBLIC LICENSE for more details.
*
*/
#ifndef CAPI_MOD_H
#define CAPI_MOD_H
@ -34,7 +11,7 @@ struct sModuleOperations {
unsigned char *( *GetVersion )( int nHandle, unsigned nController, unsigned char *pnBuffer );
unsigned char *( *GetSerialNumber )( int nHandle, unsigned nController, unsigned char *pnBuffer );
unsigned ( *GetProfile )( int nHandle, unsigned nController, unsigned char *pnBuffer );
unsigned ( *waitformessage)(int nHandle, unsigned ApplID, struct timeval *TimeOut);
/* The following parts are only used on the standard capi device */
int ( *GetFlags )( unsigned nApplId, unsigned *pnFlagsPtr );
int ( *SetFlags )( unsigned nApplId, unsigned nFlags );
@ -53,22 +30,11 @@ struct sModule {
char *getHostName( void );
int getPort( void );
unsigned char *capi_get_buffer( unsigned , size_t *, unsigned * );
void capi_save_datahandle(unsigned, unsigned, unsigned, unsigned);
unsigned capi_return_buffer(unsigned, unsigned);
void cleanup_buffers_for_ncci(unsigned, unsigned);
void cleanup_buffers_for_plci(unsigned, unsigned);
int capi_processMessage(unsigned char *, unsigned, unsigned, unsigned, int);
char *getTraceFile( void );
int getTraceLevel( void );
unsigned char *get_buffer( unsigned applid, size_t *sizep, unsigned *handle );
int capi_remember_applid(unsigned, int);
unsigned capi_alloc_applid(int);
void capi_freeapplid(unsigned);
int capi_validapplid(unsigned);
int capi_applid2fd(unsigned);
unsigned capi_return_buffer(unsigned applid, unsigned);
#define MODULE_LOADER_VERSION 2
#define MODULE_LOADER_VERSION 0x01
#define MODULE_INIT( NAME, OPS )\
int InitModule( struct sModule *psModule ) {\

View File

@ -15,7 +15,6 @@
#include <stdio.h>
#include <linux/capi.h>
#include <errno.h>
#include <unistd.h>
#include "capi20.h"
#include "capi_mod.h"
#include "capi_mod_fritzbox.h"
@ -258,14 +257,14 @@ static unsigned fritzboxRelease( int nSock, int nApplId ) {
* \param pnMsg message pointer
* \return error code (CapiNoError or CapiMsgOSResourceErr on error)
*/
static unsigned fritzboxPutMessage( int nSock, unsigned nApplId, unsigned char *pnMsg ) {
static unsigned fritzboxPutMessage( int nSock, unsigned nApplId, unsigned char *pnMsg ) {
unsigned char anSendBuffer[ SEND_BUFSIZ ];
int nNum;
int nLen = CAPIMSG_LEN( pnMsg );
int nCommand = CAPIMSG_COMMAND( pnMsg );
int nSubCommand = CAPIMSG_SUBCOMMAND( pnMsg );
nLen = capi_processMessage( pnMsg, nApplId, nCommand, nSubCommand, nLen );
nLen = processMessage( pnMsg, nApplId, nCommand, nSubCommand, nLen );
/* Create capi over tcp header (0x80, 2 bytes length) */
anSendBuffer[ 0 ] = 0x80;
@ -284,7 +283,7 @@ static unsigned fritzboxPutMessage( int nSock, unsigned nApplId, unsigned char *
memcpy( anSendBuffer + 3, pnMsg, sizeof( anSendBuffer ) - 3 );
nLen += 3;
/* write data to socket */
/* write data to socket */
nNum = write( nSock, anSendBuffer, nLen );
if ( nNum != nLen ) {
CapiDebug( 3, "Error: Unable send CAPI_PUT_MESSAGE (nApplId: %d, Ctrl: %d, Cmd: %d, SubCmd: %d)", nApplId, anSendBuffer[ 11 ] & 0x7F, CAPIMSG_COMMAND( pnMsg ), CAPIMSG_SUBCOMMAND( pnMsg ) );
@ -323,18 +322,18 @@ static int readSocket( int nSock, unsigned char *pnBuffer, int nLen ) {
nTotLen -= nActLen;
nReadLen += nActLen;
}
nActLen = 0;
}
if ( nActLen > 0 ) {
nReadLen += nActLen;
}
if ( nReadLen != nOrigLen ) {
return 0;
}
if ( nLen == 0 ) {
nLen = nOrigLen;
}
@ -364,7 +363,7 @@ static unsigned fritzboxGetMessage( int nSock, unsigned nApplId, unsigned char *
size_t nBufSize;
/* try to get a new buffer from queue */
if ( ( *ppnBuffer = pnBuffer = ( unsigned char * ) capi_get_buffer( nApplId, &nBufSize, &nOffset ) ) == 0 ) {
if ( ( *ppnBuffer = pnBuffer = ( unsigned char * ) get_buffer( nApplId, &nBufSize, &nOffset ) ) == 0 ) {
CapiDebug( 1, "[%s]: could not get buffer\n", __FUNCTION__ );
return CapiMsgOSResourceErr;
}
@ -377,7 +376,7 @@ static unsigned fritzboxGetMessage( int nSock, unsigned nApplId, unsigned char *
/* DATA_B3? Then set buffer address */
if ( CAPIMSG_COMMAND( pnBuffer ) == CAPI_DATA_B3 && CAPIMSG_SUBCOMMAND( pnBuffer ) == CAPI_IND ) {
capi_save_datahandle( nApplId, nOffset, CAPIMSG_U16( pnBuffer, 18 ), CAPIMSG_U32( pnBuffer, 8 ) );
save_datahandle( nApplId, nOffset, CAPIMSG_U16( pnBuffer, 18 ), CAPIMSG_U32( pnBuffer, 8 ) );
/* patch datahandle */
capimsg_setu16( pnBuffer, 18, nOffset );
@ -411,14 +410,14 @@ static unsigned fritzboxGetMessage( int nSock, unsigned nApplId, unsigned char *
pnBuffer[ 29 ] = ( nData >> 56 ) & 0xFF;
}
CapiDebug( 3, "CAPI_GET_MESSAGE (nApplId: %d, Ctrl: %d)", nApplId, pnBuffer[ 8 ] & 0x7F );
CapiDebug( 3, "CAPI_GET_MESSAGE (nApplId: %d, Ctrl: %d)", nApplId, pnBuffer[ 8 ] & 0x7F );
/* keep buffer */
return CapiNoError;
}
/* buffer is not needed, return it */
capi_return_buffer( nApplId, nOffset );
return_buffer( nApplId, nOffset );
if ( ( CAPIMSG_COMMAND( pnBuffer ) == CAPI_DISCONNECT ) && ( CAPIMSG_SUBCOMMAND( pnBuffer ) == CAPI_IND ) ) {
/* we got a disconnect, cleanup buffers */
@ -429,7 +428,7 @@ static unsigned fritzboxGetMessage( int nSock, unsigned nApplId, unsigned char *
}
/* uh, error occured while reading capi message, return buffer and check for errors */
capi_return_buffer( nApplId, nOffset );
return_buffer( nApplId, nOffset );
if ( nRet == 0 ) {
return CapiReceiveQueueEmpty;
}
@ -555,7 +554,6 @@ static struct sModuleOperations sFritzBox = {
NULL,
NULL,
NULL,
NULL,
NULL
};

View File

@ -4,7 +4,7 @@
#define CAPI20_FB_MANUF "AVM Berlin"
#define CAPI20_FB_SERIAL "0004711"
#define CAPI20_FB_VERSION_MAJOR 0
#define CAPI20_FB_VERSION_MINOR 5
#define CAPI20_FB_VERSION_MAJOR 0
#define CAPI20_FB_VERSION_MINOR 5
#endif

View File

@ -15,7 +15,6 @@
#include <fcntl.h>
#include <linux/capi.h>
#include <errno.h>
#include <unistd.h>
#include "capi20.h"
#include "capi_mod.h"
#include "capi_mod_fritzbox.h"
@ -34,13 +33,6 @@
#define RCAPI_AUTH_USER_REQ CAPICMD(0xff, 0x00)
#define RCAPI_AUTH_USER_CONF CAPICMD(0xff, 0x01)
/* add a fixed trace file for now */
static char *rcapiTraceFile = "/tmp/rcapiTraceFile";
static char *getTraceFile(void)
{
return rcapiTraceFile;
}
/**
* \brief Create a socket to hostname:port
* \return socket number
@ -67,7 +59,7 @@ static int rcapiOpenSocket( void ) {
if ( !connect( nHandle, ( struct sockaddr * ) &sAddr, sizeof( sAddr ) ) ) {
/* no errors, return handle */
return nHandle;
}
}
}
close( nHandle );
@ -265,7 +257,7 @@ static unsigned rcapiRegister( unsigned nMaxB3Connection, unsigned nMaxB3Blks, u
nErrCode = get_word( &pnPtr );
if ( nErrCode == CapiNoError ) {
/* No error, allocate new applid and set it to pnApplId */
*pnApplId = capi_alloc_applid(nSock);
*pnApplId = alloc_applid( nSock );
} else {
/* wuhh, error occured, close socket and return -1 */
close( nSock );
@ -289,7 +281,7 @@ static unsigned rcapiPutMessage( int nSock, unsigned nApplId, unsigned char *pnM
int nSubCommand = CAPIMSG_SUBCOMMAND( pnMsg );
int nNum;
nLen = capi_processMessage( pnMsg, nApplId, nCommand, nSubCommand, nLen );
nLen = processMessage( pnMsg, nApplId, nCommand, nSubCommand, nLen );
nLen += 2;
put_netword( &pnSendBuffer, nLen );
@ -298,7 +290,7 @@ static unsigned rcapiPutMessage( int nSock, unsigned nApplId, unsigned char *pnM
/* write data to socket */
nNum = write( nSock, anSendBuffer, nLen );
if ( nNum != nLen ) {
return CapiMsgOSResourceErr;
return CapiMsgOSResourceErr;
}
return CapiNoError;
@ -319,7 +311,7 @@ static unsigned rcapiGetMessage( int nSock, unsigned nApplId, unsigned char **pp
int nRet;
/* try to get a new buffer from queue */
if ( ( *ppnBuffer = pnBuffer = ( unsigned char * ) capi_get_buffer( nApplId, &nBufSize, &nOffset ) ) == 0 ) {
if ( ( *ppnBuffer = pnBuffer = ( unsigned char * ) get_buffer( nApplId, &nBufSize, &nOffset ) ) == 0 ) {
return CapiMsgOSResourceErr;
}
@ -332,7 +324,7 @@ static unsigned rcapiGetMessage( int nSock, unsigned nApplId, unsigned char **pp
/* DATA_B3? Then set buffer address */
if ( ( CAPIMSG_COMMAND( pnBuffer ) == CAPI_DATA_B3 ) && ( CAPIMSG_SUBCOMMAND( pnBuffer ) == CAPI_IND ) ) {
capi_save_datahandle( nApplId, nOffset, CAPIMSG_U16( pnBuffer, 18 ), CAPIMSG_U32( pnBuffer, 8 ) );
save_datahandle( nApplId, nOffset, CAPIMSG_U16( pnBuffer, 18 ), CAPIMSG_U32( pnBuffer, 8 ) );
/* patch datahandle */
capimsg_setu16( pnBuffer, 18, nOffset );
@ -367,7 +359,7 @@ static unsigned rcapiGetMessage( int nSock, unsigned nApplId, unsigned char **pp
}
/* buffer is not needed, return it */
capi_return_buffer( nApplId, nOffset );
return_buffer( nApplId, nOffset );
if ( ( CAPIMSG_COMMAND( pnBuffer ) == CAPI_DISCONNECT) && ( CAPIMSG_SUBCOMMAND( pnBuffer ) == CAPI_IND ) ) {
cleanup_buffers_for_plci( nApplId, CAPIMSG_U32( pnBuffer, 8 ) );
@ -376,7 +368,7 @@ static unsigned rcapiGetMessage( int nSock, unsigned nApplId, unsigned char **pp
return CapiNoError;
}
capi_return_buffer( nApplId, nOffset );
return_buffer( nApplId, nOffset );
if ( nRet == 0 ) {
return CapiReceiveQueueEmpty;
@ -501,7 +493,6 @@ static struct sModuleOperations sRemoteCapi = {
NULL,
NULL,
NULL,
NULL,
NULL
};

View File

@ -16,9 +16,7 @@
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include <sys/ioctl.h>
#include <linux/capi.h>
#include <unistd.h>
#include "capi20.h"
#include "capi_mod.h"
@ -120,7 +118,7 @@ static unsigned standardRegister( unsigned nMaxB3Connection, unsigned nMaxB3Blks
close( nHandle );
return -6;
}
nApplId = capi_alloc_applid(nHandle);
nApplId = alloc_applid( nHandle );
}
}
@ -142,7 +140,7 @@ static unsigned standardPutMessage( int nHandle, unsigned nApplId, unsigned char
int nSubCommand = CAPIMSG_SUBCOMMAND( pnMsg );
int nNum;
nLen = capi_processMessage( pnMsg, nApplId, nCommand, nSubCommand, nLen );
nLen = processMessage( pnMsg, nApplId, nCommand, nSubCommand, nLen );
nNum = write( nHandle, pnMsg, nLen );
if ( nNum != nLen ) {
@ -179,7 +177,7 @@ static unsigned standardGetMessage( int nHandle, unsigned nApplId, unsigned char
int nRet;
size_t nBufSize;
if ( ( *ppnBuffer = pnBuffer = ( unsigned char * ) capi_get_buffer( nApplId, &nBufSize, &nOffset ) ) == 0 ) {
if ( ( *ppnBuffer = pnBuffer = ( unsigned char * ) get_buffer( nApplId, &nBufSize, &nOffset ) ) == 0 ) {
return CapiMsgOSResourceErr;
}
@ -189,7 +187,7 @@ static unsigned standardGetMessage( int nHandle, unsigned nApplId, unsigned char
CAPIMSG_SETAPPID( pnBuffer, nApplId );
if ( ( CAPIMSG_COMMAND( pnBuffer ) == CAPI_DATA_B3 ) && ( CAPIMSG_SUBCOMMAND( pnBuffer ) == CAPI_IND ) ) {
capi_save_datahandle( nApplId, nOffset, CAPIMSG_U16( pnBuffer, 18 ), CAPIMSG_U32( pnBuffer, 8 ) );
save_datahandle( nApplId, nOffset, CAPIMSG_U16( pnBuffer, 18 ), CAPIMSG_U32( pnBuffer, 8 ) );
/* patch datahandle */
capimsg_setu16( pnBuffer, 18, nOffset );
@ -225,7 +223,7 @@ static unsigned standardGetMessage( int nHandle, unsigned nApplId, unsigned char
return CapiNoError;
}
capi_return_buffer( nApplId, nOffset );
return_buffer( nApplId, nOffset );
if ( ( CAPIMSG_COMMAND( pnBuffer ) == CAPI_DISCONNECT) && ( CAPIMSG_SUBCOMMAND( pnBuffer ) == CAPI_IND ) ) {
cleanup_buffers_for_plci( nApplId, CAPIMSG_U32( pnBuffer, 8 ) );
@ -234,7 +232,7 @@ static unsigned standardGetMessage( int nHandle, unsigned nApplId, unsigned char
return CapiNoError;
}
capi_return_buffer( nApplId, nOffset );
return_buffer( nApplId, nOffset );
if ( nRet == 0 ) {
return CapiReceiveQueueEmpty;
}
@ -349,7 +347,7 @@ static unsigned standardGetProfile( int nHandle, unsigned nController, unsigned
* \return error code
*/
static int standardGetFlags( unsigned nApplId, unsigned *pnFlags ) {
if ( ioctl(capi_applid2fd( nApplId ), CAPI_GET_FLAGS, pnFlags) < 0) {
if ( ioctl( applid2fd( nApplId ), CAPI_GET_FLAGS, pnFlags ) < 0 ) {
return CapiMsgOSResourceErr;
}
@ -363,7 +361,7 @@ static int standardGetFlags( unsigned nApplId, unsigned *pnFlags ) {
* \return error code
*/
static int standardSetFlags( unsigned nApplId, unsigned nFlags ) {
if ( ioctl(capi_applid2fd( nApplId ), CAPI_SET_FLAGS, &nFlags) < 0) {
if ( ioctl( applid2fd( nApplId ), CAPI_SET_FLAGS, &nFlags ) < 0 ) {
return CapiMsgOSResourceErr;
}
@ -377,7 +375,7 @@ static int standardSetFlags( unsigned nApplId, unsigned nFlags ) {
* \return error code
*/
static int standardClearFlags( unsigned nApplId, unsigned nFlags ) {
if ( ioctl(capi_applid2fd( nApplId ), CAPI_CLR_FLAGS, &nFlags) < 0) {
if ( ioctl( applid2fd( nApplId ), CAPI_CLR_FLAGS, &nFlags ) < 0 ) {
return CapiMsgOSResourceErr;
}
@ -395,7 +393,7 @@ static int standardClearFlags( unsigned nApplId, unsigned nFlags ) {
static char *standardGetTtyDeviceName( unsigned nApplId, unsigned nNcci, char *pnBuffer, size_t nSize ) {
int nUnit;
nUnit = ioctl(capi_applid2fd( nApplId ), CAPI_NCCI_GETUNIT, &nNcci);
nUnit = ioctl( applid2fd( nApplId ), CAPI_NCCI_GETUNIT, &nNcci );
if ( nUnit < 0 ) {
return NULL;
}
@ -416,7 +414,7 @@ static char *standardGetTtyDeviceName( unsigned nApplId, unsigned nNcci, char *p
static char *standardGetRawDeviceName( unsigned nApplId, unsigned nNcci, char *pnBuffer, size_t nSize ) {
int nUnit;
nUnit = ioctl(capi_applid2fd( nApplId ), CAPI_NCCI_GETUNIT, &nNcci);
nUnit = ioctl( applid2fd( nApplId ), CAPI_NCCI_GETUNIT, &nNcci );
if ( nUnit < 0 ) {
return NULL;
}
@ -433,7 +431,7 @@ static char *standardGetRawDeviceName( unsigned nApplId, unsigned nNcci, char *p
* \return error code
*/
static int standardGetNcciOpenCount( unsigned nApplId, unsigned nNcci ) {
return ioctl(capi_applid2fd( nApplId ), CAPI_NCCI_OPENCOUNT, &nNcci);
return ioctl( applid2fd( nApplId ), CAPI_NCCI_OPENCOUNT, &nNcci );
}
/** Module operations structure */
@ -447,7 +445,6 @@ static struct sModuleOperations sStandard = {
standardGetVersion,
standardGetSerialNumber,
standardGetProfile,
NULL,
standardGetFlags,
standardSetFlags,
standardClearFlags,

115
capi20.new/capicmd.h Normal file
View File

@ -0,0 +1,115 @@
/*
*
* CAPI 2.0 Interface for Linux
*
* Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
*
* This program is free software and may be modified and
* distributed under the terms of the GNU Public License.
*
*/
#ifndef __CAPICMD_H__
#define __CAPICMD_H__
#define CAPI_MSG_BASELEN 8
#define CAPI_DATA_B3_REQ_LEN (CAPI_MSG_BASELEN+4+4+2+2+2)
#define CAPI_DATA_B3_RESP_LEN (CAPI_MSG_BASELEN+4+2)
/*----- CAPI commands -----*/
#define CAPI_ALERT 0x01
#define CAPI_CONNECT 0x02
#define CAPI_CONNECT_ACTIVE 0x03
#define CAPI_CONNECT_B3_ACTIVE 0x83
#define CAPI_CONNECT_B3 0x82
#define CAPI_CONNECT_B3_T90_ACTIVE 0x88
#define CAPI_DATA_B3 0x86
#define CAPI_DISCONNECT_B3 0x84
#define CAPI_DISCONNECT 0x04
#define CAPI_FACILITY 0x80
#define CAPI_INFO 0x08
#define CAPI_LISTEN 0x05
#define CAPI_MANUFACTURER 0xff
#define CAPI_RESET_B3 0x87
#define CAPI_SELECT_B_PROTOCOL 0x41
/*----- CAPI subcommands -----*/
#define CAPI_REQ 0x80
#define CAPI_CONF 0x81
#define CAPI_IND 0x82
#define CAPI_RESP 0x83
/*----- CAPI combined commands -----*/
#define CAPICMD(cmd,subcmd) (((cmd)<<8)|(subcmd))
#define CAPI_DISCONNECT_REQ CAPICMD(CAPI_DISCONNECT,CAPI_REQ)
#define CAPI_DISCONNECT_CONF CAPICMD(CAPI_DISCONNECT,CAPI_CONF)
#define CAPI_DISCONNECT_IND CAPICMD(CAPI_DISCONNECT,CAPI_IND)
#define CAPI_DISCONNECT_RESP CAPICMD(CAPI_DISCONNECT,CAPI_RESP)
#define CAPI_ALERT_REQ CAPICMD(CAPI_ALERT,CAPI_REQ)
#define CAPI_ALERT_CONF CAPICMD(CAPI_ALERT,CAPI_CONF)
#define CAPI_CONNECT_REQ CAPICMD(CAPI_CONNECT,CAPI_REQ)
#define CAPI_CONNECT_CONF CAPICMD(CAPI_CONNECT,CAPI_CONF)
#define CAPI_CONNECT_IND CAPICMD(CAPI_CONNECT,CAPI_IND)
#define CAPI_CONNECT_RESP CAPICMD(CAPI_CONNECT,CAPI_RESP)
#define CAPI_CONNECT_ACTIVE_REQ CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_REQ)
#define CAPI_CONNECT_ACTIVE_CONF CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_CONF)
#define CAPI_CONNECT_ACTIVE_IND CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_IND)
#define CAPI_CONNECT_ACTIVE_RESP CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_RESP)
#define CAPI_SELECT_B_PROTOCOL_REQ CAPICMD(CAPI_SELECT_B_PROTOCOL,CAPI_REQ)
#define CAPI_SELECT_B_PROTOCOL_CONF CAPICMD(CAPI_SELECT_B_PROTOCOL,CAPI_CONF)
#define CAPI_CONNECT_B3_ACTIVE_REQ CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_REQ)
#define CAPI_CONNECT_B3_ACTIVE_CONF CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_CONF)
#define CAPI_CONNECT_B3_ACTIVE_IND CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_IND)
#define CAPI_CONNECT_B3_ACTIVE_RESP CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_RESP)
#define CAPI_CONNECT_B3_REQ CAPICMD(CAPI_CONNECT_B3,CAPI_REQ)
#define CAPI_CONNECT_B3_CONF CAPICMD(CAPI_CONNECT_B3,CAPI_CONF)
#define CAPI_CONNECT_B3_IND CAPICMD(CAPI_CONNECT_B3,CAPI_IND)
#define CAPI_CONNECT_B3_RESP CAPICMD(CAPI_CONNECT_B3,CAPI_RESP)
#define CAPI_CONNECT_B3_T90_ACTIVE_IND CAPICMD(CAPI_CONNECT_B3_T90_ACTIVE,CAPI_IND)
#define CAPI_CONNECT_B3_T90_ACTIVE_RESP CAPICMD(CAPI_CONNECT_B3_T90_ACTIVE,CAPI_RESP)
#define CAPI_DATA_B3_REQ CAPICMD(CAPI_DATA_B3,CAPI_REQ)
#define CAPI_DATA_B3_CONF CAPICMD(CAPI_DATA_B3,CAPI_CONF)
#define CAPI_DATA_B3_IND CAPICMD(CAPI_DATA_B3,CAPI_IND)
#define CAPI_DATA_B3_RESP CAPICMD(CAPI_DATA_B3,CAPI_RESP)
#define CAPI_DISCONNECT_B3_REQ CAPICMD(CAPI_DISCONNECT_B3,CAPI_REQ)
#define CAPI_DISCONNECT_B3_CONF CAPICMD(CAPI_DISCONNECT_B3,CAPI_CONF)
#define CAPI_DISCONNECT_B3_IND CAPICMD(CAPI_DISCONNECT_B3,CAPI_IND)
#define CAPI_DISCONNECT_B3_RESP CAPICMD(CAPI_DISCONNECT_B3,CAPI_RESP)
#define CAPI_RESET_B3_REQ CAPICMD(CAPI_RESET_B3,CAPI_REQ)
#define CAPI_RESET_B3_CONF CAPICMD(CAPI_RESET_B3,CAPI_CONF)
#define CAPI_RESET_B3_IND CAPICMD(CAPI_RESET_B3,CAPI_IND)
#define CAPI_RESET_B3_RESP CAPICMD(CAPI_RESET_B3,CAPI_RESP)
#define CAPI_LISTEN_REQ CAPICMD(CAPI_LISTEN,CAPI_REQ)
#define CAPI_LISTEN_CONF CAPICMD(CAPI_LISTEN,CAPI_CONF)
#define CAPI_MANUFACTURER_REQ CAPICMD(CAPI_MANUFACTURER,CAPI_REQ)
#define CAPI_MANUFACTURER_CONF CAPICMD(CAPI_MANUFACTURER,CAPI_CONF)
#define CAPI_MANUFACTURER_IND CAPICMD(CAPI_MANUFACTURER,CAPI_IND)
#define CAPI_MANUFACTURER_RESP CAPICMD(CAPI_MANUFACTURER,CAPI_RESP)
#define CAPI_FACILITY_REQ CAPICMD(CAPI_FACILITY,CAPI_REQ)
#define CAPI_FACILITY_CONF CAPICMD(CAPI_FACILITY,CAPI_CONF)
#define CAPI_FACILITY_IND CAPICMD(CAPI_FACILITY,CAPI_IND)
#define CAPI_FACILITY_RESP CAPICMD(CAPI_FACILITY,CAPI_RESP)
#define CAPI_INFO_REQ CAPICMD(CAPI_INFO,CAPI_REQ)
#define CAPI_INFO_CONF CAPICMD(CAPI_INFO,CAPI_CONF)
#define CAPI_INFO_IND CAPICMD(CAPI_INFO,CAPI_IND)
#define CAPI_INFO_RESP CAPICMD(CAPI_INFO,CAPI_RESP)
#endif /* __CAPICMD_H__ */

View File

@ -1,7 +1,7 @@
/*
* $Id: capidyn.c,v 1.4 2004/01/16 15:27:11 calle Exp $
*
* $Log: capidyn.c,v $
* $Id$
*
* $Log$
* Revision 1.4 2004/01/16 15:27:11 calle
* remove several warnings.
*
@ -20,13 +20,15 @@
#include <sys/types.h>
#define _LINUX_LIST_H
#ifndef WIN32
#include <linux/capi.h>
#endif
#include <string.h>
#include "capi20.h"
#include <dlfcn.h>
#define LIBCAPI "libcapi20.so.3"
#define LIBCAPI "libcapi20.so"
static int loadlib(void);
/* ---------------------------------------------------------------------- */
@ -118,7 +120,7 @@ capi20_get_version(unsigned Ctrl, unsigned char *Buf)
static unsigned char *
(*fptr_capi20_get_serial_number)(unsigned, unsigned char *);
unsigned char *
unsigned char *
capi20_get_serial_number(unsigned Ctrl, unsigned char *Buf)
{
if (loadlib() < 0)

View File

@ -1,41 +1,7 @@
/*
* $Id: capifunc.c,v 1.9 2005/03/08 07:26:47 keil Exp $
*
* $Log: capifunc.c,v $
* Revision 1.9 2005/03/08 07:26:47 keil
* - add SENDING_COMPLETE to INFO_REQ CONNECT_REQ and CONNECT_IND
* - remove SENDING_COMPLETE parameter (always NULL) from capi_fill_DISCONNECT_REQ
*
* Revision 1.8 2005/02/22 11:39:43 keil
* for backward compatibility the libcapi20 can now compiled to support the
* old (buggy) version2 ABI. This is not for future developments. This is only
* to support old binaries, which are linked against the old V2 lib.
*
* Revision 1.7 2005/02/21 17:37:06 keil
* libcapi20 version 3.0.0
* - add SENDING COMPLETE in ALERT_REQ
* - add Globalconfiguration to CONNECT_REQ/RESP and SELECT_B_PROTOCOL_REQ
*
* * NOTE: incompatible to 2.X.Y versions
*
* Revision 1.6 2004/10/06 15:24:43 calle
* - "SendingComplete"-Patch reverted => 2.0.8 was not binaer compartible
* - Bugfix: capi20_register() with MaxB3Connection == 0 results in a
* core dump. Now at least one buffer is allocated.
*
* Revision 1.5 2004/06/14 11:23:48 calle
* Erweiterungen fuer ALERT_REQ.
*
* Revision 1.4 1999/09/10 17:20:33 calle
* Last changes for proposed standards (CAPI 2.0):
* - AK1-148 "Linux Extention"
* - AK1-155 "Support of 64-bit Applications"
*
* Revision 1.3 1998/08/30 09:57:17 calle
* I hope it is know readable for everybody.
*
* Revision 1.1 1998/08/25 16:33:19 calle
* Added CAPI2.0 library. First Version.
* This program is free software and may be modified and
* distributed under the terms of the GNU Public License.
*
*/

View File

@ -1,6 +1,11 @@
#ifndef __CAPIUTILS_H__
#define __CAPIUTILS_H__
/*
* This program is free software and may be modified and
* distributed under the terms of the GNU Public License.
*/
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
@ -111,7 +116,7 @@ typedef enum { CAPI_COMPOSE = 0, CAPI_DEFAULT = 1 } _cmstruct;
#define CAPIMSG_U8(m, off) (m[off])
#define CAPIMSG_U16(m, off) (m[off]|(m[(off)+1]<<8))
#define CAPIMSG_U32(m, off) (m[off]|(m[(off)+1]<<8)|(m[(off)+2]<<16)|(m[(off)+3]<<24))
#define CAPIMSG_U64(m, off) (((_cqword)CAPIMSG_U32(m, off))|(((_cqword)CAPIMSG_U32(m, off+4))<<32))
#define CAPIMSG_U64(m, off) (((_cqword)CAPIMSG_U32(m, off))|(((_cqword)CAPIMSG_U32(m, off+4))<<32))
#define CAPIMSG_LEN(m) CAPIMSG_U16(m,0)
#define CAPIMSG_APPID(m) CAPIMSG_U16(m,2)
#define CAPIMSG_COMMAND(m) CAPIMSG_U8(m,4)
@ -219,7 +224,7 @@ typedef struct {
_cdword Function;
#ifndef CAPI_LIBRARY_V2
_cstruct Globalconfiguration;
#endif
#endif
_cstruct HLC;
_cword Info;
_cstruct InfoElement;
@ -236,7 +241,7 @@ typedef struct {
_cstruct Useruserdata;
#ifndef CAPI_LIBRARY_V2
_cstruct SendingComplete;
#endif
#endif
unsigned char *Data;
/* intern */
@ -322,10 +327,6 @@ char *capi_info2str(_cword reason);
#define capi20_cmd2str capi_cmd2str
char *capi_cmd2str(_cbyte cmd, _cbyte subcmd);
/*
* WARNING: The following two functions use a single static buffer and
* are not thread-safe.
*/
#define capi20_cmsg2str capi_cmsg2str
char *capi_cmsg2str(_cmsg * cmsg);
@ -384,7 +385,7 @@ char *capi_message2str(_cbyte * msg);
#ifndef CAPI_LIBRARY_V2
#define CONNECT_REQ_GLOBALCONFIGURATION(x) ((x)->Globalconfiguration)
/* all layer parameter */
#endif
#endif
#define CONNECT_REQ_BC(x) ((x)->BC)
/* Bearer Capability */
#define CONNECT_REQ_LLC(x) ((x)->LLC)

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
timestamp='2004-02-23'
timestamp='2008-01-16'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -21,14 +22,15 @@ timestamp='2004-02-23'
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
# 02110-1301, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
#
@ -70,8 +72,8 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -83,11 +85,11 @@ Try \`$me --help' for more information."
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
echo "$timestamp" ; exit 0 ;;
echo "$timestamp" ; exit ;;
--version | -v )
echo "$version" ; exit 0 ;;
echo "$version" ; exit ;;
--help | --h* | -h )
echo "$usage"; exit 0 ;;
echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@ -99,7 +101,7 @@ while test $# -gt 0 ; do
*local*)
# First pass through any local machine types.
echo $1
exit 0;;
exit ;;
* )
break ;;
@ -118,8 +120,9 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@ -145,7 +148,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis)
-apple | -axis | -knuth | -cray)
os=
basic_machine=$1
;;
@ -163,13 +166,17 @@ case $os in
os=-chorusos
basic_machine=$1
;;
-chorusrdb)
os=-chorusrdb
-chorusrdb)
os=-chorusrdb
basic_machine=$1
;;
;;
-hiux*)
os=-hiuxwe2
;;
-sco6)
os=-sco5v6
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@ -186,6 +193,10 @@ case $os in
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@ -230,14 +241,16 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| m32r | m68000 | m68k | m88k | mcore \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@ -246,6 +259,7 @@ case $basic_machine in
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
@ -254,20 +268,24 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| mt \
| msp430 \
| nios | nios2 \
| ns16k | ns32k \
| openrisc | or32 \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| score \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
| strongarm \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xscale | xstormy16 | xtensa \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
@ -278,6 +296,9 @@ case $basic_machine in
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
ms1)
basic_machine=mt-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
@ -297,20 +318,20 @@ case $basic_machine in
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
| bs2000-* \
| avr-* | avr32-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | cydra-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| m32r-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@ -319,6 +340,7 @@ case $basic_machine in
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
@ -326,27 +348,35 @@ case $basic_machine in
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
| nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
| xtensa-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-*)
;;
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
basic_machine=$basic_machine-unknown
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
@ -363,7 +393,7 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
abacus)
abacus)
basic_machine=abacus-unknown
;;
adobe68k)
@ -417,6 +447,14 @@ case $basic_machine in
basic_machine=ns32k-sequent
os=-dynix
;;
blackfin)
basic_machine=bfin-unknown
os=-linux
;;
blackfin-*)
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
c90)
basic_machine=c90-cray
os=-unicos
@ -445,13 +483,20 @@ case $basic_machine in
basic_machine=j90-cray
os=-unicos
;;
cr16c)
basic_machine=cr16c-unknown
craynv)
basic_machine=craynv-cray
os=-unicosmp
;;
cr16)
basic_machine=cr16-unknown
os=-elf
;;
crds | unos)
basic_machine=m68k-crds
;;
crisv32 | crisv32-* | etraxfs*)
basic_machine=crisv32-axis
;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
@ -481,6 +526,10 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
@ -631,6 +680,14 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
;;
m68knommu-*)
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
m88k-omron*)
basic_machine=m88k-omron
;;
@ -646,6 +703,10 @@ case $basic_machine in
basic_machine=i386-pc
os=-mingw32
;;
mingw32ce)
basic_machine=arm-unknown
os=-mingw32ce
;;
miniframe)
basic_machine=m68000-convergent
;;
@ -659,10 +720,6 @@ case $basic_machine in
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
mmix*)
basic_machine=mmix-knuth
os=-mmixware
;;
monitor)
basic_machine=m68k-rom68k
os=-coff
@ -675,6 +732,9 @@ case $basic_machine in
basic_machine=i386-pc
os=-msdos
;;
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
mvs)
basic_machine=i370-ibm
os=-mvs
@ -743,10 +803,6 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
nv1)
basic_machine=nv1-cray
os=-unicosmp
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@ -754,9 +810,8 @@ case $basic_machine in
basic_machine=hppa1.1-oki
os=-proelf
;;
or32 | or32-*)
openrisc | openrisc-*)
basic_machine=or32-unknown
os=-coff
;;
os400)
basic_machine=powerpc-ibm
@ -778,6 +833,14 @@ case $basic_machine in
basic_machine=i860-intel
os=-osf
;;
parisc)
basic_machine=hppa-unknown
os=-linux
;;
parisc-*)
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
pbd)
basic_machine=sparc-tti
;;
@ -787,6 +850,12 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pc98)
basic_machine=i386-pc
;;
pc98-*)
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@ -843,6 +912,10 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
rdos)
basic_machine=i386-pc
os=-rdos
;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@ -869,6 +942,10 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sde)
basic_machine=mipsisa32-sde
os=-elf
;;
sei)
basic_machine=mips-sei
os=-seiux
@ -880,6 +957,9 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
sh5el)
basic_machine=sh5le-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
@ -969,6 +1049,10 @@ case $basic_machine in
basic_machine=tic6x-unknown
os=-coff
;;
tile*)
basic_machine=tile-unknown
os=-linux-gnu
;;
tx39)
basic_machine=mipstx39-unknown
;;
@ -1029,6 +1113,10 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
xbox)
basic_machine=i686-pc
os=-mingw32
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
@ -1059,6 +1147,9 @@ case $basic_machine in
romp)
basic_machine=romp-ibm
;;
mmix)
basic_machine=mmix-knuth
;;
rs6000)
basic_machine=rs6000-ibm
;;
@ -1075,13 +1166,10 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
sparc | sparcv9 | sparcv9b)
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
@ -1154,20 +1242,23 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@ -1185,7 +1276,7 @@ case $os in
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
@ -1194,6 +1285,9 @@ case $os in
-linux-dietlibc)
os=-linux-dietlibc
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
-sunos5*)
os=`echo $os | sed -e 's|sunos5|solaris2|'`
;;
@ -1291,6 +1385,9 @@ case $os in
-kaos*)
os=-kaos
;;
-zvmoe)
os=-zvmoe
;;
-none)
;;
*)
@ -1313,6 +1410,12 @@ else
# system, and we'll never get to this point.
case $basic_machine in
score-*)
os=-elf
;;
spu-*)
os=-elf
;;
*-acorn)
os=-riscix1.2
;;
@ -1322,9 +1425,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
;;
c4x-* | tic4x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@ -1350,6 +1453,9 @@ case $basic_machine in
m68*-cisco)
os=-aout
;;
mep-*)
os=-elf
;;
mips*-cisco)
os=-elf
;;
@ -1368,9 +1474,15 @@ case $basic_machine in
*-be)
os=-beos
;;
*-haiku)
os=-haiku
;;
*-ibm)
os=-aix
;;
*-knuth)
os=-mmixware
;;
*-wec)
os=-proelf
;;
@ -1536,7 +1648,7 @@ case $basic_machine in
esac
echo $basic_machine$os
exit 0
exit
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)

13936
capi20.new/configure vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@ -1,60 +1,47 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.68])
AC_INIT(capi20.c)
AC_ARG_ENABLE([V2],
AS_HELP_STRING([--enable-V2],[build libcapi20 version 2 compatible library]),
[case "${enableval}" in
yes) LIBCAPI_VERSION=2
LIBCAPI_VERSION_AGE=0
LIBCAPI_VERSION_RELEASE=12
AC_DEFINE([CAPI_LIBRARY_V2],1, [build libcapi20 version 2 compatible library])
LIBCAPI_VERSION_RELEASE=10
AC_DEFINE([CAPI_LIBRARY_V2],1)
;;
no) LIBCAPI_VERSION=3
LIBCAPI_VERSION_AGE=0
LIBCAPI_VERSION_RELEASE=6
LIBCAPI_VERSION_RELEASE=5
;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-V2) ;;
esac],
[
LIBCAPI_VERSION=3
LIBCAPI_VERSION_AGE=0
LIBCAPI_VERSION_RELEASE=6
LIBCAPI_VERSION_RELEASE=5
])
AM_INIT_AUTOMAKE([libcapi20],${LIBCAPI_VERSION}.${LIBCAPI_VERSION_RELEASE})
AC_PREFIX_DEFAULT([/usr])
AM_INIT_AUTOMAKE(libcapi20,${LIBCAPI_VERSION}.${LIBCAPI_VERSION_RELEASE})
AC_PREFIX_DEFAULT(/usr)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AM_PROG_LIBTOOL
AC_PROG_SED
AC_SUBST(LIBTOOL_DEPS)
AC_OBJEXT
AC_PATH_PROG(SED,sed)
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h)
AC_CHECK_HEADERS(linux/capi.h)
AC_COMPUTE_INT([CAPI_MODULE_LOADER_VERSION], [[MODULE_LOADER_VERSION]],
[
#include <sys/types.h>
#include "capi_mod.h"
],
[AC_MSG_ERROR([capi library MODULE_LOADER_VERSION cannot be calculated])]
)
AC_MSG_RESULT([Capi library module loader version ${CAPI_MODULE_LOADER_VERSION} detected])
AC_SUBST(CAPI_MODULE_LOADER_VERSION)
dnl Checks for library functions.
AC_CHECK_FUNCS(select)
dnl Define which variables to substitute & which files to generate
AC_SUBST(CAPI_LIBRARY_V2)
AC_SUBST(INSTALL)
AC_SUBST(LIBCAPI_VERSION)
AC_SUBST(LIBCAPI_VERSION_AGE)
AC_SUBST(LIBCAPI_VERSION_RELEASE)
AC_CONFIG_HEADERS(config.h)
AC_OUTPUT(Makefile capi20.pc)

View File

@ -1,82 +1,7 @@
/*
* $Id: convert.c,v 1.20 2006/08/08 13:23:29 keil Exp $
*
* $Log: convert.c,v $
* Revision 1.20 2006/08/08 13:23:29 keil
* some endian fixes for BIGENDIAN systems
*
* Revision 1.19 2005/05/09 08:23:01 calle
* - added SendingComplete to CONNECT_RESP (no funktions changed).
*
* Revision 1.18 2005/03/08 07:26:47 keil
* - add SENDING_COMPLETE to INFO_REQ CONNECT_REQ and CONNECT_IND
* - remove SENDING_COMPLETE parameter (always NULL) from capi_fill_DISCONNECT_REQ
*
* Revision 1.17 2005/03/04 11:45:12 calle
* SendingComplete was missing for DISCONNECT_REQ ...
*
* Revision 1.16 2005/03/04 10:57:05 calle
* Bugfix: CAPI_LIBRARY_V2 sone ifdef/ifndef where wrong.
*
* Revision 1.15 2005/02/22 11:39:43 keil
* for backward compatibility the libcapi20 can now compiled to support the
* old (buggy) version2 ABI. This is not for future developments. This is only
* to support old binaries, which are linked against the old V2 lib.
*
* Revision 1.14 2005/02/21 17:37:07 keil
* libcapi20 version 3.0.0
* - add SENDING COMPLETE in ALERT_REQ
* - add Globalconfiguration to CONNECT_REQ/RESP and SELECT_B_PROTOCOL_REQ
*
* * NOTE: incompatible to 2.X.Y versions
*
* Revision 1.13 2004/10/06 15:24:43 calle
* - "SendingComplete"-Patch reverted => 2.0.8 was not binaer compartible
* - Bugfix: capi20_register() with MaxB3Connection == 0 results in a
* core dump. Now at least one buffer is allocated.
*
* Revision 1.12 2004/06/14 11:23:48 calle
* Erweiterungen fuer ALERT_REQ.
*
* Revision 1.11 2001/03/01 14:59:11 paul
* Various patches to fix errors when using the newest glibc,
* replaced use of insecure tempnam() function
* and to remove warnings etc.
*
* Revision 1.10 2000/05/18 15:02:26 calle
* Updated _cmsg handling added new functions need by "capiconn".
*
* Revision 1.9 1999/12/06 17:08:30 calle
* - Splitted capi20.h into capi20.h and capiutils.h.
* - capi20.h: the functions from the CAPI-2.0 Spec
* - capiutils.h: the "CAPI-ADK" functions
* - bug in 64Bit-Support fixed.
*
* Revision 1.8 1999/10/20 16:43:17 calle
* - The CAPI20 library is now a shared library.
* - Arguments of function capi20_put_message swapped, to match capi spec.
* - All capi20 related subdirs converted to use automake.
* - Removed dependency to CONFIG_KERNELDIR where not needed.
*
* Revision 1.7 1999/09/15 08:10:44 calle
* Bugfix: error in 64Bit extention.
*
* Revision 1.6 1999/09/10 17:20:33 calle
* Last changes for proposed standards (CAPI 2.0):
* - AK1-148 "Linux Extention"
* - AK1-155 "Support of 64-bit Applications"
*
* Revision 1.5 1999/09/06 17:40:07 calle
* Changes for CAPI 2.0 Spec.
*
* Revision 1.4 1998/10/23 12:20:44 fritz
* Added some missing functions.
*
* Revision 1.3 1998/08/30 09:57:21 calle
* I hope it is know readable for everybody.
*
* Revision 1.1 1998/08/25 16:33:23 calle
* Added CAPI2.0 library. First Version.
* This program is free software and may be modified and
* distributed under the terms of the GNU Public License.
*
*/
#include <assert.h>
@ -86,6 +11,7 @@
#include <stddef.h>
#include <time.h>
#include <ctype.h>
#include <byteswap.h>
#include "capi20.h"
@ -170,58 +96,58 @@ char *capi_info2str(_cword reason)
/*-- error information concerning requested services -----*/
case 0x3001:
return "B1 protocol not supported";
case 0x3002:
case 0x3002:
return "B2 protocol not supported";
case 0x3003:
case 0x3003:
return "B3 protocol not supported";
case 0x3004:
case 0x3004:
return "B1 protocol parameter not supported";
case 0x3005:
case 0x3005:
return "B2 protocol parameter not supported";
case 0x3006:
case 0x3006:
return "B3 protocol parameter not supported";
case 0x3007:
case 0x3007:
return "B protocol combination not supported";
case 0x3008:
case 0x3008:
return "NCPI not supported";
case 0x3009:
case 0x3009:
return "CIP Value unknown";
case 0x300A:
case 0x300A:
return "Flags not supported (reserved bits)";
case 0x300B:
case 0x300B:
return "Facility not supported";
case 0x300C:
case 0x300C:
return "Data length not supported by current protocol";
case 0x300D:
case 0x300D:
return "Reset procedure not supported by current protocol";
/*-- informations about the clearing of a physical connection -----*/
case 0x3301:
case 0x3301:
return "Protocol error layer 1 (broken line or B-channel removed by signalling protocol)";
case 0x3302:
case 0x3302:
return "Protocol error layer 2";
case 0x3303:
case 0x3303:
return "Protocol error layer 3";
case 0x3304:
case 0x3304:
return "Another application got that call";
/*-- T.30 specific reasons -----*/
case 0x3311:
case 0x3311:
return "Connecting not successful (remote station is no FAX G3 machine)";
case 0x3312:
case 0x3312:
return "Connecting not successful (training error)";
case 0x3313:
case 0x3313:
return "Disconnected before transfer (remote station does not support transfer mode, e.g. resolution)";
case 0x3314:
case 0x3314:
return "Disconnected during transfer (remote abort)";
case 0x3315:
case 0x3315:
return "Disconnected during transfer (remote procedure error, e.g. unsuccessful repetition of T.30 commands)";
case 0x3316:
case 0x3316:
return "Disconnected during transfer (local tx data underrun)";
case 0x3317:
case 0x3317:
return "Disconnected during transfer (local rx data overflow)";
case 0x3318:
case 0x3318:
return "Disconnected during transfer (local abort)";
case 0x3319:
case 0x3319:
return "Illegal parameter coding (e.g. SFF coding error)";
/*-- disconnect causes from the network according to ETS 300 102-1/Q.931 -----*/
@ -229,7 +155,7 @@ char *capi_info2str(_cword reason)
case 0x3482: return "No route to specified transit network";
case 0x3483: return "No route to destination";
case 0x3486: return "Channel unacceptable";
case 0x3487:
case 0x3487:
return "Call awarded and being delivered in an established channel";
case 0x3490: return "Normal call clearing";
case 0x3491: return "User busy";
@ -281,7 +207,7 @@ char *capi_info2str(_cword reason)
case 0x3500: return "Normal end of connection";
case 0x3501: return "Carrier lost";
case 0x3502: return "Error in negotiation, i.e. no modem with error correction at the other end";
case 0x3502: return "Error in negotation, i.e. no modem with error correction at the other end";
case 0x3503: return "No answer to protocol request";
case 0x3504: return "Remote modem only works in synchronous mode";
case 0x3505: return "Framing fails";
@ -484,20 +410,34 @@ static unsigned char *cpars[] = {
/*-------------------------------------------------------*/
#define byteTLcpy(x,y) *(_cbyte *)(x)=*(_cbyte *)(y);
#define wordTLcpy(x,y) capimsg_setu16(x, 0, *(_cword *)(y))
#define dwordTLcpy(x,y) capimsg_setu32(x, 0, *(_cdword *)(y))
#define structTLcpy(x,y,l) memcpy (x,y,l)
#define structTLcpyovl(x,y,l) memmove (x,y,l)
#ifdef _BIG_ENDIAN
#define wordTLcpy(x,y) *(_cword *)(x)=bswap_16(*(_cword *)(y));
#define dwordTLcpy(x,y) *(_cdword *)(x)=bswap_32(*(_cdword *)(y));
#define wordTRcpy(x,y) *(_cword *)(y)=bswap_16(*(_cword *)(x));
#define dwordTRcpy(x,y) *(_cdword *)(y)=bswap_32(*(_cdword *)(x));
#define qwordTLcpy(x,y) *(_cqword *)(x)=bswap_64(*(_cqword *)(y));
#define qwordTRcpy(x,y) *(_cqword *)(y)=bswap_64(*(_cqword *)(x));
#define byteTRcpy(x,y) *(_cbyte *)(y)=*(_cbyte *)(x);
#define wordTRcpy(x,y) *(_cword *)(y)=CAPIMSG_U16((x), 0)
#define dwordTRcpy(x,y) *(_cdword *)(y)=CAPIMSG_U32((x), 0)
#define structTRcpy(x,y,l) memcpy (y,x,l)
#define structTRcpyovl(x,y,l) memmove (y,x,l)
#else
#define wordTLcpy(x,y) *(_cword *)(x)=*(_cword *)(y);
#define dwordTLcpy(x,y) memcpy(x,y,4);
#define wordTRcpy(x,y) *(_cword *)(y)=*(_cword *)(x);
#define dwordTRcpy(x,y) memcpy(y,x,4);
#define qwordTLcpy(x,y) memcpy(x,y,8);
#define qwordTRcpy(x,y) memcpy(y,x,8);
#endif
#define byteTLcpy(x,y) *(_cbyte *)(x)=*(_cbyte *)(y);
#define byteTRcpy(x,y) *(_cbyte *)(y)=*(_cbyte *)(x);
#define structTLcpy(x,y,l) memcpy (x,y,l)
#define structTLcpyovl(x,y,l) memmove (x,y,l)
#define structTRcpy(x,y,l) memcpy (y,x,l)
#define structTRcpyovl(x,y,l) memmove (y,x,l)
/*-------------------------------------------------------*/
static unsigned command_2_index(unsigned c, unsigned sc)
@ -562,9 +502,11 @@ static void pars_2_message(_cmsg * cmsg)
structTLcpy(cmsg->m + cmsg->l, *(_cstruct *) OFF, 1 + **(_cstruct *) OFF);
cmsg->l += 1 + **(_cstruct *) OFF;
} else {
_cword iw;
_cstruct s = *(_cstruct *) OFF;
structTLcpy(cmsg->m + cmsg->l, s, 3 + *(_cword *) (s + 1));
cmsg->l += 3 + *(_cword *) (s + 1);
wordTLcpy(&iw, (s + 1));
cmsg->l += 3 + iw;
}
break;
case _CMSTRUCT:
@ -577,7 +519,7 @@ static void pars_2_message(_cmsg * cmsg)
/*----- Metastruktur wird composed -----*/
else {
unsigned _l = cmsg->l;
unsigned _ls;
_cword _ls;
cmsg->l++;
cmsg->p++;
pars_2_message(cmsg);
@ -650,10 +592,13 @@ static void message_2_pars(_cmsg * cmsg)
case _CSTRUCT:
*(_cbyte **) OFF = cmsg->m + cmsg->l;
if (cmsg->m[cmsg->l] != 0xff)
if (cmsg->m[cmsg->l] != 0xff) {
cmsg->l += 1 + cmsg->m[cmsg->l];
else
cmsg->l += 3 + *(_cword *) (cmsg->m + cmsg->l + 1);
} else {
_cword iw;
wordTLcpy(&iw, (cmsg->m + cmsg->l + 1));
cmsg->l += 3 + iw;
}
break;
case _CMSTRUCT:
/*----- Metastruktur 0 -----*/
@ -897,14 +842,10 @@ static char *p = 0;
static void bufprint(char *fmt,...)
{
va_list f;
size_t space = buf + sizeof(buf) - p, len;
va_start(f, fmt);
len = vsnprintf(p, space, fmt, f);
vsprintf(p, fmt, f);
va_end(f);
if (len < space - 1)
p += len;
else
p += space - 1;
p += strlen(p);
}
static void printstructlen(_cbyte * m, unsigned len)
@ -934,7 +875,9 @@ static void printstruct(_cbyte * m)
len = m[0];
m += 1;
} else {
len = ((_cword *) (m + 1))[0];
_cword iw;
wordTLcpy(&iw, (m + 1));
len = (unsigned)iw;
m += 3;
}
printstructlen(m, len);
@ -945,6 +888,10 @@ static void printstruct(_cbyte * m)
static void protocol_message_2_pars(_cmsg * cmsg, int level)
{
_cword iw;
_cdword idw;
_cqword iq;
for (; TYP != _CEND; cmsg->p++) {
int slen = 29 + 3 - level;
int i;
@ -959,28 +906,35 @@ static void protocol_message_2_pars(_cmsg * cmsg, int level)
cmsg->l++;
break;
case _CWORD:
bufprint("%-*s = 0x%x\n", slen, NAME, *(_cword *) (cmsg->m + cmsg->l));
wordTLcpy(&iw, (cmsg->m + cmsg->l));
bufprint("%-*s = 0x%x\n", slen, NAME, iw);
cmsg->l += 2;
break;
case _CDWORD:
bufprint("%-*s = 0x%lx\n", slen, NAME, *(_cdword *) (cmsg->m + cmsg->l));
dwordTLcpy(&idw, (cmsg->m + cmsg->l));
bufprint("%-*s = 0x%lx\n", slen, NAME, idw);
cmsg->l += 4;
break;
case _CQWORD:
bufprint("%-*s = 0x%llx\n", slen, NAME, *(_cqword *) (cmsg->m + cmsg->l));
qwordTLcpy(&iq, (cmsg->m + cmsg->l));
bufprint("%-*s = 0x%llx\n", slen, NAME, iq);
cmsg->l += 4;
break;
case _CSTRUCT:
bufprint("%-*s = ", slen, NAME);
if (cmsg->m[cmsg->l] == '\0')
if (cmsg->m[cmsg->l] == '\0') {
bufprint("default");
else
} else {
printstruct(cmsg->m + cmsg->l);
}
bufprint("\n");
if (cmsg->m[cmsg->l] != 0xff)
if (cmsg->m[cmsg->l] != 0xff) {
cmsg->l += 1 + cmsg->m[cmsg->l];
else
cmsg->l += 3 + *(_cword *) (cmsg->m + cmsg->l + 1);
} else {
_cword iw;
wordTLcpy(&iw, (cmsg->m + cmsg->l + 1));
cmsg->l += 3 + iw;
}
break;
@ -1005,10 +959,10 @@ static void protocol_message_2_pars(_cmsg * cmsg, int level)
/*-------------------------------------------------------*/
char *capi_message2str(_cbyte * msg)
{
_cmsg cmsg;
p = buf;
p[0] = 0;
_cword id, msgnum, len;
cmsg.m = msg;
cmsg.l = 8;
@ -1017,11 +971,13 @@ char *capi_message2str(_cbyte * msg)
byteTRcpy(cmsg.m + 5, &cmsg.Subcommand);
cmsg.par = cpars[command_2_index(cmsg.Command, cmsg.Subcommand)];
wordTLcpy(&id, &msg[2]);
wordTLcpy(&msgnum, &msg[6]);
wordTLcpy(&len, &msg[0]);
bufprint("%-26s ID=%03d #0x%04x LEN=%04d\n",
mnames[command_2_index(cmsg.Command, cmsg.Subcommand)],
((unsigned short *) msg)[1],
((unsigned short *) msg)[3],
((unsigned short *) msg)[0]);
id, msgnum, len);
protocol_message_2_pars(&cmsg, 1);
return buf;
@ -1029,15 +985,21 @@ char *capi_message2str(_cbyte * msg)
char *capi_cmsg2str(_cmsg * cmsg)
{
_cword id, msgnum, len;
p = buf;
p[0] = 0;
cmsg->l = 8;
cmsg->p = 0;
bufprint("%s ID=%03d #0x%04x LEN=%04d\n",
wordTLcpy(&id, &cmsg->m[2]);
wordTLcpy(&msgnum, &cmsg->m[6]);
wordTLcpy(&len, &cmsg->m[0]);
bufprint("%-26s ID=%03d #0x%04x LEN=%04d\n",
mnames[command_2_index(cmsg->Command, cmsg->Subcommand)],
((_cword *) cmsg->m)[1],
((_cword *) cmsg->m)[3],
((_cword *) cmsg->m)[0]);
id, msgnum, len);
protocol_message_2_pars(cmsg, 1);
return buf;
}

323
capi20.new/install-sh Executable file
View File

@ -0,0 +1,323 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2005-05-14.22
# 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. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
chmodcmd="$chmodprog 0755"
chowncmd=
chgrpcmd=
stripcmd=
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=
dst=
dir_arg=
dstarg=
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:
-c (ignored)
-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.
--help display this help and exit.
--version display version info and exit.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
while test -n "$1"; do
case $1 in
-c) shift
continue;;
-d) dir_arg=true
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
--help) echo "$usage"; exit $?;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t) dstarg=$2
shift
shift
continue;;
-T) no_target_directory=true
shift
continue;;
--version) echo "$0 $scriptversion"; exit $?;;
*) # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
test -n "$dir_arg$dstarg" && break
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dstarg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
shift # fnord
fi
shift # arg
dstarg=$arg
done
break;;
esac
done
if test -z "$1"; 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
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src ;;
esac
if test -n "$dir_arg"; then
dst=$src
src=
if test -d "$dst"; then
mkdircmd=:
chmodcmd=
else
mkdircmd=$mkdirprog
fi
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 "$dstarg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dstarg
# 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: $dstarg: Is a directory" >&2
exit 1
fi
dst=$dst/`basename "$src"`
fi
fi
# This sed command emulates the dirname command.
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# Skip lots of stat calls in the usual case.
if test ! -d "$dstdir"; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
shift
IFS=$oIFS
pathcomp=
while test $# -ne 0 ; do
pathcomp=$pathcomp$1
shift
if test ! -d "$pathcomp"; then
$mkdirprog "$pathcomp"
# mkdir can fail with a `File exist' error in case several
# install-sh are creating the directory concurrently. This
# is OK.
test -d "$pathcomp" || exit
fi
pathcomp=$pathcomp/
done
fi
if test -n "$dir_arg"; then
$doit $mkdircmd "$dst" \
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
else
dstfile=`basename "$dst"`
# 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
trap '(exit $?); exit' 1 2 13 15
# Copy the file name to the temp name.
$doit $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 "$dsttmp"; } &&
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 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.
{
if test -f "$dstdir/$dstfile"; then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit 1
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
}
}
fi || { (exit 1); exit 1; }
done
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit 0
}
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

8412
capi20.new/ltmain.sh Executable file

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,9 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2003-09-02.23
scriptversion=2005-06-08.21
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
@ -19,8 +19,8 @@ scriptversion=2003-09-02.23
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@ -60,11 +60,6 @@ case "$1" in
msg="probably too old"
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
-h|--h|--he|--hel|--help)
echo "\
@ -92,10 +87,12 @@ Supported PROGRAM values:
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to <bug-automake@gnu.org>."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
@ -104,12 +101,42 @@ Send bug reports to <bug-automake@gnu.org>."
exit 1
;;
aclocal*)
esac
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
case "$1" in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
tar)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
@ -119,11 +146,6 @@ WARNING: \`$1' is $msg. You should only need it if
;;
autoconf)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
@ -133,11 +155,6 @@ WARNING: \`$1' is $msg. You should only need it if
;;
autoheader)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
@ -157,11 +174,6 @@ WARNING: \`$1' is $msg. You should only need it if
;;
automake*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
@ -173,11 +185,6 @@ WARNING: \`$1' is $msg. You should only need it if
;;
autom4te)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
@ -254,11 +261,6 @@ WARNING: \`$1' is $msg. You should only need it if
;;
help2man)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
@ -279,11 +281,6 @@ WARNING: \`$1' is $msg. You should only need it if
;;
makeinfo)
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
# We have makeinfo, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
@ -291,20 +288,23 @@ WARNING: \`$1' is $msg. You should only need it if
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
# If the file does not exist, the user really needs makeinfo;
# let's fail without touching anything.
test -f $file || exit 1
touch $file
;;
tar)
shift
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error

View File

@ -1,24 +0,0 @@
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = no-dependencies foreign
CLEANFILES = *~ comperr
MAINTAINERCLEANFILES = configure aclocal.m4 Makefile.in config.h.in
stamp-h.in
include_HEADERS = capi20.h capiutils.h capicmd.h
lib_LTLIBRARIES = libcapi20.la
lib_LIBRARIES = libcapi20dyn.a
libcapi20_la_SOURCES = capi20.c capifunc.c convert.c
libcapi20_la_LDFLAGS = -version-info ${LIBCAPI_VERSION}:${LIBCAPI_VERSION_RELEASE}:${LIBCAPI_VERSION_AGE}
libcapi20_la_CFLAGS = -fno-strict-aliasing
libcapi20dyn_a_SOURCES = capidyn.c
libcapi20dyn_a_CFLAGS = -fPIC
# libcapi20_la_LIBADD = $(LIBADD_DL)
$(OBJECTS): libtool
export SED
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck

6810
capi20.old/aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,800 +0,0 @@
/*
* $Id: capi20.c,v 1.28 2006/08/08 13:23:29 keil Exp $
*
* $Log: capi20.c,v $
* Revision 1.28 2006/08/08 13:23:29 keil
* some endian fixes for BIGENDIAN systems
*
* Revision 1.27 2005/05/09 08:21:57 calle
* - get_buffer() now returns 0, if no buffer is available.
*
* Revision 1.26 2005/03/04 11:00:31 calle
* New functions: cleanup_buffers_for_ncci() and cleanup_buffers_for_plci()
* triggered by DISCONNECT_B3_RESP and DISCONNECT_IND to fix buffer leak.
*
* Revision 1.25 2005/02/21 17:37:06 keil
* libcapi20 version 3.0.0
* - add SENDING COMPLETE in ALERT_REQ
* - add Globalconfiguration to CONNECT_REQ/RESP and SELECT_B_PROTOCOL_REQ
*
* * NOTE: incompatible to 2.X.Y versions
*
* Revision 1.24 2004/12/15 14:27:54 calle
* Bugfix: returncode of get_buffer() is now checked.
*
* Revision 1.23 2004/10/06 15:24:42 calle
* - "SendingComplete"-Patch reverted => 2.0.8 was not binaer compartible
* - Bugfix: capi20_register() with MaxB3Connection == 0 results in a
* core dump. Now at least one buffer is allocated.
*
* Revision 1.22 2004/06/14 11:23:48 calle
* Erweiterungen fuer ALERT_REQ.
*
* Revision 1.21 2004/03/31 18:12:40 calle
* - add receive buffer managment according to CAPI2.0 spec.
* - send buffer is now on stack.
* - new library version 2.0.7
*
* Revision 1.20 2004/01/16 15:27:11 calle
* remove several warnings.
*
* Revision 1.19 2001/03/01 14:59:11 paul
* Various patches to fix errors when using the newest glibc,
* replaced use of insecure tempnam() function
* and to remove warnings etc.
*
* Revision 1.18 2000/11/12 16:06:41 kai
* fix backwards compatibility in capi20 library, small other changes
*
* Revision 1.17 2000/06/26 15:00:43 calle
* - Will also compile with 2.0 Kernelheaders.
*
* Revision 1.16 2000/05/18 15:02:26 calle
* Updated _cmsg handling added new functions need by "capiconn".
*
* Revision 1.15 2000/04/10 09:08:06 calle
* capi20_wait_for_message will now return CapiReceiveQueueEmpty on
* timeout and error.
*
* Revision 1.14 2000/04/07 16:06:09 calle
* Bugfix: without devfs open where without NONBLOCK, ahhh.
*
* Revision 1.13 2000/04/03 14:27:15 calle
* non CAPI2.0 standard functions now named capi20ext not capi20.
* Extentionfunctions will work with actual driver version.
*
* Revision 1.12 2000/03/03 15:56:14 calle
* - now uses cloning device /dev/capi20.
* - middleware extentions prepared.
*
* Revision 1.11 1999/12/22 17:46:21 calle
* - Last byte in serial number now always 0.
* - Last byte of manufacturer now always 0.
* - returncode in capi20_isinstalled corrected.
*
* Revision 1.10 1999/11/11 09:24:07 calle
* add shared lib destructor, to close "capi_fd" on unload with dlclose ..
*
* Revision 1.9 1999/10/20 16:43:17 calle
* - The CAPI20 library is now a shared library.
* - Arguments of function capi20_put_message swapped, to match capi spec.
* - All capi20 related subdirs converted to use automake.
* - Removed dependency to CONFIG_KERNELDIR where not needed.
*
* Revision 1.8 1999/09/15 08:10:44 calle
* Bugfix: error in 64Bit extention.
*
* Revision 1.7 1999/09/10 17:20:33 calle
* Last changes for proposed standards (CAPI 2.0):
* - AK1-148 "Linux Extention"
* - AK1-155 "Support of 64-bit Applications"
*
* Revision 1.6 1999/09/06 17:40:07 calle
* Changes for CAPI 2.0 Spec.
*
* Revision 1.5 1999/04/20 19:52:19 calle
* Bugfix in capi20_get_profile: wrong size in memcpy from
* Kai Germaschewski <kai@thphy.uni-duesseldorf.de>
*
* Revision 1.4 1998/11/18 17:05:44 paul
* fixed a (harmless) warning
*
* Revision 1.3 1998/08/30 09:57:14 calle
* I hope it is know readable for everybody.
*
* Revision 1.1 1998/08/25 16:33:16 calle
* Added CAPI2.0 library. First Version.
*
*/
#include <sys/types.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <errno.h>
#include <limits.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <assert.h>
#define _LINUX_LIST_H
#include <linux/capi.h>
#include "capi20.h"
#ifndef CAPI_GET_FLAGS
#define CAPI_GET_FLAGS _IOR('C',0x23, unsigned)
#endif
#ifndef CAPI_SET_FLAGS
#define CAPI_SET_FLAGS _IOR('C',0x24, unsigned)
#endif
#ifndef CAPI_CLR_FLAGS
#define CAPI_CLR_FLAGS _IOR('C',0x25, unsigned)
#endif
#ifndef CAPI_NCCI_OPENCOUNT
#define CAPI_NCCI_OPENCOUNT _IOR('C',0x26, unsigned)
#endif
#ifndef CAPI_NCCI_GETUNIT
#define CAPI_NCCI_GETUNIT _IOR('C',0x27, unsigned)
#endif
#define SEND_BUFSIZ (128+2048)
static char capidevname[] = "/dev/capi20";
static char capidevnamenew[] = "/dev/isdn/capi20";
static int capi_fd = -1;
static capi_ioctl_struct ioctl_data;
unsigned capi20_isinstalled (void)
{
if (capi_fd >= 0)
return CapiNoError;
/*----- open managment link -----*/
if ((capi_fd = open(capidevname, O_RDWR, 0666)) < 0 && errno == ENOENT)
capi_fd = open(capidevnamenew, O_RDWR, 0666);
if (capi_fd < 0)
return CapiRegNotInstalled;
if (ioctl(capi_fd, CAPI_INSTALLED, 0) == 0)
return CapiNoError;
return CapiRegNotInstalled;
}
/*
* managment of application ids
*/
#define MAX_APPL 1024
static int applidmap[MAX_APPL];
static inline int remember_applid(unsigned applid, int fd)
{
if (applid >= MAX_APPL)
return -1;
applidmap[applid] = fd;
return 0;
}
unsigned alloc_applid(int fd)
{
unsigned applid;
for (applid=1; applid < MAX_APPL; applid++) {
if (applidmap[applid] < 0) {
applidmap[applid] = fd;
return applid;
}
}
return 0;
}
static inline void freeapplid(unsigned applid)
{
if (applid < MAX_APPL)
applidmap[applid] = -1;
}
static inline int validapplid(unsigned applid)
{
return applid > 0 && applid < MAX_APPL && applidmap[applid] >= 0;
}
static inline int applid2fd(unsigned applid)
{
if (applid < MAX_APPL)
return applidmap[applid];
return -1;
}
/*
* buffer management
*/
struct recvbuffer {
struct recvbuffer *next;
unsigned int datahandle;
unsigned int used;
unsigned int ncci;
unsigned char *buf; /* 128 + MaxSizeB3 */
};
struct applinfo {
unsigned maxbufs;
unsigned nbufs;
size_t recvbuffersize;
struct recvbuffer *buffers;
struct recvbuffer *firstfree;
struct recvbuffer *lastfree;
unsigned char *bufferstart;
};
static struct applinfo *alloc_buffers(unsigned MaxB3Connection,
unsigned MaxB3Blks,
unsigned MaxSizeB3)
{
struct applinfo *ap;
unsigned nbufs = 2 + MaxB3Connection * (MaxB3Blks + 1);
size_t recvbuffersize = 128 + MaxSizeB3;
unsigned i;
size_t size;
if (recvbuffersize < 2048) recvbuffersize = 2048;
size = sizeof(struct applinfo);
size += sizeof(struct recvbuffer) * nbufs;
size += recvbuffersize * nbufs;
ap = (struct applinfo *)malloc(size);
if (ap == 0) return 0;
memset(ap, 0, size);
ap->maxbufs = nbufs;
ap->recvbuffersize = recvbuffersize;
ap->buffers = (struct recvbuffer *)(ap+1);
ap->firstfree = ap->buffers;
ap->bufferstart = (unsigned char *)(ap->buffers+nbufs);
for (i=0; i < ap->maxbufs; i++) {
ap->buffers[i].next = &ap->buffers[i+1];
ap->buffers[i].used = 0;
ap->buffers[i].ncci = 0;
ap->buffers[i].buf = ap->bufferstart+(recvbuffersize*i);
}
ap->lastfree = &ap->buffers[ap->maxbufs-1];
ap->lastfree->next = 0;
return ap;
}
static void free_buffers(struct applinfo *ap)
{
free(ap);
}
static struct applinfo *applinfo[MAX_APPL];
static unsigned char *get_buffer(unsigned applid, size_t *sizep, unsigned *handle)
{
struct applinfo *ap;
struct recvbuffer *buf;
assert(validapplid(applid));
ap = applinfo[applid];
if ((buf = ap->firstfree) == 0)
return 0;
ap->firstfree = buf->next;
buf->next = 0;
buf->used = 1;
ap->nbufs++;
*sizep = ap->recvbuffersize;
*handle = (buf->buf-ap->bufferstart)/ap->recvbuffersize;
return buf->buf;
}
static void save_datahandle(unsigned char applid,
unsigned offset,
unsigned datahandle,
unsigned ncci)
{
struct applinfo *ap;
struct recvbuffer *buf;
assert(validapplid(applid));
ap = applinfo[applid];
assert(offset < ap->maxbufs);
buf = ap->buffers+offset;
buf->datahandle = datahandle;
buf->ncci = ncci;
}
static unsigned return_buffer(unsigned char applid, unsigned offset)
{
struct applinfo *ap;
struct recvbuffer *buf;
assert(validapplid(applid));
ap = applinfo[applid];
assert(offset < ap->maxbufs);
buf = ap->buffers+offset;
assert(buf->used == 1);
assert(buf->next == 0);
if (ap->lastfree) {
ap->lastfree->next = buf;
ap->lastfree = buf;
} else {
ap->firstfree = ap->lastfree = buf;
}
buf->used = 0;
buf->ncci = 0;
assert(ap->nbufs-- > 0);
return buf->datahandle;
}
static void cleanup_buffers_for_ncci(unsigned char applid, unsigned ncci)
{
struct applinfo *ap;
unsigned i;
assert(validapplid(applid));
ap = applinfo[applid];
for (i=0; i < ap->maxbufs; i++) {
if (ap->buffers[i].used) {
assert(ap->buffers[i].ncci != 0);
if (ap->buffers[i].ncci == ncci)
return_buffer(applid, i);
}
}
}
static void cleanup_buffers_for_plci(unsigned char applid, unsigned plci)
{
struct applinfo *ap;
unsigned i;
assert(validapplid(applid));
ap = applinfo[applid];
for (i=0; i < ap->maxbufs; i++) {
if (ap->buffers[i].used) {
assert(ap->buffers[i].ncci != 0);
if (ap->buffers[i].ncci & 0xffff == plci) {
return_buffer(applid, i);
}
}
}
}
/*
* CAPI2.0 functions
*/
unsigned
capi20_register (unsigned MaxB3Connection,
unsigned MaxB3Blks,
unsigned MaxSizeB3,
unsigned *ApplID)
{
int applid = 0;
char buf[PATH_MAX];
int i, fd = -1;
*ApplID = 0;
if (capi20_isinstalled() != CapiNoError)
return CapiRegNotInstalled;
if ((fd = open(capidevname, O_RDWR|O_NONBLOCK, 0666)) < 0 && errno == ENOENT)
fd = open(capidevnamenew, O_RDWR|O_NONBLOCK, 0666);
if (fd < 0)
return CapiRegOSResourceErr;
ioctl_data.rparams.level3cnt = MaxB3Connection;
ioctl_data.rparams.datablkcnt = MaxB3Blks;
ioctl_data.rparams.datablklen = MaxSizeB3;
if ((applid = ioctl(fd, CAPI_REGISTER, &ioctl_data)) < 0) {
if (errno == EIO) {
if (ioctl(fd, CAPI_GET_ERRCODE, &ioctl_data) < 0) {
close (fd);
return CapiRegOSResourceErr;
}
close (fd);
return (unsigned)ioctl_data.errcode;
} else if (errno == EINVAL) { // old kernel driver
close (fd);
fd = -1;
for (i=0; fd < 0; i++) {
/*----- open pseudo-clone device -----*/
sprintf(buf, "/dev/capi20.%02d", i);
if ((fd = open(buf, O_RDWR|O_NONBLOCK, 0666)) < 0) {
switch (errno) {
case EEXIST:
break;
default:
return CapiRegOSResourceErr;
}
}
}
if (fd < 0)
return CapiRegOSResourceErr;
ioctl_data.rparams.level3cnt = MaxB3Connection;
ioctl_data.rparams.datablkcnt = MaxB3Blks;
ioctl_data.rparams.datablklen = MaxSizeB3;
if ((applid = ioctl(fd, CAPI_REGISTER, &ioctl_data)) < 0) {
if (errno == EIO) {
if (ioctl(fd, CAPI_GET_ERRCODE, &ioctl_data) < 0) {
close(fd);
return CapiRegOSResourceErr;
}
close(fd);
return (unsigned)ioctl_data.errcode;
}
close(fd);
return CapiRegOSResourceErr;
}
applid = alloc_applid(fd);
} // end old driver compatibility
}
if (remember_applid(applid, fd) < 0) {
close(fd);
return CapiRegOSResourceErr;
}
applinfo[applid] = alloc_buffers(MaxB3Connection, MaxB3Blks, MaxSizeB3);
if (applinfo[applid] == 0) {
close(fd);
return CapiRegOSResourceErr;
}
*ApplID = applid;
return CapiNoError;
}
unsigned
capi20_release (unsigned ApplID)
{
if (capi20_isinstalled() != CapiNoError)
return CapiRegNotInstalled;
if (!validapplid(ApplID))
return CapiIllAppNr;
(void)close(applid2fd(ApplID));
freeapplid(ApplID);
free_buffers(applinfo[ApplID]);
applinfo[ApplID] = 0;
return CapiNoError;
}
unsigned
capi20_put_message (unsigned ApplID, unsigned char *Msg)
{
unsigned char sndbuf[SEND_BUFSIZ];
unsigned ret;
int len = (Msg[0] | (Msg[1] << 8));
int cmd = Msg[4];
int subcmd = Msg[5];
int rc;
int fd;
if (capi20_isinstalled() != CapiNoError)
return CapiRegNotInstalled;
if (!validapplid(ApplID))
return CapiIllAppNr;
fd = applid2fd(ApplID);
memcpy(sndbuf, Msg, len);
if (cmd == CAPI_DATA_B3) {
if (subcmd == CAPI_REQ) {
int datalen = (Msg[16] | (Msg[17] << 8));
void *dataptr;
if (sizeof(void *) != 4) {
if (len >= 30) { /* 64Bit CAPI-extention */
_cqword data64;
data64 = CAPIMSG_U64(Msg, 22);
if (data64 != 0)
dataptr = (void *)(unsigned long)data64;
else
dataptr = Msg + len; /* Assume data after message */
} else {
dataptr = Msg + len; /* Assume data after message */
}
} else {
_cdword data;
data = CAPIMSG_U32(Msg, 12);
if (data != 0)
dataptr = (void *)(unsigned long)data;
else
dataptr = Msg + len; /* Assume data after message */
}
if (len + datalen > SEND_BUFSIZ)
return CapiMsgOSResourceErr;
memcpy(sndbuf+len, dataptr, datalen);
len += datalen;
} else if (subcmd == CAPI_RESP) {
capimsg_setu16(sndbuf, 12,
return_buffer(ApplID, CAPIMSG_U16(sndbuf, 12)));
}
}
if (cmd == CAPI_DISCONNECT_B3 && subcmd == CAPI_RESP)
cleanup_buffers_for_ncci(ApplID, CAPIMSG_U32(sndbuf, 8));
ret = CapiNoError;
errno = 0;
if ((rc = write(fd, sndbuf, len)) != len) {
switch (errno) {
case EFAULT:
case EINVAL:
ret = CapiIllCmdOrSubcmdOrMsgToSmall;
break;
case EBADF:
ret = CapiIllAppNr;
break;
case EIO:
if (ioctl(fd, CAPI_GET_ERRCODE, &ioctl_data) < 0)
ret = CapiMsgOSResourceErr;
else ret = (unsigned)ioctl_data.errcode;
break;
default:
ret = CapiMsgOSResourceErr;
break;
}
}
return ret;
}
unsigned
capi20_get_message (unsigned ApplID, unsigned char **Buf)
{
unsigned char *rcvbuf;
unsigned offset;
unsigned ret;
size_t bufsiz;
int rc, fd;
if (capi20_isinstalled() != CapiNoError)
return CapiRegNotInstalled;
if (!validapplid(ApplID))
return CapiIllAppNr;
fd = applid2fd(ApplID);
if ((*Buf = rcvbuf = get_buffer(ApplID, &bufsiz, &offset)) == 0)
return CapiMsgOSResourceErr;
if ((rc = read(fd, rcvbuf, bufsiz)) > 0) {
CAPIMSG_SETAPPID(rcvbuf, ApplID); // workaround for old driver
if ( CAPIMSG_COMMAND(rcvbuf) == CAPI_DATA_B3
&& CAPIMSG_SUBCOMMAND(rcvbuf) == CAPI_IND) {
save_datahandle(ApplID, offset, CAPIMSG_U16(rcvbuf, 18),
CAPIMSG_U32(rcvbuf, 8));
capimsg_setu16(rcvbuf, 18, offset); /* patch datahandle */
if (sizeof(void *) == 4) {
u_int32_t data = (u_int32_t)rcvbuf + CAPIMSG_LEN(rcvbuf);
rcvbuf[12] = data & 0xff;
rcvbuf[13] = (data >> 8) & 0xff;
rcvbuf[14] = (data >> 16) & 0xff;
rcvbuf[15] = (data >> 24) & 0xff;
} else {
u_int64_t data;
ulong radr = (ulong)rcvbuf;
if (CAPIMSG_LEN(rcvbuf) < 30) {
/*
* grr, 64bit arch, but no data64 included,
* seems to be old driver
*/
memmove(rcvbuf+30, rcvbuf+CAPIMSG_LEN(rcvbuf),
CAPIMSG_DATALEN(rcvbuf));
rcvbuf[0] = 30;
rcvbuf[1] = 0;
}
data = radr + CAPIMSG_LEN(rcvbuf);
rcvbuf[12] = rcvbuf[13] = rcvbuf[14] = rcvbuf[15] = 0;
rcvbuf[22] = data & 0xff;
rcvbuf[23] = (data >> 8) & 0xff;
rcvbuf[24] = (data >> 16) & 0xff;
rcvbuf[25] = (data >> 24) & 0xff;
rcvbuf[26] = (data >> 32) & 0xff;
rcvbuf[27] = (data >> 40) & 0xff;
rcvbuf[28] = (data >> 48) & 0xff;
rcvbuf[29] = (data >> 56) & 0xff;
}
/* keep buffer */
return CapiNoError;
}
return_buffer(ApplID, offset);
if ( CAPIMSG_COMMAND(rcvbuf) == CAPI_DISCONNECT
&& CAPIMSG_SUBCOMMAND(rcvbuf) == CAPI_IND)
cleanup_buffers_for_plci(ApplID, CAPIMSG_U32(rcvbuf, 8));
return CapiNoError;
}
return_buffer(ApplID, offset);
if (rc == 0)
return CapiReceiveQueueEmpty;
switch (errno) {
case EMSGSIZE:
ret = CapiIllCmdOrSubcmdOrMsgToSmall;
break;
case EAGAIN:
return CapiReceiveQueueEmpty;
default:
ret = CapiMsgOSResourceErr;
break;
}
return ret;
}
unsigned char *
capi20_get_manufacturer(unsigned Ctrl, unsigned char *Buf)
{
if (capi20_isinstalled() != CapiNoError)
return 0;
ioctl_data.contr = Ctrl;
if (ioctl(capi_fd, CAPI_GET_MANUFACTURER, &ioctl_data) < 0)
return 0;
memcpy(Buf, ioctl_data.manufacturer, CAPI_MANUFACTURER_LEN);
Buf[CAPI_MANUFACTURER_LEN-1] = 0;
return Buf;
}
unsigned char *
capi20_get_version(unsigned Ctrl, unsigned char *Buf)
{
if (capi20_isinstalled() != CapiNoError)
return 0;
ioctl_data.contr = Ctrl;
if (ioctl(capi_fd, CAPI_GET_VERSION, &ioctl_data) < 0)
return 0;
memcpy(Buf, &ioctl_data.version, sizeof(capi_version));
return Buf;
}
unsigned char *
capi20_get_serial_number(unsigned Ctrl, unsigned char *Buf)
{
if (capi20_isinstalled() != CapiNoError)
return 0;
ioctl_data.contr = Ctrl;
if (ioctl(capi_fd, CAPI_GET_SERIAL, &ioctl_data) < 0)
return 0;
memcpy(Buf, &ioctl_data.serial, CAPI_SERIAL_LEN);
Buf[CAPI_SERIAL_LEN-1] = 0;
return Buf;
}
unsigned
capi20_get_profile(unsigned Ctrl, unsigned char *Buf)
{
if (capi20_isinstalled() != CapiNoError)
return CapiMsgNotInstalled;
ioctl_data.contr = Ctrl;
if (ioctl(capi_fd, CAPI_GET_PROFILE, &ioctl_data) < 0) {
if (errno != EIO)
return CapiMsgOSResourceErr;
if (ioctl(capi_fd, CAPI_GET_ERRCODE, &ioctl_data) < 0)
return CapiMsgOSResourceErr;
return (unsigned)ioctl_data.errcode;
}
if (Ctrl)
memcpy(Buf, &ioctl_data.profile, sizeof(struct capi_profile));
else
memcpy(Buf, &ioctl_data.profile.ncontroller,
sizeof(ioctl_data.profile.ncontroller));
return CapiNoError;
}
/*
* functions added to the CAPI2.0 spec
*/
unsigned
capi20_waitformessage(unsigned ApplID, struct timeval *TimeOut)
{
int fd;
fd_set rfds;
FD_ZERO(&rfds);
if (capi20_isinstalled() != CapiNoError)
return CapiRegNotInstalled;
if(!validapplid(ApplID))
return CapiIllAppNr;
fd = applid2fd(ApplID);
FD_SET(fd, &rfds);
if (select(fd + 1, &rfds, NULL, NULL, TimeOut) < 1)
return CapiReceiveQueueEmpty;
return CapiNoError;
}
int
capi20_fileno(unsigned ApplID)
{
return applid2fd(ApplID);
}
/*
* Extensions for middleware
*/
int
capi20ext_get_flags(unsigned ApplID, unsigned *flagsptr)
{
if (ioctl(applid2fd(ApplID), CAPI_GET_FLAGS, flagsptr) < 0)
return CapiMsgOSResourceErr;
return CapiNoError;
}
int
capi20ext_set_flags(unsigned ApplID, unsigned flags)
{
if (ioctl(applid2fd(ApplID), CAPI_SET_FLAGS, &flags) < 0)
return CapiMsgOSResourceErr;
return CapiNoError;
}
int
capi20ext_clr_flags(unsigned ApplID, unsigned flags)
{
if (ioctl(applid2fd(ApplID), CAPI_CLR_FLAGS, &flags) < 0)
return CapiMsgOSResourceErr;
return CapiNoError;
}
char *
capi20ext_get_tty_devname(unsigned applid, unsigned ncci, char *buf, size_t size)
{
int unit;
unit = ioctl(applid2fd(applid), CAPI_NCCI_GETUNIT, &ncci);
if (unit < 0)
return 0;
snprintf(buf, size, "/dev/capi/%d", unit);
return buf;
}
char *
capi20ext_get_raw_devname(unsigned applid, unsigned ncci, char *buf, size_t size)
{
int unit;
unit = ioctl(applid2fd(applid), CAPI_NCCI_GETUNIT, &ncci);
if (unit < 0)
return 0;
snprintf(buf, size, "/dev/capi/r%d", unit);
return buf;
}
int capi20ext_ncci_opencount(unsigned applid, unsigned ncci)
{
return ioctl(applid2fd(applid), CAPI_NCCI_OPENCOUNT, &ncci);
}
static void initlib(void) __attribute__((constructor));
static void exitlib(void) __attribute__((destructor));
static void initlib(void)
{
int i;
for (i=0; i < MAX_APPL; i++)
applidmap[i] = -1;
}
static void exitlib(void)
{
if (capi_fd >= 0) {
close(capi_fd);
capi_fd = -1;
}
}

View File

@ -1,137 +0,0 @@
/*
* $Id: capicmd.h,v 1.1 2000/05/18 15:02:26 calle Exp $
*
* CAPI 2.0 Interface for Linux
*
* Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: capicmd.h,v $
* Revision 1.1 2000/05/18 15:02:26 calle
* Updated _cmsg handling added new functions need by "capiconn".
*
* Revision 1.2 2000/03/03 15:50:42 calle
* - kernel CAPI:
* - Changed parameter "param" in capi_signal from __u32 to void *.
* - rewrote notifier handling in kcapi.c
* - new notifier NCCI_UP and NCCI_DOWN
* - User CAPI:
* - /dev/capi20 is now a cloning device.
* - middleware extentions prepared.
* - capidrv.c
* - locking of list operations and module count updates.
*
* Revision 1.1 1997/03/04 21:50:30 calle
* Frirst version in isdn4linux
*
* Revision 2.2 1997/02/12 09:31:39 calle
* new version
*
* Revision 1.1 1997/01/31 10:32:20 calle
* Initial revision
*
*
*/
#ifndef __CAPICMD_H__
#define __CAPICMD_H__
#define CAPI_MSG_BASELEN 8
#define CAPI_DATA_B3_REQ_LEN (CAPI_MSG_BASELEN+4+4+2+2+2)
#define CAPI_DATA_B3_RESP_LEN (CAPI_MSG_BASELEN+4+2)
/*----- CAPI commands -----*/
#define CAPI_ALERT 0x01
#define CAPI_CONNECT 0x02
#define CAPI_CONNECT_ACTIVE 0x03
#define CAPI_CONNECT_B3_ACTIVE 0x83
#define CAPI_CONNECT_B3 0x82
#define CAPI_CONNECT_B3_T90_ACTIVE 0x88
#define CAPI_DATA_B3 0x86
#define CAPI_DISCONNECT_B3 0x84
#define CAPI_DISCONNECT 0x04
#define CAPI_FACILITY 0x80
#define CAPI_INFO 0x08
#define CAPI_LISTEN 0x05
#define CAPI_MANUFACTURER 0xff
#define CAPI_RESET_B3 0x87
#define CAPI_SELECT_B_PROTOCOL 0x41
/*----- CAPI subcommands -----*/
#define CAPI_REQ 0x80
#define CAPI_CONF 0x81
#define CAPI_IND 0x82
#define CAPI_RESP 0x83
/*----- CAPI combined commands -----*/
#define CAPICMD(cmd,subcmd) (((cmd)<<8)|(subcmd))
#define CAPI_DISCONNECT_REQ CAPICMD(CAPI_DISCONNECT,CAPI_REQ)
#define CAPI_DISCONNECT_CONF CAPICMD(CAPI_DISCONNECT,CAPI_CONF)
#define CAPI_DISCONNECT_IND CAPICMD(CAPI_DISCONNECT,CAPI_IND)
#define CAPI_DISCONNECT_RESP CAPICMD(CAPI_DISCONNECT,CAPI_RESP)
#define CAPI_ALERT_REQ CAPICMD(CAPI_ALERT,CAPI_REQ)
#define CAPI_ALERT_CONF CAPICMD(CAPI_ALERT,CAPI_CONF)
#define CAPI_CONNECT_REQ CAPICMD(CAPI_CONNECT,CAPI_REQ)
#define CAPI_CONNECT_CONF CAPICMD(CAPI_CONNECT,CAPI_CONF)
#define CAPI_CONNECT_IND CAPICMD(CAPI_CONNECT,CAPI_IND)
#define CAPI_CONNECT_RESP CAPICMD(CAPI_CONNECT,CAPI_RESP)
#define CAPI_CONNECT_ACTIVE_REQ CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_REQ)
#define CAPI_CONNECT_ACTIVE_CONF CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_CONF)
#define CAPI_CONNECT_ACTIVE_IND CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_IND)
#define CAPI_CONNECT_ACTIVE_RESP CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_RESP)
#define CAPI_SELECT_B_PROTOCOL_REQ CAPICMD(CAPI_SELECT_B_PROTOCOL,CAPI_REQ)
#define CAPI_SELECT_B_PROTOCOL_CONF CAPICMD(CAPI_SELECT_B_PROTOCOL,CAPI_CONF)
#define CAPI_CONNECT_B3_ACTIVE_REQ CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_REQ)
#define CAPI_CONNECT_B3_ACTIVE_CONF CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_CONF)
#define CAPI_CONNECT_B3_ACTIVE_IND CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_IND)
#define CAPI_CONNECT_B3_ACTIVE_RESP CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_RESP)
#define CAPI_CONNECT_B3_REQ CAPICMD(CAPI_CONNECT_B3,CAPI_REQ)
#define CAPI_CONNECT_B3_CONF CAPICMD(CAPI_CONNECT_B3,CAPI_CONF)
#define CAPI_CONNECT_B3_IND CAPICMD(CAPI_CONNECT_B3,CAPI_IND)
#define CAPI_CONNECT_B3_RESP CAPICMD(CAPI_CONNECT_B3,CAPI_RESP)
#define CAPI_CONNECT_B3_T90_ACTIVE_IND CAPICMD(CAPI_CONNECT_B3_T90_ACTIVE,CAPI_IND)
#define CAPI_CONNECT_B3_T90_ACTIVE_RESP CAPICMD(CAPI_CONNECT_B3_T90_ACTIVE,CAPI_RESP)
#define CAPI_DATA_B3_REQ CAPICMD(CAPI_DATA_B3,CAPI_REQ)
#define CAPI_DATA_B3_CONF CAPICMD(CAPI_DATA_B3,CAPI_CONF)
#define CAPI_DATA_B3_IND CAPICMD(CAPI_DATA_B3,CAPI_IND)
#define CAPI_DATA_B3_RESP CAPICMD(CAPI_DATA_B3,CAPI_RESP)
#define CAPI_DISCONNECT_B3_REQ CAPICMD(CAPI_DISCONNECT_B3,CAPI_REQ)
#define CAPI_DISCONNECT_B3_CONF CAPICMD(CAPI_DISCONNECT_B3,CAPI_CONF)
#define CAPI_DISCONNECT_B3_IND CAPICMD(CAPI_DISCONNECT_B3,CAPI_IND)
#define CAPI_DISCONNECT_B3_RESP CAPICMD(CAPI_DISCONNECT_B3,CAPI_RESP)
#define CAPI_RESET_B3_REQ CAPICMD(CAPI_RESET_B3,CAPI_REQ)
#define CAPI_RESET_B3_CONF CAPICMD(CAPI_RESET_B3,CAPI_CONF)
#define CAPI_RESET_B3_IND CAPICMD(CAPI_RESET_B3,CAPI_IND)
#define CAPI_RESET_B3_RESP CAPICMD(CAPI_RESET_B3,CAPI_RESP)
#define CAPI_LISTEN_REQ CAPICMD(CAPI_LISTEN,CAPI_REQ)
#define CAPI_LISTEN_CONF CAPICMD(CAPI_LISTEN,CAPI_CONF)
#define CAPI_MANUFACTURER_REQ CAPICMD(CAPI_MANUFACTURER,CAPI_REQ)
#define CAPI_MANUFACTURER_CONF CAPICMD(CAPI_MANUFACTURER,CAPI_CONF)
#define CAPI_MANUFACTURER_IND CAPICMD(CAPI_MANUFACTURER,CAPI_IND)
#define CAPI_MANUFACTURER_RESP CAPICMD(CAPI_MANUFACTURER,CAPI_RESP)
#define CAPI_FACILITY_REQ CAPICMD(CAPI_FACILITY,CAPI_REQ)
#define CAPI_FACILITY_CONF CAPICMD(CAPI_FACILITY,CAPI_CONF)
#define CAPI_FACILITY_IND CAPICMD(CAPI_FACILITY,CAPI_IND)
#define CAPI_FACILITY_RESP CAPICMD(CAPI_FACILITY,CAPI_RESP)
#define CAPI_INFO_REQ CAPICMD(CAPI_INFO,CAPI_REQ)
#define CAPI_INFO_CONF CAPICMD(CAPI_INFO,CAPI_CONF)
#define CAPI_INFO_IND CAPICMD(CAPI_INFO,CAPI_IND)
#define CAPI_INFO_RESP CAPICMD(CAPI_INFO,CAPI_RESP)
#endif /* __CAPICMD_H__ */

20961
capi20.old/configure vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

9
capi20/.cvsignore Normal file
View File

@ -0,0 +1,9 @@
config.log
config.cache
config.status
Makefile
comperr
.libs
libtool
*.lo
*.la

View File

@ -1 +0,0 @@
../gpl-2.0.txt

View File

@ -1 +0,0 @@
../lgpl-2.1.txt

View File

@ -2,43 +2,20 @@
AUTOMAKE_OPTIONS = no-dependencies foreign
CLEANFILES = *~ comperr
DISTCLEANFILES = intltool-extract intltool-merge intltool-update
MAINTAINERCLEANFILES = configure aclocal.m4 Makefile.in config.h.in
stamp-h.in
include_HEADERS = capi20.h capiutils.h capicmd.h capi_mod.h capi_debug.h
include_HEADERS = capi20.h capiutils.h capicmd.h
lib_LTLIBRARIES = libcapi20.la
lib_LIBRARIES = libcapi20dyn.a
libcapi20_la_SOURCES = capi20.c capifunc.c convert.c
libcapi20_la_LDFLAGS = -version-info ${LIBCAPI_VERSION}:${LIBCAPI_VERSION_RELEASE}:${LIBCAPI_VERSION_AGE} -lrt -lc -ldl -rdynamic
libcapi20_la_CFLAGS = -fno-strict-aliasing -DLIBDIR=\"$(libdir)/capi\"
modulesdir = $(libdir)/capi
modules_LTLIBRARIES = lib_capi_mod_std.la lib_capi_mod_fritzbox.la lib_capi_mod_rcapi.la
lib_capi_mod_std_la_SOURCES = capi_mod_std.c
lib_capi_mod_std_la_CFLAGS = -fno-strict-aliasing
lib_capi_mod_std_la_LDFLAGS = -shared -version-info @CAPI_MODULE_LOADER_VERSION@:0:0
lib_capi_mod_std_la_LIBADD = libcapi20.la
lib_capi_mod_fritzbox_la_SOURCES = capi_mod_fritzbox.c
lib_capi_mod_fritzbox_la_CFLAGS = -fno-strict-aliasing
lib_capi_mod_fritzbox_la_LDFLAGS = -shared -version-info @CAPI_MODULE_LOADER_VERSION@:0:0
lib_capi_mod_fritzbox_la_LIBADD = libcapi20.la
lib_capi_mod_rcapi_la_SOURCES = capi_mod_rcapi.c
lib_capi_mod_rcapi_la_CFLAGS = -fno-strict-aliasing
lib_capi_mod_rcapi_la_LDFLAGS = -shared -version-info @CAPI_MODULE_LOADER_VERSION@:0:0
lib_capi_mod_rcapi_la_LIBADD = libcapi20.la
libcapi20_la_LDFLAGS = -version-info ${LIBCAPI_VERSION}:${LIBCAPI_VERSION_RELEASE}:${LIBCAPI_VERSION_AGE}
libcapi20_la_CFLAGS = -fno-strict-aliasing
libcapi20dyn_a_SOURCES = capidyn.c
libcapi20dyn_a_CFLAGS = -fPIC
# libcapi20_la_LIBADD = $(LIBADD_DL)
pcdir = ${libdir}/pkgconfig
pc_DATA = capi20.pc
$(OBJECTS): libtool
export SED

File diff suppressed because it is too large Load Diff

11294
capi20/aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,21 @@
/*
* capi20.h
* $Id$
*
* Author Carsten Paeth <calle@calle.de>
* Copyright 1997,2000 Carsten Paeth <calle@calle.de>
* $Log$
* Revision 1.10 2000/04/03 14:27:15 calle
* non CAPI2.0 standard functions now named capi20ext not capi20.
* Extentionfunctions will work with actual driver version.
*
* Author Karsten Keil <kkeil@linux-pingi.de>
* Copyright 2011 Karsten Keil <kkeil@linux-pingi.de>
* Revision 1.9 2000/03/03 15:56:14 calle
* - now uses cloning device /dev/capi20.
* - middleware extentions prepared.
*
* it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE
* version 2.1 as published by the Free Software Foundation.
* Revision 1.8 1999/12/06 17:08:30 calle
* - Splitted capi20.h into capi20.h and capiutils.h.
* - capi20.h: the functions from the CAPI-2.0 Spec
* - capiutils.h: the "CAPI-ADK" functions
* - bug in 64Bit-Support fixed.
*
* This code is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU LESSER GENERAL PUBLIC LICENSE for more details.
*/
#ifndef __CAPI20_H__
#define __CAPI20_H__
@ -23,18 +25,14 @@ extern "C" {
#endif
#include <stdlib.h>
#include <stddef.h>
#include <sys/time.h>
#define SEND_BUFSIZ (128+2048)
/* standard CAPI2.0 functions */
unsigned capi20_register (
unsigned MaxLogicalConnection,
unsigned MaxBDataBlocks,
unsigned MaxBDataLen,
unsigned *ApplIDp);
unsigned capi20_register (unsigned MaxLogicalConnection,
unsigned MaxBDataBlocks,
unsigned MaxBDataLen,
unsigned *ApplIDp);
unsigned capi20_release (unsigned ApplID);
@ -64,17 +62,10 @@ int capi20ext_get_flags(unsigned ApplID, unsigned *flagsptr);
int capi20ext_set_flags(unsigned ApplID, unsigned flags);
int capi20ext_clr_flags(unsigned ApplID, unsigned flags);
char *capi20ext_get_tty_devname(
unsigned applid,
unsigned ncci,
char *buf,
size_t size);
char *capi20ext_get_raw_devname(
unsigned applid,
unsigned ncci,
char *buf,
size_t size);
char *capi20ext_get_tty_devname(unsigned applid, unsigned ncci,
char *buf, size_t size);
char *capi20ext_get_raw_devname(unsigned applid, unsigned ncci,
char *buf, size_t size);
int capi20ext_ncci_opencount(unsigned applid, unsigned ncci);

View File

@ -1,46 +0,0 @@
/*
* capi_debug.h
*
* Author Karsten Keil <kkeil@linux-pingi.de>
*
* Copyright 2011 by Karsten Keil <kkeil@linux-pingi.de>
*
* This code is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
#ifndef _CAPI_DEBUG_H
#define _CAPI_DEBUG_H
#include <stdio.h>
#include <stdarg.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef int (*capi_debug_t)(const char *file, int line, const char *func, const char *fmt, va_list va);
extern int _capi_dprintf(const char *, int, const char *, const char *, ...);
#define capi_dprintf(f, ...) _capi_dprintf(__FILE__, __LINE__, __PRETTY_FUNCTION__, f, ##__VA_ARGS__)
extern void register_dbg_vprintf(capi_debug_t);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,36 +1,56 @@
/*
*
* $Id$
*
* CAPI 2.0 Interface for Linux
*
*
* Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log$
* Revision 1.2 2000/03/03 15:50:42 calle
* - kernel CAPI:
* - Changed parameter "param" in capi_signal from __u32 to void *.
* - rewrote notifier handling in kcapi.c
* - new notifier NCCI_UP and NCCI_DOWN
* - User CAPI:
* - /dev/capi20 is now a cloning device.
* - middleware extentions prepared.
* - capidrv.c
* - locking of list operations and module count updates.
*
* This program is free software and may be modified and
* distributed under the terms of the GNU Public License.
* Revision 1.1 1997/03/04 21:50:30 calle
* Frirst version in isdn4linux
*
* Revision 2.2 1997/02/12 09:31:39 calle
* new version
*
* Revision 1.1 1997/01/31 10:32:20 calle
* Initial revision
*
*
*/
#ifndef __CAPICMD_H__
#define __CAPICMD_H__
#define CAPI_MSG_BASELEN 8
#define CAPI_DATA_B3_REQ_LEN (CAPI_MSG_BASELEN+4+4+2+2+2)
#define CAPI_DATA_B3_RESP_LEN (CAPI_MSG_BASELEN+4+2)
#define CAPI_MSG_BASELEN 8
#define CAPI_DATA_B3_REQ_LEN (CAPI_MSG_BASELEN+4+4+2+2+2)
#define CAPI_DATA_B3_RESP_LEN (CAPI_MSG_BASELEN+4+2)
/*----- CAPI commands -----*/
#define CAPI_ALERT 0x01
#define CAPI_CONNECT 0x02
#define CAPI_CONNECT_ACTIVE 0x03
#define CAPI_CONNECT_B3_ACTIVE 0x83
#define CAPI_CONNECT_B3 0x82
#define CAPI_ALERT 0x01
#define CAPI_CONNECT 0x02
#define CAPI_CONNECT_ACTIVE 0x03
#define CAPI_CONNECT_B3_ACTIVE 0x83
#define CAPI_CONNECT_B3 0x82
#define CAPI_CONNECT_B3_T90_ACTIVE 0x88
#define CAPI_DATA_B3 0x86
#define CAPI_DISCONNECT_B3 0x84
#define CAPI_DISCONNECT 0x04
#define CAPI_FACILITY 0x80
#define CAPI_INFO 0x08
#define CAPI_LISTEN 0x05
#define CAPI_MANUFACTURER 0xff
#define CAPI_RESET_B3 0x87
#define CAPI_SELECT_B_PROTOCOL 0x41
#define CAPI_DATA_B3 0x86
#define CAPI_DISCONNECT_B3 0x84
#define CAPI_DISCONNECT 0x04
#define CAPI_FACILITY 0x80
#define CAPI_INFO 0x08
#define CAPI_LISTEN 0x05
#define CAPI_MANUFACTURER 0xff
#define CAPI_RESET_B3 0x87
#define CAPI_SELECT_B_PROTOCOL 0x41
/*----- CAPI subcommands -----*/
@ -41,74 +61,74 @@
/*----- CAPI combined commands -----*/
#define CAPICMD(cmd,subcmd) (((cmd)<<8)|(subcmd))
#define CAPICMD(cmd,subcmd) (((cmd)<<8)|(subcmd))
#define CAPI_DISCONNECT_REQ CAPICMD(CAPI_DISCONNECT,CAPI_REQ)
#define CAPI_DISCONNECT_CONF CAPICMD(CAPI_DISCONNECT,CAPI_CONF)
#define CAPI_DISCONNECT_IND CAPICMD(CAPI_DISCONNECT,CAPI_IND)
#define CAPI_DISCONNECT_RESP CAPICMD(CAPI_DISCONNECT,CAPI_RESP)
#define CAPI_DISCONNECT_REQ CAPICMD(CAPI_DISCONNECT,CAPI_REQ)
#define CAPI_DISCONNECT_CONF CAPICMD(CAPI_DISCONNECT,CAPI_CONF)
#define CAPI_DISCONNECT_IND CAPICMD(CAPI_DISCONNECT,CAPI_IND)
#define CAPI_DISCONNECT_RESP CAPICMD(CAPI_DISCONNECT,CAPI_RESP)
#define CAPI_ALERT_REQ CAPICMD(CAPI_ALERT,CAPI_REQ)
#define CAPI_ALERT_CONF CAPICMD(CAPI_ALERT,CAPI_CONF)
#define CAPI_ALERT_REQ CAPICMD(CAPI_ALERT,CAPI_REQ)
#define CAPI_ALERT_CONF CAPICMD(CAPI_ALERT,CAPI_CONF)
#define CAPI_CONNECT_REQ CAPICMD(CAPI_CONNECT,CAPI_REQ)
#define CAPI_CONNECT_CONF CAPICMD(CAPI_CONNECT,CAPI_CONF)
#define CAPI_CONNECT_IND CAPICMD(CAPI_CONNECT,CAPI_IND)
#define CAPI_CONNECT_RESP CAPICMD(CAPI_CONNECT,CAPI_RESP)
#define CAPI_CONNECT_REQ CAPICMD(CAPI_CONNECT,CAPI_REQ)
#define CAPI_CONNECT_CONF CAPICMD(CAPI_CONNECT,CAPI_CONF)
#define CAPI_CONNECT_IND CAPICMD(CAPI_CONNECT,CAPI_IND)
#define CAPI_CONNECT_RESP CAPICMD(CAPI_CONNECT,CAPI_RESP)
#define CAPI_CONNECT_ACTIVE_REQ CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_REQ)
#define CAPI_CONNECT_ACTIVE_CONF CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_CONF)
#define CAPI_CONNECT_ACTIVE_IND CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_IND)
#define CAPI_CONNECT_ACTIVE_RESP CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_RESP)
#define CAPI_CONNECT_ACTIVE_REQ CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_REQ)
#define CAPI_CONNECT_ACTIVE_CONF CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_CONF)
#define CAPI_CONNECT_ACTIVE_IND CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_IND)
#define CAPI_CONNECT_ACTIVE_RESP CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_RESP)
#define CAPI_SELECT_B_PROTOCOL_REQ CAPICMD(CAPI_SELECT_B_PROTOCOL,CAPI_REQ)
#define CAPI_SELECT_B_PROTOCOL_CONF CAPICMD(CAPI_SELECT_B_PROTOCOL,CAPI_CONF)
#define CAPI_SELECT_B_PROTOCOL_REQ CAPICMD(CAPI_SELECT_B_PROTOCOL,CAPI_REQ)
#define CAPI_SELECT_B_PROTOCOL_CONF CAPICMD(CAPI_SELECT_B_PROTOCOL,CAPI_CONF)
#define CAPI_CONNECT_B3_ACTIVE_REQ CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_REQ)
#define CAPI_CONNECT_B3_ACTIVE_CONF CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_CONF)
#define CAPI_CONNECT_B3_ACTIVE_IND CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_IND)
#define CAPI_CONNECT_B3_ACTIVE_RESP CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_RESP)
#define CAPI_CONNECT_B3_ACTIVE_REQ CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_REQ)
#define CAPI_CONNECT_B3_ACTIVE_CONF CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_CONF)
#define CAPI_CONNECT_B3_ACTIVE_IND CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_IND)
#define CAPI_CONNECT_B3_ACTIVE_RESP CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_RESP)
#define CAPI_CONNECT_B3_REQ CAPICMD(CAPI_CONNECT_B3,CAPI_REQ)
#define CAPI_CONNECT_B3_CONF CAPICMD(CAPI_CONNECT_B3,CAPI_CONF)
#define CAPI_CONNECT_B3_IND CAPICMD(CAPI_CONNECT_B3,CAPI_IND)
#define CAPI_CONNECT_B3_RESP CAPICMD(CAPI_CONNECT_B3,CAPI_RESP)
#define CAPI_CONNECT_B3_REQ CAPICMD(CAPI_CONNECT_B3,CAPI_REQ)
#define CAPI_CONNECT_B3_CONF CAPICMD(CAPI_CONNECT_B3,CAPI_CONF)
#define CAPI_CONNECT_B3_IND CAPICMD(CAPI_CONNECT_B3,CAPI_IND)
#define CAPI_CONNECT_B3_RESP CAPICMD(CAPI_CONNECT_B3,CAPI_RESP)
#define CAPI_CONNECT_B3_T90_ACTIVE_IND CAPICMD(CAPI_CONNECT_B3_T90_ACTIVE,CAPI_IND)
#define CAPI_CONNECT_B3_T90_ACTIVE_RESP CAPICMD(CAPI_CONNECT_B3_T90_ACTIVE,CAPI_RESP)
#define CAPI_CONNECT_B3_T90_ACTIVE_IND CAPICMD(CAPI_CONNECT_B3_T90_ACTIVE,CAPI_IND)
#define CAPI_CONNECT_B3_T90_ACTIVE_RESP CAPICMD(CAPI_CONNECT_B3_T90_ACTIVE,CAPI_RESP)
#define CAPI_DATA_B3_REQ CAPICMD(CAPI_DATA_B3,CAPI_REQ)
#define CAPI_DATA_B3_CONF CAPICMD(CAPI_DATA_B3,CAPI_CONF)
#define CAPI_DATA_B3_IND CAPICMD(CAPI_DATA_B3,CAPI_IND)
#define CAPI_DATA_B3_RESP CAPICMD(CAPI_DATA_B3,CAPI_RESP)
#define CAPI_DATA_B3_REQ CAPICMD(CAPI_DATA_B3,CAPI_REQ)
#define CAPI_DATA_B3_CONF CAPICMD(CAPI_DATA_B3,CAPI_CONF)
#define CAPI_DATA_B3_IND CAPICMD(CAPI_DATA_B3,CAPI_IND)
#define CAPI_DATA_B3_RESP CAPICMD(CAPI_DATA_B3,CAPI_RESP)
#define CAPI_DISCONNECT_B3_REQ CAPICMD(CAPI_DISCONNECT_B3,CAPI_REQ)
#define CAPI_DISCONNECT_B3_CONF CAPICMD(CAPI_DISCONNECT_B3,CAPI_CONF)
#define CAPI_DISCONNECT_B3_IND CAPICMD(CAPI_DISCONNECT_B3,CAPI_IND)
#define CAPI_DISCONNECT_B3_RESP CAPICMD(CAPI_DISCONNECT_B3,CAPI_RESP)
#define CAPI_DISCONNECT_B3_REQ CAPICMD(CAPI_DISCONNECT_B3,CAPI_REQ)
#define CAPI_DISCONNECT_B3_CONF CAPICMD(CAPI_DISCONNECT_B3,CAPI_CONF)
#define CAPI_DISCONNECT_B3_IND CAPICMD(CAPI_DISCONNECT_B3,CAPI_IND)
#define CAPI_DISCONNECT_B3_RESP CAPICMD(CAPI_DISCONNECT_B3,CAPI_RESP)
#define CAPI_RESET_B3_REQ CAPICMD(CAPI_RESET_B3,CAPI_REQ)
#define CAPI_RESET_B3_CONF CAPICMD(CAPI_RESET_B3,CAPI_CONF)
#define CAPI_RESET_B3_IND CAPICMD(CAPI_RESET_B3,CAPI_IND)
#define CAPI_RESET_B3_RESP CAPICMD(CAPI_RESET_B3,CAPI_RESP)
#define CAPI_RESET_B3_REQ CAPICMD(CAPI_RESET_B3,CAPI_REQ)
#define CAPI_RESET_B3_CONF CAPICMD(CAPI_RESET_B3,CAPI_CONF)
#define CAPI_RESET_B3_IND CAPICMD(CAPI_RESET_B3,CAPI_IND)
#define CAPI_RESET_B3_RESP CAPICMD(CAPI_RESET_B3,CAPI_RESP)
#define CAPI_LISTEN_REQ CAPICMD(CAPI_LISTEN,CAPI_REQ)
#define CAPI_LISTEN_CONF CAPICMD(CAPI_LISTEN,CAPI_CONF)
#define CAPI_LISTEN_REQ CAPICMD(CAPI_LISTEN,CAPI_REQ)
#define CAPI_LISTEN_CONF CAPICMD(CAPI_LISTEN,CAPI_CONF)
#define CAPI_MANUFACTURER_REQ CAPICMD(CAPI_MANUFACTURER,CAPI_REQ)
#define CAPI_MANUFACTURER_CONF CAPICMD(CAPI_MANUFACTURER,CAPI_CONF)
#define CAPI_MANUFACTURER_IND CAPICMD(CAPI_MANUFACTURER,CAPI_IND)
#define CAPI_MANUFACTURER_RESP CAPICMD(CAPI_MANUFACTURER,CAPI_RESP)
#define CAPI_MANUFACTURER_REQ CAPICMD(CAPI_MANUFACTURER,CAPI_REQ)
#define CAPI_MANUFACTURER_CONF CAPICMD(CAPI_MANUFACTURER,CAPI_CONF)
#define CAPI_MANUFACTURER_IND CAPICMD(CAPI_MANUFACTURER,CAPI_IND)
#define CAPI_MANUFACTURER_RESP CAPICMD(CAPI_MANUFACTURER,CAPI_RESP)
#define CAPI_FACILITY_REQ CAPICMD(CAPI_FACILITY,CAPI_REQ)
#define CAPI_FACILITY_CONF CAPICMD(CAPI_FACILITY,CAPI_CONF)
#define CAPI_FACILITY_IND CAPICMD(CAPI_FACILITY,CAPI_IND)
#define CAPI_FACILITY_RESP CAPICMD(CAPI_FACILITY,CAPI_RESP)
#define CAPI_FACILITY_REQ CAPICMD(CAPI_FACILITY,CAPI_REQ)
#define CAPI_FACILITY_CONF CAPICMD(CAPI_FACILITY,CAPI_CONF)
#define CAPI_FACILITY_IND CAPICMD(CAPI_FACILITY,CAPI_IND)
#define CAPI_FACILITY_RESP CAPICMD(CAPI_FACILITY,CAPI_RESP)
#define CAPI_INFO_REQ CAPICMD(CAPI_INFO,CAPI_REQ)
#define CAPI_INFO_CONF CAPICMD(CAPI_INFO,CAPI_CONF)
#define CAPI_INFO_IND CAPICMD(CAPI_INFO,CAPI_IND)
#define CAPI_INFO_RESP CAPICMD(CAPI_INFO,CAPI_RESP)
#define CAPI_INFO_REQ CAPICMD(CAPI_INFO,CAPI_REQ)
#define CAPI_INFO_CONF CAPICMD(CAPI_INFO,CAPI_CONF)
#define CAPI_INFO_IND CAPICMD(CAPI_INFO,CAPI_IND)
#define CAPI_INFO_RESP CAPICMD(CAPI_INFO,CAPI_RESP)
#endif /* __CAPICMD_H__ */

View File

@ -1,13 +1,7 @@
/*
* $Id: capidyn.c,v 1.1 2009/05/08 21:02:02 buzz Exp $
*
* $Log: capidyn.c,v $
* Revision 1.1 2009/05/08 21:02:02 buzz
* Add new libcapi20
*
* Revision 1.4 2004/01/16 15:27:11 calle
* remove several warnings.
*
* $Id$
*
* $Log$
* Revision 1.3 2004/01/16 14:57:22 calle
* gcc warning removed.
*
@ -23,16 +17,13 @@
#include <sys/types.h>
#define _LINUX_LIST_H
#ifndef WIN32
#include <linux/capi.h>
#endif
#include <string.h>
#include <unistd.h>
#include "capi20.h"
#include <dlfcn.h>
#define LIBCAPI "libcapi20.so.3"
#define LIBCAPI "libcapi20.so"
static int loadlib(void);
/* ---------------------------------------------------------------------- */
@ -124,7 +115,7 @@ capi20_get_version(unsigned Ctrl, unsigned char *Buf)
static unsigned char *
(*fptr_capi20_get_serial_number)(unsigned, unsigned char *);
unsigned char *
unsigned char *
capi20_get_serial_number(unsigned Ctrl, unsigned char *Buf)
{
if (loadlib() < 0)
@ -357,7 +348,7 @@ static void *handle;
#define resolv_sym(x) \
if ((fptr_##x = dlsym(handle, #x)) == 0) { \
(void)write(2, "Can't resolv " #x, sizeof("Can't resolv " #x)-1); \
write(2, "Can't resolv " #x, sizeof("Can't resolv " #x)-1); \
dlclose(handle); \
handle = 0; \
return -1; \
@ -373,12 +364,12 @@ static int loadlib(void)
handle = dlopen(LIBCAPI, RTLD_GLOBAL | RTLD_NOW);
if (handle == 0) {
err = dlerror();
(void)write(2, emsg, sizeof(emsg)-1);
(void)write(2, LIBCAPI, sizeof(LIBCAPI)-1);
(void)write(2, "\n", 1);
write(2, emsg, sizeof(emsg)-1);
write(2, LIBCAPI, sizeof(LIBCAPI)-1);
write(2, "\n", 1);
if (err) {
(void)write(2, err, strlen(err));
(void)write(2, "\n", 1);
write(2, err, strlen(err));
write(2, "\n", 1);
}
return -1;
}

View File

@ -1,7 +1,37 @@
/*
* $Id$
*
* This program is free software and may be modified and
* distributed under the terms of the GNU Public License.
* $Log$
* Revision 1.8 2005/02/22 11:39:43 keil
* for backward compatibility the libcapi20 can now compiled to support the
* old (buggy) version2 ABI. This is not for future developments. This is only
* to support old binaries, which are linked against the old V2 lib.
*
* Revision 1.7 2005/02/21 17:37:06 keil
* libcapi20 version 3.0.0
* - add SENDING COMPLETE in ALERT_REQ
* - add Globalconfiguration to CONNECT_REQ/RESP and SELECT_B_PROTOCOL_REQ
*
* * NOTE: incompatible to 2.X.Y versions
*
* Revision 1.6 2004/10/06 15:24:43 calle
* - "SendingComplete"-Patch reverted => 2.0.8 was not binaer compartible
* - Bugfix: capi20_register() with MaxB3Connection == 0 results in a
* core dump. Now at least one buffer is allocated.
*
* Revision 1.5 2004/06/14 11:23:48 calle
* Erweiterungen fuer ALERT_REQ.
*
* Revision 1.4 1999/09/10 17:20:33 calle
* Last changes for proposed standards (CAPI 2.0):
* - AK1-148 "Linux Extention"
* - AK1-155 "Support of 64-bit Applications"
*
* Revision 1.3 1998/08/30 09:57:17 calle
* I hope it is know readable for everybody.
*
* Revision 1.1 1998/08/25 16:33:19 calle
* Added CAPI2.0 library. First Version.
*
*/

View File

@ -1,11 +1,6 @@
#ifndef __CAPIUTILS_H__
#define __CAPIUTILS_H__
/*
* This program is free software and may be modified and
* distributed under the terms of the GNU Public License.
*/
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
@ -112,54 +107,11 @@ typedef enum { CAPI_COMPOSE = 0, CAPI_DEFAULT = 1 } _cmstruct;
/*-----------------------------------------------------------------------*/
static inline _cword _capimsg_getu16(void *m, int off)
{
_cword r = 0;
_cbyte *p;
p = (_cbyte *)m;
p += off;
r = p[1];
r <<= 8;
r |= *p;
return r;
}
static inline _cdword _capimsg_getu32(void *m, int off)
{
_cdword r = 0;
_cbyte *p, i;
p = (_cbyte *)m;
p += off + 3;
for (i = 0; i < 3; i++) {
r |= *p--;
r <<= 8;
}
r |= *p;
return r;
}
static inline _cqword _capimsg_getu64(void *m, int off)
{
_cqword r = 0;
_cbyte *p, i;
p = (_cbyte *)m;
p += off + 7;
for (i = 0; i < 7; i++) {
r |= *p--;
r <<= 8;
}
r |= *p;
return r;
}
#define CAPIMSG_BASELEN 8
#define CAPIMSG_U8(m, off) (*((_cbyte *)(m + off)))
#define CAPIMSG_U16(m, off) _capimsg_getu16(m, off)
#define CAPIMSG_U32(m, off) _capimsg_getu32(m, off)
#define CAPIMSG_U64(m, off) _capimsg_getu64(m, off)
#define CAPIMSG_U8(m, off) (m[off])
#define CAPIMSG_U16(m, off) (m[off]|(m[(off)+1]<<8))
#define CAPIMSG_U32(m, off) (m[off]|(m[(off)+1]<<8)|(m[(off)+2]<<16)|(m[(off)+3]<<24))
#define CAPIMSG_U64(m, off) (((_cqword)CAPIMSG_U32(m, off))|(((_cqword)CAPIMSG_U32(m, off+4))<<32))
#define CAPIMSG_LEN(m) CAPIMSG_U16(m,0)
#define CAPIMSG_APPID(m) CAPIMSG_U16(m,2)
#define CAPIMSG_COMMAND(m) CAPIMSG_U8(m,4)
@ -267,7 +219,7 @@ typedef struct {
_cdword Function;
#ifndef CAPI_LIBRARY_V2
_cstruct Globalconfiguration;
#endif
#endif
_cstruct HLC;
_cword Info;
_cstruct InfoElement;
@ -284,7 +236,7 @@ typedef struct {
_cstruct Useruserdata;
#ifndef CAPI_LIBRARY_V2
_cstruct SendingComplete;
#endif
#endif
unsigned char *Data;
/* intern */
@ -370,10 +322,6 @@ char *capi_info2str(_cword reason);
#define capi20_cmd2str capi_cmd2str
char *capi_cmd2str(_cbyte cmd, _cbyte subcmd);
/*
* WARNING: The following two functions use a single static buffer and
* are not thread-safe.
*/
#define capi20_cmsg2str capi_cmsg2str
char *capi_cmsg2str(_cmsg * cmsg);
@ -432,7 +380,7 @@ char *capi_message2str(_cbyte * msg);
#ifndef CAPI_LIBRARY_V2
#define CONNECT_REQ_GLOBALCONFIGURATION(x) ((x)->Globalconfiguration)
/* all layer parameter */
#endif
#endif
#define CONNECT_REQ_BC(x) ((x)->BC)
/* Bearer Capability */
#define CONNECT_REQ_LLC(x) ((x)->LLC)

1064
capi20/config.guess vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,77 +0,0 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* build libcapi20 version 2 compatible library */
#undef CAPI_LIBRARY_V2
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <linux/capi.h> header file. */
#undef HAVE_LINUX_CAPI_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `select' function. */
#undef HAVE_SELECT
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION

435
capi20/config.sub vendored
View File

@ -1,10 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2012-02-10'
timestamp='2004-02-23'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -21,25 +20,23 @@ timestamp='2012-02-10'
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted GNU ChangeLog entry.
# diff and a properly formatted ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
@ -73,8 +70,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@ -87,11 +83,11 @@ Try \`$me --help' for more information."
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
echo "$timestamp" ; exit ;;
echo "$timestamp" ; exit 0 ;;
--version | -v )
echo "$version" ; exit ;;
echo "$version" ; exit 0 ;;
--help | --h* | -h )
echo "$usage"; exit ;;
echo "$usage"; exit 0 ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@ -103,7 +99,7 @@ while test $# -gt 0 ; do
*local*)
# First pass through any local machine types.
echo $1
exit ;;
exit 0;;
* )
break ;;
@ -122,18 +118,11 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
android-linux)
os=-linux-android
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
@ -156,13 +145,10 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis | -knuth | -cray | -microblaze)
-apple | -axis)
os=
basic_machine=$1
;;
-bluegene*)
os=-cnk
;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
@ -177,17 +163,13 @@ case $os in
os=-chorusos
basic_machine=$1
;;
-chorusrdb)
os=-chorusrdb
-chorusrdb)
os=-chorusrdb
basic_machine=$1
;;
;;
-hiux*)
os=-hiuxwe2
;;
-sco6)
os=-sco5v6
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@ -204,10 +186,6 @@ case $os in
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@ -249,36 +227,25 @@ case $basic_machine in
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
| aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| be32 | be64 \
| bfin \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
| fido | fr30 | frv \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep | metag \
| m32r | m68000 | m68k | m88k | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
| mips64octeon | mips64octeonel \
| mips64orion | mips64orionel \
| mips64r5900 | mips64r5900el \
| mips64vr | mips64vrel \
| mips64orion | mips64orionel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
@ -287,65 +254,30 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
| nios | nios2 \
| ns16k | ns32k \
| open8 \
| or32 \
| openrisc | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu \
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
| x86 | xscale | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
c54x)
basic_machine=tic54x-unknown
;;
c55x)
basic_machine=tic55x-unknown
;;
c6x)
basic_machine=tic6x-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
os=-none
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
ms1)
basic_machine=mt-unknown
;;
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
xgate)
basic_machine=$basic_machine-unknown
os=-none
;;
xscaleeb)
basic_machine=armeb-unknown
;;
xscaleel)
basic_machine=armel-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
@ -361,40 +293,32 @@ case $basic_machine in
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \
| avr-* \
| bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m32r-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
| m88110-* | m88k-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
| mips64octeon-* | mips64octeonel-* \
| mips64orion-* | mips64orionel-* \
| mips64r5900-* | mips64r5900el-* \
| mips64vr-* | mips64vrel-* \
| mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
@ -402,39 +326,26 @@ case $basic_machine in
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
| tahoe-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
| tron-* \
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
| xtensa-* \
| ymp-* \
| z8k-* | z80-*)
;;
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
basic_machine=$basic_machine-unknown
| z8k-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@ -452,7 +363,7 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
abacus)
abacus)
basic_machine=abacus-unknown
;;
adobe68k)
@ -498,10 +409,6 @@ case $basic_machine in
basic_machine=m68k-apollo
os=-bsd
;;
aros)
basic_machine=i386-pc
os=-aros
;;
aux)
basic_machine=m68k-apple
os=-aux
@ -510,35 +417,10 @@ case $basic_machine in
basic_machine=ns32k-sequent
os=-dynix
;;
blackfin)
basic_machine=bfin-unknown
os=-linux
;;
blackfin-*)
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
bluegene*)
basic_machine=powerpc-ibm
os=-cnk
;;
c54x-*)
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c55x-*)
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c6x-*)
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c90)
basic_machine=c90-cray
os=-unicos
;;
cegcc)
basic_machine=arm-unknown
os=-cegcc
;;
convex-c1)
basic_machine=c1-convex
os=-bsd
@ -563,20 +445,13 @@ case $basic_machine in
basic_machine=j90-cray
os=-unicos
;;
craynv)
basic_machine=craynv-cray
os=-unicosmp
;;
cr16 | cr16-*)
basic_machine=cr16-unknown
cr16c)
basic_machine=cr16c-unknown
os=-elf
;;
crds | unos)
basic_machine=m68k-crds
;;
crisv32 | crisv32-* | etraxfs*)
basic_machine=crisv32-axis
;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
@ -606,14 +481,6 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
dicos)
basic_machine=i686-pc
os=-dicos
;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
@ -725,6 +592,7 @@ case $basic_machine in
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
@ -763,14 +631,6 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
;;
m68knommu-*)
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
m88k-omron*)
basic_machine=m88k-omron
;;
@ -782,17 +642,10 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
microblaze)
basic_machine=microblaze-xilinx
;;
mingw32)
basic_machine=i386-pc
os=-mingw32
;;
mingw32ce)
basic_machine=arm-unknown
os=-mingw32ce
;;
miniframe)
basic_machine=m68000-convergent
;;
@ -806,6 +659,10 @@ case $basic_machine in
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
mmix*)
basic_machine=mmix-knuth
os=-mmixware
;;
monitor)
basic_machine=m68k-rom68k
os=-coff
@ -818,21 +675,10 @@ case $basic_machine in
basic_machine=i386-pc
os=-msdos
;;
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
basic_machine=i386-pc
os=-msys
;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
nacl)
basic_machine=le32-unknown
os=-nacl
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
@ -897,11 +743,9 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
neo-tandem)
basic_machine=neo-tandem
;;
nse-tandem)
basic_machine=nse-tandem
nv1)
basic_machine=nv1-cray
os=-unicosmp
;;
nsr-tandem)
basic_machine=nsr-tandem
@ -910,8 +754,9 @@ case $basic_machine in
basic_machine=hppa1.1-oki
os=-proelf
;;
openrisc | openrisc-*)
or32 | or32-*)
basic_machine=or32-unknown
os=-coff
;;
os400)
basic_machine=powerpc-ibm
@ -933,14 +778,6 @@ case $basic_machine in
basic_machine=i860-intel
os=-osf
;;
parisc)
basic_machine=hppa-unknown
os=-linux
;;
parisc-*)
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
pbd)
basic_machine=sparc-tti
;;
@ -950,12 +787,6 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pc98)
basic_machine=i386-pc
;;
pc98-*)
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@ -985,10 +816,9 @@ case $basic_machine in
;;
power) basic_machine=power-ibm
;;
ppc | ppcbe) basic_machine=powerpc-unknown
ppc) basic_machine=powerpc-unknown
;;
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
@ -1013,10 +843,6 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
rdos)
basic_machine=i386-pc
os=-rdos
;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@ -1043,10 +869,6 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sde)
basic_machine=mipsisa32-sde
os=-elf
;;
sei)
basic_machine=mips-sei
os=-seiux
@ -1058,9 +880,6 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
sh5el)
basic_machine=sh5le-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
@ -1082,9 +901,6 @@ case $basic_machine in
basic_machine=i860-stratus
os=-sysv4
;;
strongarm-* | thumb-*)
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
sun2)
basic_machine=m68000-sun
;;
@ -1141,9 +957,17 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
tile*)
basic_machine=$basic_machine-unknown
os=-linux-gnu
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
;;
tic55x | c55x*)
basic_machine=tic55x-unknown
os=-coff
;;
tic6x | c6x*)
basic_machine=tic6x-unknown
os=-coff
;;
tx39)
basic_machine=mipstx39-unknown
@ -1205,16 +1029,9 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
xbox)
basic_machine=i686-pc
os=-mingw32
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
xscale-* | xscalee[bl]-*)
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
;;
ymp)
basic_machine=ymp-cray
os=-unicos
@ -1223,10 +1040,6 @@ case $basic_machine in
basic_machine=z8k-unknown
os=-sim
;;
z80-*-coff)
basic_machine=z80-unknown
os=-sim
;;
none)
basic_machine=none-none
os=-none
@ -1246,9 +1059,6 @@ case $basic_machine in
romp)
basic_machine=romp-ibm
;;
mmix)
basic_machine=mmix-knuth
;;
rs6000)
basic_machine=rs6000-ibm
;;
@ -1265,10 +1075,13 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
sh64)
basic_machine=sh64-unknown
;;
sparc | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
cydra)
@ -1312,12 +1125,9 @@ esac
if [ x"$os" != x"" ]
then
case $os in
# First match some system type aliases
# that might get confused with valid system types.
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
-auroraux)
os=-auroraux
;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
@ -1338,31 +1148,26 @@ case $os in
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -openbsd* | -solidbsd* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@ -1380,7 +1185,7 @@ case $os in
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
@ -1389,9 +1194,6 @@ case $os in
-linux-dietlibc)
os=-linux-dietlibc
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
-sunos5*)
os=`echo $os | sed -e 's|sunos5|solaris2|'`
;;
@ -1401,7 +1203,7 @@ case $os in
-opened*)
os=-openedition
;;
-os400*)
-os400*)
os=-os400
;;
-wince*)
@ -1450,7 +1252,7 @@ case $os in
-sinix*)
os=-sysv4
;;
-tpf*)
-tpf*)
os=-tpf
;;
-triton*)
@ -1489,14 +1291,6 @@ case $os in
-kaos*)
os=-kaos
;;
-zvmoe)
os=-zvmoe
;;
-dicos*)
os=-dicos
;;
-nacl*)
;;
-none)
;;
*)
@ -1519,12 +1313,6 @@ else
# system, and we'll never get to this point.
case $basic_machine in
score-*)
os=-elf
;;
spu-*)
os=-elf
;;
*-acorn)
os=-riscix1.2
;;
@ -1534,18 +1322,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
;;
tic54x-*)
os=-coff
;;
tic55x-*)
os=-coff
;;
tic6x-*)
os=-coff
;;
c4x-* | tic4x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@ -1564,13 +1343,13 @@ case $basic_machine in
;;
m68000-sun)
os=-sunos3
# This also exists in the configure program, but was not the
# default.
# os=-sunos4
;;
m68*-cisco)
os=-aout
;;
mep-*)
os=-elf
;;
mips*-cisco)
os=-elf
;;
@ -1589,15 +1368,9 @@ case $basic_machine in
*-be)
os=-beos
;;
*-haiku)
os=-haiku
;;
*-ibm)
os=-aix
;;
*-knuth)
os=-mmixware
;;
*-wec)
os=-proelf
;;
@ -1700,7 +1473,7 @@ case $basic_machine in
-sunos*)
vendor=sun
;;
-cnk*|-aix*)
-aix*)
vendor=ibm
;;
-beos*)
@ -1763,7 +1536,7 @@ case $basic_machine in
esac
echo $basic_machine$os
exit
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)

26332
capi20/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50)
AC_INIT(capi20.c)
AC_ARG_ENABLE([V2],
AS_HELP_STRING([--enable-V2],[build libcapi20 version 2 compatible library]),

View File

@ -1,7 +1,79 @@
/*
* $Id$
*
* This program is free software and may be modified and
* distributed under the terms of the GNU Public License.
* $Log$
* Revision 1.19 2005/05/09 08:23:01 calle
* - added SendingComplete to CONNECT_RESP (no funktions changed).
*
* Revision 1.18 2005/03/08 07:26:47 keil
* - add SENDING_COMPLETE to INFO_REQ CONNECT_REQ and CONNECT_IND
* - remove SENDING_COMPLETE parameter (always NULL) from capi_fill_DISCONNECT_REQ
*
* Revision 1.17 2005/03/04 11:45:12 calle
* SendingComplete was missing for DISCONNECT_REQ ...
*
* Revision 1.16 2005/03/04 10:57:05 calle
* Bugfix: CAPI_LIBRARY_V2 sone ifdef/ifndef where wrong.
*
* Revision 1.15 2005/02/22 11:39:43 keil
* for backward compatibility the libcapi20 can now compiled to support the
* old (buggy) version2 ABI. This is not for future developments. This is only
* to support old binaries, which are linked against the old V2 lib.
*
* Revision 1.14 2005/02/21 17:37:07 keil
* libcapi20 version 3.0.0
* - add SENDING COMPLETE in ALERT_REQ
* - add Globalconfiguration to CONNECT_REQ/RESP and SELECT_B_PROTOCOL_REQ
*
* * NOTE: incompatible to 2.X.Y versions
*
* Revision 1.13 2004/10/06 15:24:43 calle
* - "SendingComplete"-Patch reverted => 2.0.8 was not binaer compartible
* - Bugfix: capi20_register() with MaxB3Connection == 0 results in a
* core dump. Now at least one buffer is allocated.
*
* Revision 1.12 2004/06/14 11:23:48 calle
* Erweiterungen fuer ALERT_REQ.
*
* Revision 1.11 2001/03/01 14:59:11 paul
* Various patches to fix errors when using the newest glibc,
* replaced use of insecure tempnam() function
* and to remove warnings etc.
*
* Revision 1.10 2000/05/18 15:02:26 calle
* Updated _cmsg handling added new functions need by "capiconn".
*
* Revision 1.9 1999/12/06 17:08:30 calle
* - Splitted capi20.h into capi20.h and capiutils.h.
* - capi20.h: the functions from the CAPI-2.0 Spec
* - capiutils.h: the "CAPI-ADK" functions
* - bug in 64Bit-Support fixed.
*
* Revision 1.8 1999/10/20 16:43:17 calle
* - The CAPI20 library is now a shared library.
* - Arguments of function capi20_put_message swapped, to match capi spec.
* - All capi20 related subdirs converted to use automake.
* - Removed dependency to CONFIG_KERNELDIR where not needed.
*
* Revision 1.7 1999/09/15 08:10:44 calle
* Bugfix: error in 64Bit extention.
*
* Revision 1.6 1999/09/10 17:20:33 calle
* Last changes for proposed standards (CAPI 2.0):
* - AK1-148 "Linux Extention"
* - AK1-155 "Support of 64-bit Applications"
*
* Revision 1.5 1999/09/06 17:40:07 calle
* Changes for CAPI 2.0 Spec.
*
* Revision 1.4 1998/10/23 12:20:44 fritz
* Added some missing functions.
*
* Revision 1.3 1998/08/30 09:57:21 calle
* I hope it is know readable for everybody.
*
* Revision 1.1 1998/08/25 16:33:23 calle
* Added CAPI2.0 library. First Version.
*
*/
#include <assert.h>
@ -11,7 +83,6 @@
#include <stddef.h>
#include <time.h>
#include <ctype.h>
#include <byteswap.h>
#include "capi20.h"
@ -96,58 +167,58 @@ char *capi_info2str(_cword reason)
/*-- error information concerning requested services -----*/
case 0x3001:
return "B1 protocol not supported";
case 0x3002:
case 0x3002:
return "B2 protocol not supported";
case 0x3003:
case 0x3003:
return "B3 protocol not supported";
case 0x3004:
case 0x3004:
return "B1 protocol parameter not supported";
case 0x3005:
case 0x3005:
return "B2 protocol parameter not supported";
case 0x3006:
case 0x3006:
return "B3 protocol parameter not supported";
case 0x3007:
case 0x3007:
return "B protocol combination not supported";
case 0x3008:
case 0x3008:
return "NCPI not supported";
case 0x3009:
case 0x3009:
return "CIP Value unknown";
case 0x300A:
case 0x300A:
return "Flags not supported (reserved bits)";
case 0x300B:
case 0x300B:
return "Facility not supported";
case 0x300C:
case 0x300C:
return "Data length not supported by current protocol";
case 0x300D:
case 0x300D:
return "Reset procedure not supported by current protocol";
/*-- informations about the clearing of a physical connection -----*/
case 0x3301:
case 0x3301:
return "Protocol error layer 1 (broken line or B-channel removed by signalling protocol)";
case 0x3302:
case 0x3302:
return "Protocol error layer 2";
case 0x3303:
case 0x3303:
return "Protocol error layer 3";
case 0x3304:
case 0x3304:
return "Another application got that call";
/*-- T.30 specific reasons -----*/
case 0x3311:
case 0x3311:
return "Connecting not successful (remote station is no FAX G3 machine)";
case 0x3312:
case 0x3312:
return "Connecting not successful (training error)";
case 0x3313:
case 0x3313:
return "Disconnected before transfer (remote station does not support transfer mode, e.g. resolution)";
case 0x3314:
case 0x3314:
return "Disconnected during transfer (remote abort)";
case 0x3315:
case 0x3315:
return "Disconnected during transfer (remote procedure error, e.g. unsuccessful repetition of T.30 commands)";
case 0x3316:
case 0x3316:
return "Disconnected during transfer (local tx data underrun)";
case 0x3317:
case 0x3317:
return "Disconnected during transfer (local rx data overflow)";
case 0x3318:
case 0x3318:
return "Disconnected during transfer (local abort)";
case 0x3319:
case 0x3319:
return "Illegal parameter coding (e.g. SFF coding error)";
/*-- disconnect causes from the network according to ETS 300 102-1/Q.931 -----*/
@ -155,7 +226,7 @@ char *capi_info2str(_cword reason)
case 0x3482: return "No route to specified transit network";
case 0x3483: return "No route to destination";
case 0x3486: return "Channel unacceptable";
case 0x3487:
case 0x3487:
return "Call awarded and being delivered in an established channel";
case 0x3490: return "Normal call clearing";
case 0x3491: return "User busy";
@ -207,7 +278,7 @@ char *capi_info2str(_cword reason)
case 0x3500: return "Normal end of connection";
case 0x3501: return "Carrier lost";
case 0x3502: return "Error in negotiation, i.e. no modem with error correction at the other end";
case 0x3502: return "Error in negotation, i.e. no modem with error correction at the other end";
case 0x3503: return "No answer to protocol request";
case 0x3504: return "Remote modem only works in synchronous mode";
case 0x3505: return "Framing fails";
@ -410,34 +481,20 @@ static unsigned char *cpars[] = {
/*-------------------------------------------------------*/
#ifdef _BIG_ENDIAN
#define wordTLcpy(x,y) *(_cword *)(x)=bswap_16(*(_cword *)(y));
#define dwordTLcpy(x,y) *(_cdword *)(x)=bswap_32(*(_cdword *)(y));
#define byteTLcpy(x,y) *(_cbyte *)(x)=*(_cbyte *)(y);
#define wordTLcpy(x,y) capimsg_setu16(x, 0, *(_cword *)(y))
#define dwordTLcpy(x,y) capimsg_setu32(x, 0, *(_cdword *)(y))
#define structTLcpy(x,y,l) memcpy (x,y,l)
#define structTLcpyovl(x,y,l) memmove (x,y,l)
#define wordTRcpy(x,y) *(_cword *)(y)=bswap_16(*(_cword *)(x));
#define dwordTRcpy(x,y) *(_cdword *)(y)=bswap_32(*(_cdword *)(x));
#define qwordTLcpy(x,y) *(_cqword *)(x)=bswap_64(*(_cqword *)(y));
#define qwordTRcpy(x,y) *(_cqword *)(y)=bswap_64(*(_cqword *)(x));
#else
#define wordTLcpy(x,y) *(_cword *)(x)=*(_cword *)(y);
#define dwordTLcpy(x,y) memcpy(x,y,4);
#define wordTRcpy(x,y) *(_cword *)(y)=*(_cword *)(x);
#define dwordTRcpy(x,y) memcpy(y,x,4);
#define byteTRcpy(x,y) *(_cbyte *)(y)=*(_cbyte *)(x);
#define wordTRcpy(x,y) *(_cword *)(y)=CAPIMSG_U16((x), 0)
#define dwordTRcpy(x,y) *(_cdword *)(y)=CAPIMSG_U32((x), 0)
#define structTRcpy(x,y,l) memcpy (y,x,l)
#define structTRcpyovl(x,y,l) memmove (y,x,l)
#define qwordTLcpy(x,y) memcpy(x,y,8);
#define qwordTRcpy(x,y) memcpy(y,x,8);
#endif
#define byteTLcpy(x,y) *(_cbyte *)(x)=*(_cbyte *)(y);
#define byteTRcpy(x,y) *(_cbyte *)(y)=*(_cbyte *)(x);
#define structTLcpy(x,y,l) memcpy (x,y,l)
#define structTLcpyovl(x,y,l) memmove (x,y,l)
#define structTRcpy(x,y,l) memcpy (y,x,l)
#define structTRcpyovl(x,y,l) memmove (y,x,l)
/*-------------------------------------------------------*/
static unsigned command_2_index(unsigned c, unsigned sc)
@ -502,11 +559,9 @@ static void pars_2_message(_cmsg * cmsg)
structTLcpy(cmsg->m + cmsg->l, *(_cstruct *) OFF, 1 + **(_cstruct *) OFF);
cmsg->l += 1 + **(_cstruct *) OFF;
} else {
_cword iw;
_cstruct s = *(_cstruct *) OFF;
structTLcpy(cmsg->m + cmsg->l, s, 3 + *(_cword *) (s + 1));
wordTLcpy(&iw, (s + 1));
cmsg->l += 3 + iw;
cmsg->l += 3 + *(_cword *) (s + 1);
}
break;
case _CMSTRUCT:
@ -519,7 +574,7 @@ static void pars_2_message(_cmsg * cmsg)
/*----- Metastruktur wird composed -----*/
else {
unsigned _l = cmsg->l;
_cword _ls;
unsigned _ls;
cmsg->l++;
cmsg->p++;
pars_2_message(cmsg);
@ -592,13 +647,10 @@ static void message_2_pars(_cmsg * cmsg)
case _CSTRUCT:
*(_cbyte **) OFF = cmsg->m + cmsg->l;
if (cmsg->m[cmsg->l] != 0xff) {
if (cmsg->m[cmsg->l] != 0xff)
cmsg->l += 1 + cmsg->m[cmsg->l];
} else {
_cword iw;
wordTLcpy(&iw, (cmsg->m + cmsg->l + 1));
cmsg->l += 3 + iw;
}
else
cmsg->l += 3 + *(_cword *) (cmsg->m + cmsg->l + 1);
break;
case _CMSTRUCT:
/*----- Metastruktur 0 -----*/
@ -842,14 +894,10 @@ static char *p = 0;
static void bufprint(char *fmt,...)
{
va_list f;
size_t space = buf + sizeof(buf) - p, len;
va_start(f, fmt);
len = vsnprintf(p, space, fmt, f);
vsprintf(p, fmt, f);
va_end(f);
if (len < space - 1)
p += len;
else
p += space - 1;
p += strlen(p);
}
static void printstructlen(_cbyte * m, unsigned len)
@ -879,9 +927,7 @@ static void printstruct(_cbyte * m)
len = m[0];
m += 1;
} else {
_cword iw;
wordTLcpy(&iw, (m + 1));
len = (unsigned)iw;
len = ((_cword *) (m + 1))[0];
m += 3;
}
printstructlen(m, len);
@ -892,10 +938,6 @@ static void printstruct(_cbyte * m)
static void protocol_message_2_pars(_cmsg * cmsg, int level)
{
_cword iw;
_cdword idw;
_cqword iq;
for (; TYP != _CEND; cmsg->p++) {
int slen = 29 + 3 - level;
int i;
@ -910,35 +952,28 @@ static void protocol_message_2_pars(_cmsg * cmsg, int level)
cmsg->l++;
break;
case _CWORD:
wordTLcpy(&iw, (cmsg->m + cmsg->l));
bufprint("%-*s = 0x%x\n", slen, NAME, iw);
bufprint("%-*s = 0x%x\n", slen, NAME, *(_cword *) (cmsg->m + cmsg->l));
cmsg->l += 2;
break;
case _CDWORD:
dwordTLcpy(&idw, (cmsg->m + cmsg->l));
bufprint("%-*s = 0x%lx\n", slen, NAME, idw);
bufprint("%-*s = 0x%lx\n", slen, NAME, *(_cdword *) (cmsg->m + cmsg->l));
cmsg->l += 4;
break;
case _CQWORD:
qwordTLcpy(&iq, (cmsg->m + cmsg->l));
bufprint("%-*s = 0x%llx\n", slen, NAME, iq);
bufprint("%-*s = 0x%llx\n", slen, NAME, *(_cqword *) (cmsg->m + cmsg->l));
cmsg->l += 4;
break;
case _CSTRUCT:
bufprint("%-*s = ", slen, NAME);
if (cmsg->m[cmsg->l] == '\0') {
if (cmsg->m[cmsg->l] == '\0')
bufprint("default");
} else {
else
printstruct(cmsg->m + cmsg->l);
}
bufprint("\n");
if (cmsg->m[cmsg->l] != 0xff) {
if (cmsg->m[cmsg->l] != 0xff)
cmsg->l += 1 + cmsg->m[cmsg->l];
} else {
_cword iw;
wordTLcpy(&iw, (cmsg->m + cmsg->l + 1));
cmsg->l += 3 + iw;
}
else
cmsg->l += 3 + *(_cword *) (cmsg->m + cmsg->l + 1);
break;
@ -963,10 +998,10 @@ static void protocol_message_2_pars(_cmsg * cmsg, int level)
/*-------------------------------------------------------*/
char *capi_message2str(_cbyte * msg)
{
_cmsg cmsg;
p = buf;
p[0] = 0;
_cword id, msgnum, len;
cmsg.m = msg;
cmsg.l = 8;
@ -975,13 +1010,11 @@ char *capi_message2str(_cbyte * msg)
byteTRcpy(cmsg.m + 5, &cmsg.Subcommand);
cmsg.par = cpars[command_2_index(cmsg.Command, cmsg.Subcommand)];
wordTLcpy(&id, &msg[2]);
wordTLcpy(&msgnum, &msg[6]);
wordTLcpy(&len, &msg[0]);
bufprint("%-26s ID=%03d #0x%04x LEN=%04d\n",
mnames[command_2_index(cmsg.Command, cmsg.Subcommand)],
id, msgnum, len);
((unsigned short *) msg)[1],
((unsigned short *) msg)[3],
((unsigned short *) msg)[0]);
protocol_message_2_pars(&cmsg, 1);
return buf;
@ -989,21 +1022,15 @@ char *capi_message2str(_cbyte * msg)
char *capi_cmsg2str(_cmsg * cmsg)
{
_cword id, msgnum, len;
p = buf;
p[0] = 0;
cmsg->l = 8;
cmsg->p = 0;
wordTLcpy(&id, &cmsg->m[2]);
wordTLcpy(&msgnum, &cmsg->m[6]);
wordTLcpy(&len, &cmsg->m[0]);
bufprint("%-26s ID=%03d #0x%04x LEN=%04d\n",
bufprint("%s ID=%03d #0x%04x LEN=%04d\n",
mnames[command_2_index(cmsg->Command, cmsg->Subcommand)],
id, msgnum, len);
((_cword *) cmsg->m)[1],
((_cword *) cmsg->m)[3],
((_cword *) cmsg->m)[0]);
protocol_message_2_pars(cmsg, 1);
return buf;
}

View File

@ -1,527 +1,2 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2011-01-19.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
# Protect names problematic for `test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
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
# Protect names problematic for `test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
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
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 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 problematic for `test' and other utilities.
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
# 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 X"$d" = X && 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:
exit 0

View File

@ -779,7 +779,7 @@ if test -n "$pic_flag"; then
if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
# Append any warnings to the config.log.
cat conftest.err 1>&5
case "$host_os" in
hpux9* | hpux10* | hpux11*)
# On HP-UX, both CC and GCC only warn that PIC is supported... then they
@ -939,7 +939,7 @@ if test "$with_gcc" = yes; then
else
no_builtin_flag=' -fno-builtin'
fi
fi
# Check for any special shared library compilation flags.
@ -1191,7 +1191,7 @@ EOF
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
$CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
;;
netbsd*)
@ -1223,7 +1223,7 @@ EOF
else
ld_shlibs=no
fi
;;
;;
sunos4*)
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts'
@ -1447,7 +1447,7 @@ else
hardcode_direct=yes
hardcode_shlibpath_var=no
;;
sco3.2v5*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
hardcode_shlibpath_var=no
@ -1481,7 +1481,7 @@ else
sysv4)
if test "x$host_vendor" = xsequent; then
# Use $CC to link under sequent, because it throws in some extra .o
# Use $CC to link under sequent, because it throws in some extra .o
# files that make .init and .fini sections work.
archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $linkopts'
else
@ -1489,8 +1489,8 @@ else
fi
runpath_var='LD_RUN_PATH'
hardcode_shlibpath_var=no
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
;;
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
;;
sysv4.3*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
@ -1887,7 +1887,7 @@ cygwin* | mingw*)
freebsd1*)
dynamic_linker=no
;;
freebsd*)
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
version_type=freebsd-$objformat
@ -2467,10 +2467,10 @@ fi
fi
fi
fi
@ -2576,7 +2576,7 @@ else
fnord() { int i=42;}
main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
EOF
if { (eval echo $progname:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
@ -2649,7 +2649,7 @@ else
fnord() { int i=42;}
main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
EOF
if { (eval echo $progname:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2012-01-06.13; # UTC
scriptversion=2003-09-02.23
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@ -18,7 +18,9 @@ scriptversion=2012-01-06.13; # UTC
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@ -31,8 +33,6 @@ if test $# -eq 0; then
fi
run=:
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
@ -44,7 +44,7 @@ fi
msg="missing on your system"
case $1 in
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
@ -60,6 +60,11 @@ case $1 in
msg="probably too old"
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
-h|--h|--he|--hel|--help)
echo "\
@ -77,25 +82,20 @@ Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
\`g' are ignored when checking the name.
Send bug reports to <bug-automake@gnu.org>."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
@ -104,40 +104,12 @@ Send bug reports to <bug-automake@gnu.org>."
exit 1
;;
esac
# normalize program name to check for.
program=`echo "$1" | sed '
s/^gnu-//; t
s/^gnu//; t
s/^g//; t'`
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program). This is about non-GNU programs, so use $1 not
# $program.
case $1 in
lex*|yacc*)
# Not GNU programs, they don't have --version.
;;
*)
aclocal*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case $program in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
@ -146,7 +118,12 @@ WARNING: \`$1' is $msg. You should only need it if
touch aclocal.m4
;;
autoconf*)
autoconf)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
@ -155,7 +132,12 @@ WARNING: \`$1' is $msg. You should only need it if
touch configure
;;
autoheader*)
autoheader)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
@ -165,7 +147,7 @@ WARNING: \`$1' is $msg. You should only need it if
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case $f in
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
@ -175,6 +157,11 @@ WARNING: \`$1' is $msg. You should only need it if
;;
automake*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
@ -185,7 +172,12 @@ WARNING: \`$1' is $msg. You should only need it if
while read f; do touch "$f"; done
;;
autom4te*)
autom4te)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
@ -193,8 +185,8 @@ WARNING: \`$1' is needed, but is $msg.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then
touch $file
else
@ -208,78 +200,90 @@ WARNING: \`$1' is needed, but is $msg.
fi
;;
bison*|yacc*)
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if test $# -ne 1; then
eval LASTARG=\${$#}
case $LASTARG in
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if test -f "$SRCFILE"; then
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if test -f "$SRCFILE"; then
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if test ! -f y.tab.h; then
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if test ! -f y.tab.c; then
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex*|flex*)
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if test $# -ne 1; then
eval LASTARG=\${$#}
case $LASTARG in
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if test -f "$SRCFILE"; then
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if test ! -f lex.yy.c; then
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man*)
help2man)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit $?
exit 1
fi
;;
makeinfo*)
makeinfo)
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
# We have makeinfo, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
@ -287,27 +291,53 @@ WARNING: \`$1' is $msg. You should only need it if
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '
/^@setfilename/{
s/.* \([^ ]*\) *$/\1/
p
q
}' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
# If the file does not exist, the user really needs makeinfo;
# let's fail without touching anything.
test -f $file || exit 1
touch $file
;;
tar)
shift
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
@ -326,6 +356,5 @@ exit 0
# 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"
# time-stamp-end: "$"
# End:

View File

@ -4,7 +4,7 @@
# Created: 1993-05-16
# Public domain
# $Id: mkinstalldirs,v 1.1 1999/10/20 16:43:17 calle Exp $
# $Id$
errstatus=0
@ -27,7 +27,7 @@ do
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
errstatus=$lasterr
fi
fi

9
capifax/.cvsignore Normal file
View File

@ -0,0 +1,9 @@
config.log
config.h
config.cache
config.status
stamp-h
Makefile
.deps
capifax
capifaxrcvd

Some files were not shown because too many files have changed in this diff Show More