зеркало из https://github.com/mozilla/pjs.git
Resolves: bug 363168
Description: Add autotool support to svrcore; have svrcore build shared libs Fix Description: This is a pretty basic autotool-ization using libtool to build the shared library. The vast majority of the work was done by Toshio-san. However, there are a couple of extras worth noting: 1) Windows builds are different now. In order to build on Windows using the MSVC compiler, you still have to use coreconf. I just could not get configure/libtool to work correctly with the MSVC compiler. The old makefile has been moved to src/Makefile.win, so you just have to cd src ; make -f Makefile.win I also updated the README and INSTALL.win to add this information. 2) I added some m4 files to find and figure out which nspr and nss to use based on the environment and pkg-config.
This commit is contained in:
Родитель
bf7fc26186
Коммит
99b8e5f3ef
|
@ -0,0 +1,340 @@
|
|||
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
|
||||
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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.
|
|
@ -1,69 +1,231 @@
|
|||
Building:
|
||||
Installation Instructions
|
||||
*************************
|
||||
|
||||
If you are not doing an "in-tree" build, you will need to set the environment variables NSPR_INCLUDE_DIR, NSPR_LIB_DIR, NSS_INCLUDE_DIR, and NSS_LIB_DIR to point to the appropriate places. On Windows, if you are using the build method described below (cygwin + MSVC), you should use the "mixed" style path e.g.
|
||||
export NSPR_INCLUDE_DIR=`cygpath -m $HOME/nspr-4.6.1/include`
|
||||
etc.
|
||||
The MSVC compiler (cl.exe) will barf on paths like /cygdrive/c/foo/bar.
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
Unix:
|
||||
Building on Unix mostly just complies with the usual NSS build requirements.
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Windows:
|
||||
Windows has now (as of 2006/2/1) released free versions of their compiler and platform SDKs - everything you need to build svrcore.
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Prerequisites:
|
||||
First, you must install 3 packages downloaded from Microsoft. If the links don't work, just go to www.microsoft.com and search for their names until you get to the download links for them.
|
||||
Second, install CygWin - www.cygwin.com
|
||||
Third, you need nsinstall.exe from the MozTools wintools package (you don't need anything else) - http://ftp.mozilla.org/pub/mozilla.org/mozilla/source/wintools.zip - just unpack the zip file, extract nsinstall.exe, and place in your PATH
|
||||
These are generic installation instructions.
|
||||
|
||||
* Microsoft Visual C++ Toolkit 2003
|
||||
** http://msdn.microsoft.com/visualc/vctoolkit2003/ - follow the link to download
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
* Microsoft Windows Platform SDK
|
||||
** http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
|
||||
** Minimum install:
|
||||
*** Choose Custom
|
||||
*** Choose Windows Core SDK - omit any 64 bit options (unless you need 64 bit binaries) and omit source code (unless you really want it)
|
||||
*** You can omit everything else (unless you just want to fill up your disk)
|
||||
** Full Install (if you have lots of disk space, network bandwidth, and time)
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. (Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.)
|
||||
|
||||
* Microsoft .NET Framework SDK
|
||||
** http://www.microsoft.com/downloads/details.aspx?familyid=9b3a2ca6-3647-4070-9f41-a333c6b9181d&displaylang=en
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
* CygWin
|
||||
** www.cygwin.com
|
||||
*** Download and run setup
|
||||
*** Setup allows you to choose which packages you want to install.
|
||||
*** Minimal Install
|
||||
**** Archive - tar, zip, unzip
|
||||
**** Base - most everything here
|
||||
**** Database - nothing - postgres and bdb are selected by default - deselect them
|
||||
**** Devel - you really only need binutils, make, and mktemp, but cvs is good to have, and you may be interested in some of the others as well
|
||||
**** Doc - whatever the defaults are
|
||||
**** Editors - you probably want some sort of text editor if you don't already have one and don't want to use Notepad/Wordpad
|
||||
**** Games, Gnome, Graphics - Defaults
|
||||
**** Interpreters - gawk, perl
|
||||
**** KDE, Libs, Mail, Math, MinGW, Net, Perl, Publishing, Python - Defaults
|
||||
**** Shells - ash and bash
|
||||
**** System - Defaults
|
||||
**** Text - less
|
||||
**** Utils - Defaults + patch
|
||||
**** Web, X11 - Defaults
|
||||
** After installation is complete, you can have it create a cygwin desktop icon that you launch the cygwin environment from
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You only need
|
||||
`configure.ac' if you want to change it or regenerate `configure' using
|
||||
a newer version of `autoconf'.
|
||||
|
||||
* Setting up your build environment
|
||||
The first time you launch the cygwin shell, it should create a $HOME/.bash_profile. Add the following to that file:
|
||||
export INCLUDE="c:\Program Files\Microsoft Visual C++ Toolkit 2003\include;c:\Program Files\Microsoft Platform SDK\Include;c:\Program Files\Microsoft Platform SDK\Include\mfc"
|
||||
export LIB="c:\Program Files\Microsoft Visual C++ Toolkit 2003\lib;c:\Program Files\Microsoft Platform SDK\Lib;c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib"
|
||||
export ANONMOZCVSROOT=:pserver:anonymous@cvvs-mirror.mozilla.org:/cvsroot
|
||||
export CVSROOT=$ANONMOZCVSROOT
|
||||
export PATH="$HOME/bin:/cygdrive/c/Program Files/Microsoft Visual C++ Toolkit 2003/bin:/cygdrive/c/Program Files/Microsoft Platform SDK/Bin:$PATH"
|
||||
The simplest way to compile this package is:
|
||||
|
||||
I've put my nsinstall.exe in my $HOME/bin directory and put that first in my PATH. This assumes you've used the default paths for all of the MS and cygwin installs. If not, change the paths accordingly. In order for the changes to take effect, re-source your file or logout and login again.
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
* Building
|
||||
Running `configure' takes awhile. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
cd mozilla/security/svrcore
|
||||
make AR='link /lib -nologo -out:"$@"
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that the
|
||||
`configure' script does not know about. Run `./configure --help' for
|
||||
details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not support the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a
|
||||
time in the source code directory. After you have installed the
|
||||
package for one architecture, use `make distclean' before reconfiguring
|
||||
for another architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PREFIX'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PREFIX', the package will
|
||||
use PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out automatically,
|
||||
but needs to determine by the type of machine the package will run on.
|
||||
Usually, assuming the package is built to be run on the _same_
|
||||
architectures, `configure' can figure that out, but if it prints a
|
||||
message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share, you
|
||||
can create a site shell script called `config.site' that gives default
|
||||
values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
will cause the specified gcc to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
And that's it. The svrcore.lib will be found in mozilla/dist/*.OBJ/lib and svrcore.h will be found in mozilla/dist/public/svrcore. When you go to build the mozilla ldap c sdk that you have checked out into the same source tree, it will automatically find the files it needs when you use configure --with-svrcore ...
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
Building:
|
||||
|
||||
If you are not doing an "in-tree" build, you will need to set the environment variables NSPR_INCLUDE_DIR, NSPR_LIB_DIR, NSS_INCLUDE_DIR, and NSS_LIB_DIR to point to the appropriate places. On Windows, if you are using the build method described below (cygwin + MSVC), you should use the "mixed" style path e.g.
|
||||
export NSPR_INCLUDE_DIR=`cygpath -m $HOME/nspr-4.6.1/include`
|
||||
etc.
|
||||
The MSVC compiler (cl.exe) will barf on paths like /cygdrive/c/foo/bar.
|
||||
|
||||
Unix:
|
||||
See INSTALL for the usual configure + make + make install
|
||||
|
||||
Windows:
|
||||
Windows has now (as of 2006/2/1) released free versions of their compiler and platform SDKs - everything you need to build svrcore.
|
||||
|
||||
Prerequisites:
|
||||
First, you must install 3 packages downloaded from Microsoft. If the links don't work, just go to www.microsoft.com and search for their names until you get to the download links for them.
|
||||
Second, install CygWin - www.cygwin.com
|
||||
Third, you need nsinstall.exe from the MozTools wintools package (you don't need anything else) - http://ftp.mozilla.org/pub/mozilla.org/mozilla/source/wintools.zip - just unpack the zip file, extract nsinstall.exe, and place in your PATH
|
||||
|
||||
* Microsoft Visual C++ Toolkit 2003
|
||||
** http://msdn.microsoft.com/visualc/vctoolkit2003/ - follow the link to download
|
||||
|
||||
* Microsoft Windows Platform SDK
|
||||
** http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
|
||||
** Minimum install:
|
||||
*** Choose Custom
|
||||
*** Choose Windows Core SDK - omit any 64 bit options (unless you need 64 bit binaries) and omit source code (unless you really want it)
|
||||
*** You can omit everything else (unless you just want to fill up your disk)
|
||||
** Full Install (if you have lots of disk space, network bandwidth, and time)
|
||||
|
||||
* Microsoft .NET Framework SDK
|
||||
** http://www.microsoft.com/downloads/details.aspx?familyid=9b3a2ca6-3647-4070-9f41-a333c6b9181d&displaylang=en
|
||||
|
||||
* CygWin
|
||||
** www.cygwin.com
|
||||
*** Download and run setup
|
||||
*** Setup allows you to choose which packages you want to install.
|
||||
*** Minimal Install
|
||||
**** Archive - tar, zip, unzip
|
||||
**** Base - most everything here
|
||||
**** Database - nothing - postgres and bdb are selected by default - deselect them
|
||||
**** Devel - you really only need binutils, make, and mktemp, but cvs is good to have, and you may be interested in some of the others as well
|
||||
**** Doc - whatever the defaults are
|
||||
**** Editors - you probably want some sort of text editor if you don't already have one and don't want to use Notepad/Wordpad
|
||||
**** Games, Gnome, Graphics - Defaults
|
||||
**** Interpreters - gawk, perl
|
||||
**** KDE, Libs, Mail, Math, MinGW, Net, Perl, Publishing, Python - Defaults
|
||||
**** Shells - ash and bash
|
||||
**** System - Defaults
|
||||
**** Text - less
|
||||
**** Utils - Defaults + patch
|
||||
**** Web, X11 - Defaults
|
||||
** After installation is complete, you can have it create a cygwin desktop icon that you launch the cygwin environment from
|
||||
|
||||
Newer versions of the MS VC tools work as well - I've had success using
|
||||
MS Visual C++ 2005 Express Edition.
|
||||
|
||||
* Setting up your build environment
|
||||
The first time you launch the cygwin shell, it should create a $HOME/.bash_profile. To set up your PATH, it is easiest to just call vcvars32.bat (provided)
|
||||
by the MSVC tools) in a batch file that starts up bash. If you would
|
||||
rather set your PATH manually, add the following to $HOME/.bash_profile:
|
||||
export INCLUDE="c:\Program Files\Microsoft Visual C++ Toolkit 2003\include;c:\Program Files\Microsoft Platform SDK\Include;c:\Program Files\Microsoft Platform SDK\Include\mfc"
|
||||
export LIB="c:\Program Files\Microsoft Visual C++ Toolkit 2003\lib;c:\Program Files\Microsoft Platform SDK\Lib;c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib"
|
||||
export ANONMOZCVSROOT=:pserver:anonymous@cvvs-mirror.mozilla.org:/cvsroot
|
||||
export CVSROOT=$ANONMOZCVSROOT
|
||||
export PATH="$HOME/bin:/cygdrive/c/Program Files/Microsoft Visual C++ Toolkit 2003/bin:/cygdrive/c/Program Files/Microsoft Platform SDK/Bin:$PATH"
|
||||
|
||||
I've put my nsinstall.exe in my $HOME/bin directory and put that first in my PATH. This assumes you've used the default paths for all of the MS and cygwin installs. If not, change the paths accordingly. In order for the changes to take effect, re-source your file or logout and login again.
|
||||
|
||||
* Building
|
||||
|
||||
cd mozilla/security/svrcore/src
|
||||
make -f Makefile.win
|
||||
If that barfs, that it cannot find lib.exe, or it is using the wrong
|
||||
version of lib.exe (e.g. the cygwin one), do the following:
|
||||
make -f Makefile.win AR='link /lib -nologo -out:"$@"
|
||||
|
||||
And that's it. The svrcore.lib will be found in mozilla/dist/*.OBJ/lib and svrcore.h will be found in mozilla/dist/public/svrcore. When you go to build the mozilla ldap c sdk that you have checked out into the same source tree, it will automatically find the files it needs when you use configure --with-svrcore ...
|
|
@ -18,8 +18,7 @@ Netscape Communications Corporation.
|
|||
Portions created by the Initial Developer are Copyright (C) 1998
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Terry Hayes (Netscape/AOL) was the primary contributor
|
||||
Contributor(s): Terry Hayes (Netscape/AOL) was the primary contributor
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms of
|
||||
either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
|
@ -32,5 +31,4 @@ decision by deleting the provisions above and replace them with the notice
|
|||
and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
the provisions above, a recipient may use your version of this file under
|
||||
the terms of any one of the MPL, the GPL or the LGPL.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
SUBDIRS=src
|
||||
|
||||
EXTRA_DIST= LICENSE \
|
||||
build_svrcore-devel_rpm \
|
||||
svrcore.spec \
|
||||
svrcore.pc.in \
|
||||
autogen.sh \
|
||||
INSTALL.win
|
||||
|
||||
pkgconfigdir= $(libdir)/pkgconfig
|
||||
pkgconfig_DATA= svrcore.pc
|
|
@ -0,0 +1,659 @@
|
|||
# Makefile.in generated by automake 1.9.2 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 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.
|
||||
|
||||
# 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.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
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 = @INSTALL@
|
||||
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 = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
$(srcdir)/svrcore.pc.in $(top_srcdir)/configure AUTHORS \
|
||||
COPYING ChangeLog INSTALL NEWS TODO compile config.guess \
|
||||
config.sub depcomp install-sh ltmain.sh missing
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/nss.m4 $(top_srcdir)/m4/nspr.m4 \
|
||||
$(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 = $(install_sh) -d
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES = svrcore.pc
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
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)$(pkgconfigdir)"
|
||||
pkgconfigDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(pkgconfig_DATA)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
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@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NSPR_CFLAGS = @NSPR_CFLAGS@
|
||||
NSPR_LIBS = @NSPR_LIBS@
|
||||
NSPR_MIN_VER = @NSPR_MIN_VER@
|
||||
NSPR_NAME = @NSPR_NAME@
|
||||
NSS_CFLAGS = @NSS_CFLAGS@
|
||||
NSS_LIBS = @NSS_LIBS@
|
||||
NSS_MIN_VER = @NSS_MIN_VER@
|
||||
NSS_NAME = @NSS_NAME@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
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@
|
||||
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@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
SUBDIRS = src
|
||||
EXTRA_DIST = LICENSE \
|
||||
build_svrcore-devel_rpm \
|
||||
svrcore.spec \
|
||||
svrcore.pc.in \
|
||||
autogen.sh \
|
||||
INSTALL.win
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = svrcore.pc
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --gnu \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu 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;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) stamp-h1; \
|
||||
else :; fi
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
svrcore.pc: $(top_builddir)/config.status $(srcdir)/svrcore.pc.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
install-pkgconfigDATA: $(pkgconfig_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)"
|
||||
@list='$(pkgconfig_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
|
||||
$(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-pkgconfigDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(pkgconfig_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
|
||||
done
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(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; }'`; \
|
||||
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: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(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; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@case `sed 15q $(srcdir)/NEWS` in \
|
||||
*"$(VERSION)"*) : ;; \
|
||||
*) \
|
||||
echo "NEWS not updated; not releasing" 1>&2; \
|
||||
exit 1;; \
|
||||
esac
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkdir_p) $(distdir)/. $(distdir)/m4
|
||||
@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; \
|
||||
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 \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-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 {} {} \; \
|
||||
|| 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 -9 -c >$(distdir).tar.bz2
|
||||
$(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
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(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) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(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)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(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
|
||||
$(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;}'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { 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-recursive
|
||||
all-am: Makefile $(DATA) config.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-pkgconfigDATA
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-pkgconfigDATA
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
|
||||
check-am clean clean-generic clean-libtool clean-recursive \
|
||||
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
|
||||
dist-shar dist-tarZ dist-zip distcheck distclean \
|
||||
distclean-generic distclean-hdr distclean-libtool \
|
||||
distclean-recursive 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-info install-info-am install-man \
|
||||
install-pkgconfigDATA install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool \
|
||||
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-info-am \
|
||||
uninstall-pkgconfigDATA
|
||||
|
||||
# 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:
|
|
@ -0,0 +1,9 @@
|
|||
svrcore 4.0.3.01
|
||||
================
|
||||
* Moved Makefile to src/Makefile.win for Windows build
|
||||
* Added support for --with-nspr and --with-nss
|
||||
* Use PK11_TokenKeyGenWithFlags instead of PK11_KeyGen
|
||||
|
||||
svrcore 4.0.2.02
|
||||
================
|
||||
* Autotooled the build.
|
|
@ -48,3 +48,4 @@ server also implemented its own PIN object to allow a watchdog
|
|||
process to cache the PIN and restart the server.
|
||||
|
||||
See INSTALL for build instructions
|
||||
See INSTALL.win for Windows build instructions
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
* configure.ac: Change bug address
|
||||
* FIll in NEWS AUTHORS ChangeLog
|
||||
* Dal with Windows builds
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,41 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Check autoconf version
|
||||
AC_VERSION=`autoconf --version | grep '^autoconf' | sed 's/.*) *//'`
|
||||
case $AC_VERSION in
|
||||
'' | 0.* | 1.* | 2.[0-4]* | 2.[0-9] | 2.5[0-8]* )
|
||||
echo "You must have autoconf version 2.59 or later installed (found version $AC_VERSION)."
|
||||
exit 1
|
||||
;;
|
||||
* )
|
||||
echo "Found autoconf version $AC_VERSION"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Check automake version
|
||||
AM_VERSION=`automake --version | grep '^automake' | sed 's/.*) *//'`
|
||||
case $AM_VERSION in
|
||||
'' | 0.* | 1.[0-8]* | 1.9.[0-1]* )
|
||||
echo "You must have automake version 1.9.2 or later installed (found version $AM_VERSION)."
|
||||
exit 1
|
||||
;;
|
||||
* )
|
||||
echo "Found automake version $AM_VERSION"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Check libtool version
|
||||
LT_VERSION=`libtool --version | grep ' libtool)' | sed 's/.*) \([0-9][0-9.]*\)[^ ]* .*/\1/'`
|
||||
case $LT_VERSION in
|
||||
'' | 0.* | 1.[0-4]* | 1.5.[0-9] | 1.5.[0-1]* | 1.5.2[0-1]* )
|
||||
echo "You must have libtool version 1.5.22 or later installed (found version $LT_VERSION)."
|
||||
exit 1
|
||||
;;
|
||||
* )
|
||||
echo "Found libtool version $LT_VERSION"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Run autoreconf
|
||||
echo "Running autoreconf -fvi"
|
||||
autoreconf -fvi
|
|
@ -0,0 +1,140 @@
|
|||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand `-c -o'.
|
||||
|
||||
scriptversion=2004-09-10.20
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# 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, 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.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand `-c -o'.
|
||||
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file `INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit 0
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
eat=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as `compile cc -o foo foo.c'.
|
||||
# So we strip `-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no `-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# `.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use `[/.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
mv "$cofile" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# 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-end: "$"
|
||||
# End:
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,74 @@
|
|||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
|
||||
to 0 otherwise. */
|
||||
#undef HAVE_MALLOC
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#undef HAVE_MEMSET
|
||||
|
||||
/* 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 `strchr' function. */
|
||||
#undef HAVE_STRCHR
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#undef HAVE_STRDUP
|
||||
|
||||
/* 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/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
|
||||
|
||||
/* 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 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
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define to rpl_malloc if the replacement function should be used. */
|
||||
#undef malloc
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,41 @@
|
|||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(svrcore, 4.0.3.01, rmeggins@redhat.com, svrcore)
|
||||
AM_INIT_AUTOMAKE([gnu check-news dist-bzip2])
|
||||
AM_MAINTAINER_MODE
|
||||
AC_CONFIG_SRCDIR([src/svrcore.h])
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADER([string.h],,[AC_ERROR([We need string.h in order to build])])
|
||||
AC_CHECK_HEADER([termios.h],,[AC_ERROR([We need termios.h in order to build])])
|
||||
AC_CHECK_HEADER([unistd.h],,[AC_ERROR([We need unistd.h in order to build])])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_MALLOC
|
||||
AC_CHECK_FUNCS([memset strchr strdup])
|
||||
|
||||
# Check for library dependencies
|
||||
m4_include(m4/nss.m4)
|
||||
m4_include(m4/nspr.m4)
|
||||
|
||||
AC_SUBST([NSPR_CFLAGS])
|
||||
AC_SUBST([NSPR_LIBS])
|
||||
AC_SUBST([NSPR_MIN_VER])
|
||||
AC_SUBST([NSPR_NAME])
|
||||
AC_SUBST([NSS_CFLAGS])
|
||||
AC_SUBST([NSS_LIBS])
|
||||
AC_SUBST([NSS_MIN_VER])
|
||||
AC_SUBST([NSS_NAME])
|
||||
|
||||
AC_CONFIG_FILES([src/Makefile Makefile svrcore.pc])
|
||||
AC_OUTPUT
|
|
@ -0,0 +1,522 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2004-05-31.23
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004 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, 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.
|
||||
|
||||
# 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 outputing dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit 0
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit 0
|
||||
;;
|
||||
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
|
||||
|
||||
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.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
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.
|
||||
## 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"
|
||||
;;
|
||||
|
||||
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.
|
||||
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test -f "$tmpdepfile"; then :
|
||||
else
|
||||
stripped=`echo "$stripped" | sed 's,^.*/,,'`
|
||||
tmpdepfile="$stripped.u"
|
||||
fi
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
outname="$stripped.o"
|
||||
# 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,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$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"
|
||||
;;
|
||||
|
||||
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
|
||||
# Dependencies are output in .lo.d with libtool 1.4.
|
||||
# With libtool 1.5 they are output both in $dir.libs/$base.o.d
|
||||
# and in $dir.libs/$base.o.d and $dir$base.o.d. We process the
|
||||
# latter, because the former will be cleaned when $dir.libs is
|
||||
# erased.
|
||||
tmpdepfile1="$dir.libs/$base.lo.d"
|
||||
tmpdepfile2="$dir$base.o.d"
|
||||
tmpdepfile3="$dir.libs/$base.d"
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1="$dir$base.o.d"
|
||||
tmpdepfile2="$dir$base.d"
|
||||
tmpdepfile3="$dir$base.d"
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile1"; then
|
||||
tmpdepfile="$tmpdepfile1"
|
||||
elif test -f "$tmpdepfile2"; then
|
||||
tmpdepfile="$tmpdepfile2"
|
||||
else
|
||||
tmpdepfile="$tmpdepfile3"
|
||||
fi
|
||||
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"
|
||||
;;
|
||||
|
||||
#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 $1 != '--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 $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
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.
|
||||
-*|$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"
|
||||
cat < "$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 $1 != '--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 '/^# [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, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
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-end: "$"
|
||||
# End:
|
|
@ -0,0 +1,322 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2004-09-10.20
|
||||
|
||||
# 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 0;;
|
||||
|
||||
-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 0;;
|
||||
|
||||
*) # 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,^$,.,'`
|
||||
|
||||
# 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 - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
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
|
||||
}
|
||||
else
|
||||
:
|
||||
fi
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
|
||||
}
|
||||
}
|
||||
fi || { (exit 1); exit; }
|
||||
done
|
||||
|
||||
# The final little trick to "correctly" pass the exit status to the exit trap.
|
||||
{
|
||||
(exit 0); exit
|
||||
}
|
||||
|
||||
# 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:
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,125 @@
|
|||
# BEGIN COPYRIGHT BLOCK
|
||||
# Copyright (C) 2006 Red Hat, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# END COPYRIGHT BLOCK
|
||||
|
||||
AC_CHECKING(for NSPR)
|
||||
|
||||
# check for --with-nspr
|
||||
AC_MSG_CHECKING(for --with-nspr)
|
||||
AC_ARG_WITH(nspr, [ --with-nspr=PATH Netscape Portable Runtime (NSPR) directory],
|
||||
[
|
||||
if test -e "$withval"/include/nspr.h -a -d "$withval"/lib
|
||||
then
|
||||
AC_MSG_RESULT([using $withval])
|
||||
NSPRDIR=$withval
|
||||
nspr_inc="-I$NSPRDIR/include"
|
||||
nspr_lib="-L$NSPRDIR/lib"
|
||||
else
|
||||
echo
|
||||
AC_MSG_ERROR([$withval not found])
|
||||
fi
|
||||
],
|
||||
AC_MSG_RESULT(no))
|
||||
|
||||
# check for --with-nspr-inc
|
||||
AC_MSG_CHECKING(for --with-nspr-inc)
|
||||
AC_ARG_WITH(nspr-inc, [ --with-nspr-inc=PATH Netscape Portable Runtime (NSPR) include file directory],
|
||||
[
|
||||
if test -e "$withval"/nspr.h
|
||||
then
|
||||
AC_MSG_RESULT([using $withval])
|
||||
nspr_inc="-I$withval"
|
||||
else
|
||||
echo
|
||||
AC_MSG_ERROR([$withval not found])
|
||||
fi
|
||||
],
|
||||
AC_MSG_RESULT(no))
|
||||
|
||||
# check for --with-nspr-lib
|
||||
AC_MSG_CHECKING(for --with-nspr-lib)
|
||||
AC_ARG_WITH(nspr-lib, [ --with-nspr-lib=PATH Netscape Portable Runtime (NSPR) library directory],
|
||||
[
|
||||
if test -d "$withval"
|
||||
then
|
||||
AC_MSG_RESULT([using $withval])
|
||||
nspr_lib="-L$withval"
|
||||
else
|
||||
echo
|
||||
AC_MSG_ERROR([$withval not found])
|
||||
fi
|
||||
],
|
||||
AC_MSG_RESULT(no))
|
||||
|
||||
# see if we are doing an "in-tree" build with the other
|
||||
# mozilla components
|
||||
if test -z "$nspr_inc" -o -z "$nspr_lib" ; then
|
||||
for nsprpath in "../../dist" "../../dist/*.OBJ" ; do
|
||||
savedir=`pwd`
|
||||
cd $nsprpath
|
||||
abs_nsprpath=`pwd`
|
||||
cd $savedir
|
||||
if test -f "$abs_nsprpath/include/nspr/nspr.h" ; then
|
||||
nspr_inc="-I$abs_nsprpath/include/nspr"
|
||||
elif test -f "$abs_nsprpath/include/nspr.h" ; then
|
||||
nspr_inc="-I$abs_nsprpath/include"
|
||||
fi
|
||||
if test -d "$abs_nsprpath/lib" ; then
|
||||
nspr_lib="-L$abs_nsprpath/lib"
|
||||
fi
|
||||
if test -n "$nspr_inc" -a -n "$nspr_lib" ; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# if NSPR is not found yet, try pkg-config
|
||||
# last resort
|
||||
if test -z "$nspr_inc" -o -z "$nspr_lib" ; then
|
||||
AC_MSG_CHECKING(for nspr with pkg-config)
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config)
|
||||
if test -n "$PKG_CONFIG"; then
|
||||
if $PKG_CONFIG --exists nspr; then
|
||||
nspr_inc=`$PKG_CONFIG --cflags-only-I nspr`
|
||||
nspr_lib=`$PKG_CONFIG --libs-only-L nspr`
|
||||
nspr_ver=`$PKG_CONFIG --modversion nspr`
|
||||
nspr_name=nspr
|
||||
AC_MSG_RESULT([using system NSPR])
|
||||
elif $PKG_CONFIG --exists dirsec-nspr; then
|
||||
nspr_inc=`$PKG_CONFIG --cflags-only-I dirsec-nspr`
|
||||
nspr_lib=`$PKG_CONFIG --libs-only-L dirsec-nspr`
|
||||
nspr_ver=`$PKG_CONFIG --modversion dirsec-nspr`
|
||||
nspr_name=dirsec-nspr
|
||||
AC_MSG_RESULT([using system dirsec NSPR])
|
||||
else
|
||||
AC_MSG_ERROR([NSPR not found, specify with --with-nspr.])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
NSPR_CFLAGS="$nspr_inc"
|
||||
NSPR_LIBS="$nspr_lib -lplds4 -lplc4 -lnspr4"
|
||||
if test -z "$nspr_ver" ; then
|
||||
nspr_ver=4.6.4
|
||||
fi
|
||||
NSPR_MIN_VER="$nspr_ver"
|
||||
if test -z "$nspr_name" ; then
|
||||
nspr_name=nspr
|
||||
fi
|
||||
NSPR_NAME="$nspr_name"
|
|
@ -0,0 +1,129 @@
|
|||
# BEGIN COPYRIGHT BLOCK
|
||||
# Copyright (C) 2006 Red Hat, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# END COPYRIGHT BLOCK
|
||||
|
||||
AC_CHECKING(for NSS)
|
||||
|
||||
# check for --with-nss
|
||||
AC_MSG_CHECKING(for --with-nss)
|
||||
AC_ARG_WITH(nss, [ --with-nss=PATH Network Security Services (NSS) directory],
|
||||
[
|
||||
if test -e "$withval"/include/nss.h -a -d "$withval"/lib
|
||||
then
|
||||
AC_MSG_RESULT([using $withval])
|
||||
NSSDIR=$withval
|
||||
nss_inc="-I$NSSDIR/include"
|
||||
nss_lib="-L$NSSDIR/lib"
|
||||
else
|
||||
echo
|
||||
AC_MSG_ERROR([$withval not found])
|
||||
fi
|
||||
],
|
||||
AC_MSG_RESULT(no))
|
||||
|
||||
# check for --with-nss-inc
|
||||
AC_MSG_CHECKING(for --with-nss-inc)
|
||||
AC_ARG_WITH(nss-inc, [ --with-nss-inc=PATH Network Security Services (NSS) include directory],
|
||||
[
|
||||
if test -e "$withval"/nss.h
|
||||
then
|
||||
AC_MSG_RESULT([using $withval])
|
||||
nss_inc="-I$withval"
|
||||
else
|
||||
echo
|
||||
AC_MSG_ERROR([$withval not found])
|
||||
fi
|
||||
],
|
||||
AC_MSG_RESULT(no))
|
||||
|
||||
# check for --with-nss-lib
|
||||
AC_MSG_CHECKING(for --with-nss-lib)
|
||||
AC_ARG_WITH(nss-lib, [ --with-nss-lib=PATH Network Security Services (NSS) library directory],
|
||||
[
|
||||
if test -d "$withval"
|
||||
then
|
||||
AC_MSG_RESULT([using $withval])
|
||||
nss_lib="-L$withval"
|
||||
else
|
||||
echo
|
||||
AC_MSG_ERROR([$withval not found])
|
||||
fi
|
||||
],
|
||||
AC_MSG_RESULT(no))
|
||||
|
||||
# see if we are building "in tree" with the
|
||||
# other mozilla components
|
||||
if test -z "$nss_inc" -o -z "$nss_lib"; then
|
||||
nsslibpath=`echo ../../dist/*.OBJ/lib | cut -f1 -d' '`
|
||||
savedir=`pwd`
|
||||
cd $nsslibpath
|
||||
abs_nsslibpath=`pwd`
|
||||
cd $savedir
|
||||
nssincpath=../../dist/public/nss
|
||||
savedir=`pwd`
|
||||
cd $nssincpath
|
||||
abs_nssincpath=`pwd`
|
||||
cd $savedir
|
||||
if test -f "$abs_nssincpath/nss.h" ; then
|
||||
nss_inc="-I$abs_nssincpath"
|
||||
fi
|
||||
if test -d "$abs_nsslibpath" ; then
|
||||
nss_lib="-L$abs_nsslibpath"
|
||||
fi
|
||||
if test -n "$nss_inc" -a -n "$nss_lib" ; then
|
||||
AC_MSG_CHECKING(using in-tree NSS from $nssincpath $nsslibpath)
|
||||
else
|
||||
AC_MSG_CHECKING(could not find in-tree NSS in ../../dist)
|
||||
fi
|
||||
fi
|
||||
|
||||
# if NSS is not found yet, try pkg-config
|
||||
# last resort
|
||||
if test -z "$nss_inc" -o -z "$nss_lib"; then
|
||||
AC_MSG_CHECKING(for nss with pkg-config)
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config)
|
||||
if test -n "$PKG_CONFIG"; then
|
||||
if $PKG_CONFIG --exists nss; then
|
||||
nss_inc=`$PKG_CONFIG --cflags-only-I nss`
|
||||
nss_lib=`$PKG_CONFIG --libs-only-L nss`
|
||||
nss_ver=`$PKG_CONFIG --modversion nss`
|
||||
nss_name=nss
|
||||
AC_MSG_RESULT([using system NSS])
|
||||
elif $PKG_CONFIG --exists dirsec-nss; then
|
||||
nss_inc=`$PKG_CONFIG --cflags-only-I dirsec-nss`
|
||||
nss_lib=`$PKG_CONFIG --libs-only-L dirsec-nss`
|
||||
nss_ver=`$PKG_CONFIG --modversion dirsec-nss`
|
||||
nss_name=dirsec-nss
|
||||
AC_MSG_RESULT([using system dirsec NSS])
|
||||
else
|
||||
AC_MSG_ERROR([NSS not found, specify with --with-nss.])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
NSS_CFLAGS="$nss_inc"
|
||||
NSS_LIBS="$nss_lib -lssl3 -lnss3"
|
||||
if test -z "$nss_ver" ; then
|
||||
nss_ver=3.11.4
|
||||
fi
|
||||
NSS_MIN_VER="$nss_ver"
|
||||
if test -z "$nss_name" ; then
|
||||
nss_name=nss
|
||||
fi
|
||||
NSS_NAME="$nss_name"
|
|
@ -0,0 +1,353 @@
|
|||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2004-09-07.08
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004
|
||||
# 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, 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.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
|
||||
# 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'
|
||||
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]
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit 0
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit 0
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
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
|
||||
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 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
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 [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -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 [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -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 '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 1
|
||||
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."
|
||||
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`
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
|
||||
# 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.
|
||||
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-end: "$"
|
||||
# End:
|
|
@ -0,0 +1,21 @@
|
|||
EXTRA_DIST = key.ico \
|
||||
logo.ico \
|
||||
manifest.mn \
|
||||
Makefile.win \
|
||||
ntgetpin.rc
|
||||
|
||||
lib_LTLIBRARIES = libsvrcore.la
|
||||
include_HEADERS = svrcore.h
|
||||
libsvrcore_la_SOURCES = alt.c \
|
||||
cache.c \
|
||||
errors.c \
|
||||
file.c \
|
||||
ntgetpin.c \
|
||||
ntresource.h \
|
||||
pin.c \
|
||||
pk11.c \
|
||||
std.c \
|
||||
user.c
|
||||
|
||||
libsvrcore_la_LDFLAGS = -version-info 0:0:0 @NSS_LIBS@ @NSPR_LIBS@
|
||||
libsvrcore_la_CFLAGS = @NSS_CFLAGS@ @NSPR_CFLAGS@
|
|
@ -0,0 +1,580 @@
|
|||
# Makefile.in generated by automake 1.9.2 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 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.
|
||||
|
||||
# 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.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
SOURCES = $(libsvrcore_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 = @INSTALL@
|
||||
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 = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = src
|
||||
DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/nss.m4 $(top_srcdir)/m4/nspr.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
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)$(includedir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libsvrcore_la_LIBADD =
|
||||
am_libsvrcore_la_OBJECTS = libsvrcore_la-alt.lo libsvrcore_la-cache.lo \
|
||||
libsvrcore_la-errors.lo libsvrcore_la-file.lo \
|
||||
libsvrcore_la-ntgetpin.lo libsvrcore_la-pin.lo \
|
||||
libsvrcore_la-pk11.lo libsvrcore_la-std.lo \
|
||||
libsvrcore_la-user.lo
|
||||
libsvrcore_la_OBJECTS = $(am_libsvrcore_la_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libsvrcore_la_SOURCES)
|
||||
DIST_SOURCES = $(libsvrcore_la_SOURCES)
|
||||
includeHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
HEADERS = $(include_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
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@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NSPR_CFLAGS = @NSPR_CFLAGS@
|
||||
NSPR_LIBS = @NSPR_LIBS@
|
||||
NSPR_MIN_VER = @NSPR_MIN_VER@
|
||||
NSPR_NAME = @NSPR_NAME@
|
||||
NSS_CFLAGS = @NSS_CFLAGS@
|
||||
NSS_LIBS = @NSS_LIBS@
|
||||
NSS_MIN_VER = @NSS_MIN_VER@
|
||||
NSS_NAME = @NSS_NAME@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
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@
|
||||
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@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
EXTRA_DIST = key.ico \
|
||||
logo.ico \
|
||||
manifest.mn \
|
||||
Makefile.win \
|
||||
ntgetpin.rc
|
||||
|
||||
lib_LTLIBRARIES = libsvrcore.la
|
||||
include_HEADERS = svrcore.h
|
||||
libsvrcore_la_SOURCES = alt.c \
|
||||
cache.c \
|
||||
errors.c \
|
||||
file.c \
|
||||
ntgetpin.c \
|
||||
ntresource.h \
|
||||
pin.c \
|
||||
pk11.c \
|
||||
std.c \
|
||||
user.c
|
||||
|
||||
libsvrcore_la_LDFLAGS = -version-info 0:0:0 @NSS_LIBS@ @NSPR_LIBS@
|
||||
libsvrcore_la_CFLAGS = @NSS_CFLAGS@ @NSPR_CFLAGS@
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu src/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
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"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) --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=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libsvrcore.la: $(libsvrcore_la_OBJECTS) $(libsvrcore_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libsvrcore_la_LDFLAGS) $(libsvrcore_la_OBJECTS) $(libsvrcore_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsvrcore_la-alt.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsvrcore_la-cache.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsvrcore_la-errors.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsvrcore_la-file.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsvrcore_la-ntgetpin.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsvrcore_la-pin.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsvrcore_la-pk11.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsvrcore_la-std.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsvrcore_la-user.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@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) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
libsvrcore_la-alt.lo: alt.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsvrcore_la_CFLAGS) $(CFLAGS) -MT libsvrcore_la-alt.lo -MD -MP -MF "$(DEPDIR)/libsvrcore_la-alt.Tpo" -c -o libsvrcore_la-alt.lo `test -f 'alt.c' || echo '$(srcdir)/'`alt.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsvrcore_la-alt.Tpo" "$(DEPDIR)/libsvrcore_la-alt.Plo"; else rm -f "$(DEPDIR)/libsvrcore_la-alt.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='alt.c' object='libsvrcore_la-alt.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsvrcore_la_CFLAGS) $(CFLAGS) -c -o libsvrcore_la-alt.lo `test -f 'alt.c' || echo '$(srcdir)/'`alt.c
|
||||
|
||||
libsvrcore_la-cache.lo: cache.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsvrcore_la_CFLAGS) $(CFLAGS) -MT libsvrcore_la-cache.lo -MD -MP -MF "$(DEPDIR)/libsvrcore_la-cache.Tpo" -c -o libsvrcore_la-cache.lo `test -f 'cache.c' || echo '$(srcdir)/'`cache.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsvrcore_la-cache.Tpo" "$(DEPDIR)/libsvrcore_la-cache.Plo"; else rm -f "$(DEPDIR)/libsvrcore_la-cache.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cache.c' object='libsvrcore_la-cache.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsvrcore_la_CFLAGS) $(CFLAGS) -c -o libsvrcore_la-cache.lo `test -f 'cache.c' || echo '$(srcdir)/'`cache.c
|
||||
|
||||
libsvrcore_la-errors.lo: errors.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsvrcore_la_CFLAGS) $(CFLAGS) -MT libsvrcore_la-errors.lo -MD -MP -MF "$(DEPDIR)/libsvrcore_la-errors.Tpo" -c -o libsvrcore_la-errors.lo `test -f 'errors.c' || echo '$(srcdir)/'`errors.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsvrcore_la-errors.Tpo" "$(DEPDIR)/libsvrcore_la-errors.Plo"; else rm -f "$(DEPDIR)/libsvrcore_la-errors.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='errors.c' object='libsvrcore_la-errors.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsvrcore_la_CFLAGS) $(CFLAGS) -c -o libsvrcore_la-errors.lo `test -f 'errors.c' || echo '$(srcdir)/'`errors.c
|
||||
|
||||
libsvrcore_la-file.lo: file.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsvrcore_la_CFLAGS) $(CFLAGS) -MT libsvrcore_la-file.lo -MD -MP -MF "$(DEPDIR)/libsvrcore_la-file.Tpo" -c -o libsvrcore_la-file.lo `test -f 'file.c' || echo '$(srcdir)/'`file.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsvrcore_la-file.Tpo" "$(DEPDIR)/libsvrcore_la-file.Plo"; else rm -f "$(DEPDIR)/libsvrcore_la-file.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='file.c' object='libsvrcore_la-file.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsvrcore_la_CFLAGS) $(CFLAGS) -c -o libsvrcore_la-file.lo `test -f 'file.c' || echo '$(srcdir)/'`file.c
|
||||
|
||||
libsvrcore_la-ntgetpin.lo: ntgetpin.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsvrcore_la_CFLAGS) $(CFLAGS) -MT libsvrcore_la-ntgetpin.lo -MD -MP -MF "$(DEPDIR)/libsvrcore_la-ntgetpin.Tpo" -c -o libsvrcore_la-ntgetpin.lo `test -f 'ntgetpin.c' || echo '$(srcdir)/'`ntgetpin.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsvrcore_la-ntgetpin.Tpo" "$(DEPDIR)/libsvrcore_la-ntgetpin.Plo"; else rm -f "$(DEPDIR)/libsvrcore_la-ntgetpin.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ntgetpin.c' object='libsvrcore_la-ntgetpin.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsvrcore_la_CFLAGS) $(CFLAGS) -c -o libsvrcore_la-ntgetpin.lo `test -f 'ntgetpin.c' || echo '$(srcdir)/'`ntgetpin.c
|
||||
|
||||
libsvrcore_la-pin.lo: pin.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsvrcore_la_CFLAGS) $(CFLAGS) -MT libsvrcore_la-pin.lo -MD -MP -MF "$(DEPDIR)/libsvrcore_la-pin.Tpo" -c -o libsvrcore_la-pin.lo `test -f 'pin.c' || echo '$(srcdir)/'`pin.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsvrcore_la-pin.Tpo" "$(DEPDIR)/libsvrcore_la-pin.Plo"; else rm -f "$(DEPDIR)/libsvrcore_la-pin.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pin.c' object='libsvrcore_la-pin.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsvrcore_la_CFLAGS) $(CFLAGS) -c -o libsvrcore_la-pin.lo `test -f 'pin.c' || echo '$(srcdir)/'`pin.c
|
||||
|
||||
libsvrcore_la-pk11.lo: pk11.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsvrcore_la_CFLAGS) $(CFLAGS) -MT libsvrcore_la-pk11.lo -MD -MP -MF "$(DEPDIR)/libsvrcore_la-pk11.Tpo" -c -o libsvrcore_la-pk11.lo `test -f 'pk11.c' || echo '$(srcdir)/'`pk11.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsvrcore_la-pk11.Tpo" "$(DEPDIR)/libsvrcore_la-pk11.Plo"; else rm -f "$(DEPDIR)/libsvrcore_la-pk11.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pk11.c' object='libsvrcore_la-pk11.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsvrcore_la_CFLAGS) $(CFLAGS) -c -o libsvrcore_la-pk11.lo `test -f 'pk11.c' || echo '$(srcdir)/'`pk11.c
|
||||
|
||||
libsvrcore_la-std.lo: std.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsvrcore_la_CFLAGS) $(CFLAGS) -MT libsvrcore_la-std.lo -MD -MP -MF "$(DEPDIR)/libsvrcore_la-std.Tpo" -c -o libsvrcore_la-std.lo `test -f 'std.c' || echo '$(srcdir)/'`std.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsvrcore_la-std.Tpo" "$(DEPDIR)/libsvrcore_la-std.Plo"; else rm -f "$(DEPDIR)/libsvrcore_la-std.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='std.c' object='libsvrcore_la-std.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsvrcore_la_CFLAGS) $(CFLAGS) -c -o libsvrcore_la-std.lo `test -f 'std.c' || echo '$(srcdir)/'`std.c
|
||||
|
||||
libsvrcore_la-user.lo: user.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsvrcore_la_CFLAGS) $(CFLAGS) -MT libsvrcore_la-user.lo -MD -MP -MF "$(DEPDIR)/libsvrcore_la-user.Tpo" -c -o libsvrcore_la-user.lo `test -f 'user.c' || echo '$(srcdir)/'`user.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsvrcore_la-user.Tpo" "$(DEPDIR)/libsvrcore_la-user.Plo"; else rm -f "$(DEPDIR)/libsvrcore_la-user.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='user.c' object='libsvrcore_la-user.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsvrcore_la_CFLAGS) $(CFLAGS) -c -o libsvrcore_la-user.lo `test -f 'user.c' || echo '$(srcdir)/'`user.c
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
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=$(am__strip_dir) \
|
||||
echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
|
||||
$(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-includeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(includedir)/$$f"; \
|
||||
done
|
||||
|
||||
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; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(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; }'`; \
|
||||
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; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@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; \
|
||||
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 \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
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
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-includeHEADERS
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-includeHEADERS uninstall-info-am \
|
||||
uninstall-libLTLIBRARIES
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir 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-libLTLIBRARIES install-man \
|
||||
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-libLTLIBRARIES
|
||||
|
||||
# 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:
|
|
@ -0,0 +1,102 @@
|
|||
#! gmake
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape svrcore library.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1996, 1997
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#######################################################################
|
||||
# (1) Include initial platform-independent assignments (MANDATORY). #
|
||||
#######################################################################
|
||||
|
||||
include manifest.mn
|
||||
|
||||
#######################################################################
|
||||
# (2) Include "global" configuration information. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/config.mk
|
||||
|
||||
#######################################################################
|
||||
# (3) Include "component" configuration information. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
|
||||
|
||||
#######################################################################
|
||||
# (4) Include "local" platform-dependent assignments (OPTIONAL). #
|
||||
#######################################################################
|
||||
|
||||
# Build only static library
|
||||
IMPORT_LIBRARY=
|
||||
SHARED_LIBRARY=
|
||||
|
||||
#######################################################################
|
||||
# (5) Execute "global" rules. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/rules.mk
|
||||
|
||||
#######################################################################
|
||||
# (6) Execute "component" rules. (OPTIONAL) #
|
||||
#######################################################################
|
||||
|
||||
|
||||
|
||||
#######################################################################
|
||||
# (7) Execute "local" rules. (OPTIONAL). #
|
||||
#######################################################################
|
||||
|
||||
INCLUDES += -I.
|
||||
|
||||
all release::
|
||||
@echo ---- Finished ----
|
||||
|
||||
coreconf_hack:
|
||||
cd ../coreconf; $(MAKE) export
|
||||
$(MAKE) import
|
||||
|
||||
RelEng_bld: coreconf_hack
|
||||
$(MAKE)
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
libs install:: ntsvrcore.res
|
||||
$(NSINSTALL) -m 444 $< $(SOURCE_LIB_DIR)
|
||||
|
||||
release_md::
|
||||
$(INSTALL) -m 444 ntsvrcore.res $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_LIB_DIR)
|
||||
endif
|
||||
|
||||
ntsvrcore.res: ntgetpin.rc
|
||||
rc -fo $@ -i. $<
|
|
@ -0,0 +1,132 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Netscape svrcore library.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
* alt.c - SVRCORE module for reading a PIN from one of two alternate
|
||||
* sources.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <svrcore.h>
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* SVRCOREAltPinObj implementation
|
||||
*/
|
||||
struct SVRCOREAltPinObj
|
||||
{
|
||||
SVRCOREPinObj base;
|
||||
SVRCOREPinObj *primary;
|
||||
SVRCOREPinObj *alt;
|
||||
};
|
||||
static const SVRCOREPinMethods vtable;
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
SVRCOREError
|
||||
SVRCORE_CreateAltPinObj(
|
||||
SVRCOREAltPinObj **out,
|
||||
SVRCOREPinObj *primary, SVRCOREPinObj *alt)
|
||||
{
|
||||
SVRCOREError err = SVRCORE_Success;
|
||||
SVRCOREAltPinObj *obj = 0;
|
||||
|
||||
do {
|
||||
obj = (SVRCOREAltPinObj *)malloc(sizeof (SVRCOREAltPinObj));
|
||||
if (!obj) { err = SVRCORE_NoMemory_Error; break; }
|
||||
|
||||
obj->base.methods = &vtable;
|
||||
|
||||
obj->primary = primary;
|
||||
obj->alt = alt;
|
||||
} while(0);
|
||||
|
||||
if (err != SVRCORE_Success)
|
||||
{
|
||||
SVRCORE_DestroyAltPinObj(obj);
|
||||
}
|
||||
|
||||
*out = obj;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
void
|
||||
SVRCORE_DestroyAltPinObj(
|
||||
SVRCOREAltPinObj *obj)
|
||||
{
|
||||
if (!obj) return;
|
||||
|
||||
free(obj);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* vtable methods
|
||||
*/
|
||||
static void
|
||||
destroyObject(SVRCOREPinObj *obj)
|
||||
{
|
||||
SVRCORE_DestroyAltPinObj((SVRCOREAltPinObj*)obj);
|
||||
}
|
||||
|
||||
static char *
|
||||
getPin(SVRCOREPinObj *pinObj, const char *tokenName, PRBool retry)
|
||||
{
|
||||
SVRCOREAltPinObj *obj = (SVRCOREAltPinObj*)pinObj;
|
||||
char *res = 0;
|
||||
|
||||
do {
|
||||
/* Try primary first */
|
||||
res = SVRCORE_GetPin(obj->primary, tokenName, retry);
|
||||
if (res) break;
|
||||
|
||||
/* If unsucessful, try alternate source */
|
||||
res = SVRCORE_GetPin(obj->alt, tokenName, retry);
|
||||
} while(0);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
* VTable
|
||||
*/
|
||||
static const SVRCOREPinMethods vtable =
|
||||
{ 0, 0, destroyObject, getPin };
|
|
@ -0,0 +1,252 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Netscape svrcore library.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
* cache.c - SVRCORE module for caching PIN values
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <svrcore.h>
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* Node - for maintaining link list of tokens with cached PINs
|
||||
*/
|
||||
typedef struct Node Node;
|
||||
static void freeNode(Node *node);
|
||||
static void freeList(Node *list);
|
||||
|
||||
struct Node
|
||||
{
|
||||
Node *next;
|
||||
char *tokenName;
|
||||
SVRCOREPk11PinStore *store;
|
||||
};
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* SVRCORECachedPinObj implementation
|
||||
*/
|
||||
struct SVRCORECachedPinObj
|
||||
{
|
||||
SVRCOREPinObj base;
|
||||
SVRCOREPinObj *alt;
|
||||
Node *pinList;
|
||||
};
|
||||
static const struct SVRCOREPinMethods vtable;
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
SVRCOREError
|
||||
SVRCORE_CreateCachedPinObj(
|
||||
SVRCORECachedPinObj **out, SVRCOREPinObj *alt)
|
||||
{
|
||||
SVRCOREError err = SVRCORE_Success;
|
||||
SVRCORECachedPinObj *obj;
|
||||
|
||||
do {
|
||||
obj = (SVRCORECachedPinObj*)malloc(sizeof (SVRCORECachedPinObj));
|
||||
if (!obj) { err = SVRCORE_NoMemory_Error; break; }
|
||||
|
||||
obj->base.methods = &vtable;
|
||||
|
||||
obj->alt = alt;
|
||||
obj->pinList = 0;
|
||||
} while(0);
|
||||
|
||||
*out = obj;
|
||||
return err;
|
||||
}
|
||||
|
||||
void
|
||||
SVRCORE_DestroyCachedPinObj(SVRCORECachedPinObj *obj)
|
||||
{
|
||||
if (!obj) return;
|
||||
|
||||
if (obj->pinList) freeList(obj->pinList);
|
||||
|
||||
free(obj);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* vtable functions
|
||||
*/
|
||||
static void
|
||||
destroyObject(SVRCOREPinObj *obj)
|
||||
{
|
||||
SVRCORE_DestroyCachedPinObj((SVRCORECachedPinObj*)obj);
|
||||
}
|
||||
|
||||
static char *
|
||||
getPin(SVRCOREPinObj *ctx, const char *tokenName, PRBool retry)
|
||||
{
|
||||
SVRCORECachedPinObj *obj = (SVRCORECachedPinObj*)ctx;
|
||||
Node **link, *node;
|
||||
char *pin = 0;
|
||||
|
||||
/*
|
||||
* Look up the value in the cache. Remove the entry if this is
|
||||
* a retry, or getting the stored value fails. This loop terminates
|
||||
* with 'pin' set to any valid cached value.
|
||||
*/
|
||||
for(link = &obj->pinList;(node = *link) != NULL;link = &node->next)
|
||||
{
|
||||
if (strcmp(node->tokenName, tokenName) != 0) continue;
|
||||
|
||||
if (retry ||
|
||||
SVRCORE_Pk11StoreGetPin(&pin, node->store) != SVRCORE_Success)
|
||||
{
|
||||
*link = node->next;
|
||||
|
||||
freeNode(node);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Now loop, attempting to read a pin from the alternate source
|
||||
* until cancelled, or a valid PIN is provided.
|
||||
*/
|
||||
while(!pin)
|
||||
{
|
||||
SVRCOREError err;
|
||||
|
||||
/* Call second level */
|
||||
pin = SVRCORE_GetPin(obj->alt, tokenName, retry);
|
||||
|
||||
if (!pin) break; /* Cancel */
|
||||
|
||||
/* Attempt to create a Pin Storage object. This checks the
|
||||
* password.
|
||||
*/
|
||||
do {
|
||||
Node *node;
|
||||
|
||||
node = (Node*)malloc(sizeof (Node));
|
||||
if (!node) { err = SVRCORE_NoMemory_Error; break; }
|
||||
|
||||
node->tokenName = 0;
|
||||
node->store = 0;
|
||||
|
||||
do {
|
||||
node->tokenName = strdup(tokenName);
|
||||
if (!node->tokenName) { err = SVRCORE_NoMemory_Error; break; }
|
||||
|
||||
err = SVRCORE_CreatePk11PinStore(&node->store, tokenName, pin);
|
||||
} while(0);
|
||||
|
||||
if (err) { freeNode(node); break; }
|
||||
|
||||
node->next = obj->pinList;
|
||||
obj->pinList = node;
|
||||
} while(0);
|
||||
|
||||
/* If node creation worked, then pin is correct */
|
||||
if (err == SVRCORE_Success) break;
|
||||
|
||||
/* Quit on any error other than IncorrectPassword */
|
||||
if (err != SVRCORE_IncorrectPassword_Error) break;
|
||||
|
||||
/* Password was incorrect, treat this as a retry */
|
||||
retry = PR_TRUE;
|
||||
}
|
||||
|
||||
return pin;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* SVRCORE_CachedPinGetPin
|
||||
*/
|
||||
SVRCOREError
|
||||
SVRCORE_CachedPinGetPin(
|
||||
char **out, SVRCORECachedPinObj *obj,
|
||||
const char *tokenName)
|
||||
{
|
||||
SVRCOREError err;
|
||||
Node *node;
|
||||
|
||||
*out = 0;
|
||||
|
||||
do {
|
||||
/* Find a matching PIN node */
|
||||
for(node = obj->pinList;node;node = node->next)
|
||||
{
|
||||
if (strcmp(node->tokenName, tokenName) == 0) break;;
|
||||
}
|
||||
if (!node) { err = SVRCORE_NoSuchToken_Error; break; }
|
||||
|
||||
err = SVRCORE_Pk11StoreGetPin(out, node->store);
|
||||
} while(0);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static const struct SVRCOREPinMethods vtable =
|
||||
{ 0, 0, destroyObject, getPin };
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* Node implementation
|
||||
*/
|
||||
static void freeNode(Node *node)
|
||||
{
|
||||
if (!node) return;
|
||||
|
||||
if (node->store) SVRCORE_DestroyPk11PinStore(node->store);
|
||||
if (node->tokenName) free(node->tokenName);
|
||||
|
||||
free(node);
|
||||
}
|
||||
|
||||
static void freeList(Node *list)
|
||||
{
|
||||
Node *n;
|
||||
|
||||
while((n = list) != NULL)
|
||||
{
|
||||
list = n->next;
|
||||
|
||||
free(n->tokenName);
|
||||
free(n);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Netscape svrcore library.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
* errors.c - SVRCORE Error strings
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <svrcore.h>
|
||||
|
||||
const char * const SVRCORE_Errors[] = {
|
||||
"Operation completed successfully",
|
||||
"Not enough memory to complete operation",
|
||||
"Unspecified error",
|
||||
"Token missing or unavailable",
|
||||
"Incorrect password or PIN provided"
|
||||
};
|
|
@ -0,0 +1,257 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Netscape svrcore library.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
* file.c - SVRCORE module for reading PIN from a file
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <svrcore.h>
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* Node - for maintaining link list of tokens with bad PINs
|
||||
*/
|
||||
typedef struct Node Node;
|
||||
static void freeList(Node *list);
|
||||
|
||||
struct Node
|
||||
{
|
||||
Node *next;
|
||||
char *tokenName;
|
||||
};
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* SVRCOREFilePinObj implementation
|
||||
*/
|
||||
struct SVRCOREFilePinObj
|
||||
{
|
||||
SVRCOREPinObj base;
|
||||
char *filename;
|
||||
PRBool disabled;
|
||||
Node *badPinList;
|
||||
};
|
||||
static const struct SVRCOREPinMethods vtable;
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
SVRCOREError
|
||||
SVRCORE_CreateFilePinObj(
|
||||
SVRCOREFilePinObj **out,
|
||||
const char *filename)
|
||||
{
|
||||
SVRCOREError err = SVRCORE_Success;
|
||||
SVRCOREFilePinObj *obj = 0;
|
||||
|
||||
do {
|
||||
obj = (SVRCOREFilePinObj*)malloc(sizeof (SVRCOREFilePinObj));
|
||||
if (!obj) { err = SVRCORE_NoMemory_Error; break; }
|
||||
|
||||
obj->base.methods = &vtable;
|
||||
|
||||
obj->filename = 0;
|
||||
obj->disabled = PR_FALSE;
|
||||
obj->badPinList = 0;
|
||||
|
||||
obj->filename = strdup(filename);
|
||||
if (!obj->filename) { err = SVRCORE_NoMemory_Error; break; }
|
||||
|
||||
} while(0);
|
||||
|
||||
if (err)
|
||||
{
|
||||
SVRCORE_DestroyFilePinObj(obj);
|
||||
obj = 0;
|
||||
}
|
||||
|
||||
*out = obj;
|
||||
return err;
|
||||
}
|
||||
|
||||
void
|
||||
SVRCORE_DestroyFilePinObj(SVRCOREFilePinObj *obj)
|
||||
{
|
||||
if (!obj) return;
|
||||
|
||||
if (obj->filename) free(obj->filename);
|
||||
|
||||
if (obj->badPinList) freeList(obj->badPinList);
|
||||
|
||||
free(obj);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* vtable functions
|
||||
*/
|
||||
static void
|
||||
destroyObject(SVRCOREPinObj *obj)
|
||||
{
|
||||
SVRCORE_DestroyFilePinObj((SVRCOREFilePinObj*)obj);
|
||||
}
|
||||
|
||||
static char *
|
||||
getPin(SVRCOREPinObj *ctx, const char *tokenName, PRBool retry)
|
||||
{
|
||||
SVRCOREFilePinObj *obj = (SVRCOREFilePinObj*)ctx;
|
||||
PK11SlotInfo *slot;
|
||||
int is_internal_token = 0;
|
||||
FILE *pinfile = 0;
|
||||
char *res = 0;
|
||||
|
||||
/* In really bad situations, where we cannot allocate memory
|
||||
* for a bad PIN list, the entire PIN object is disabled.
|
||||
*/
|
||||
if (obj->disabled) return 0;
|
||||
|
||||
/*
|
||||
* If the application is retrying the PIN, the one in the file is
|
||||
* probably wrong. It's important that we avoid returning this
|
||||
* PIN to the caller each time, since that will result in disabling
|
||||
* the token.
|
||||
*/
|
||||
{
|
||||
Node *p;
|
||||
|
||||
for(p = obj->badPinList;p;p = p->next)
|
||||
if (strcmp(p->tokenName, tokenName) == 0) break;
|
||||
|
||||
if (p) return 0;
|
||||
}
|
||||
|
||||
/* Mark it as bad (in the hash table) so that we remember
|
||||
* to never return it again.
|
||||
*/
|
||||
if (retry)
|
||||
{
|
||||
Node *ent = 0;
|
||||
|
||||
do {
|
||||
ent = (Node *)malloc(sizeof (Node));
|
||||
if (!ent) break;
|
||||
|
||||
ent->tokenName = strdup(tokenName);
|
||||
|
||||
if (!ent->tokenName)
|
||||
{
|
||||
free(ent);
|
||||
ent = 0;
|
||||
}
|
||||
} while(0);
|
||||
|
||||
/* If adding fails, disable the whole object */
|
||||
if (!ent) obj->disabled = PR_TRUE;
|
||||
|
||||
/* Add to list */
|
||||
ent->next = obj->badPinList;
|
||||
obj->badPinList = ent;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
slot = PK11_FindSlotByName((char *)tokenName);
|
||||
if (slot) {
|
||||
is_internal_token = PK11_IsInternal(slot);
|
||||
PK11_FreeSlot(slot);
|
||||
}
|
||||
|
||||
do {
|
||||
char line[128];
|
||||
|
||||
pinfile = fopen(obj->filename, "rt");
|
||||
if (!pinfile) break;
|
||||
|
||||
/* Read lines from the file */
|
||||
while(fgets(line, sizeof line, pinfile))
|
||||
{
|
||||
char *pin;
|
||||
char *delim;
|
||||
|
||||
/* Find the ":" */
|
||||
delim = strchr(line, ':');
|
||||
if (!delim) continue;
|
||||
|
||||
/* Terminate name field and skip ";" */
|
||||
*delim++ = 0;
|
||||
|
||||
if (strcmp(line, tokenName) == 0 ||
|
||||
(is_internal_token &&
|
||||
(strcmp(line, "Communicator Certificate DB") == 0 ||
|
||||
strcmp(line, "Internal (Software) Token") == 0)))
|
||||
{
|
||||
pin = delim;
|
||||
delim = strchr(pin, '\n');
|
||||
if (delim) *delim = 0;
|
||||
|
||||
res = strdup(pin);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Clear any sensitive data */
|
||||
memset(line, 0, sizeof line);
|
||||
} while(0);
|
||||
|
||||
if (pinfile) fclose(pinfile);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static const struct SVRCOREPinMethods vtable =
|
||||
{ 0, 0, destroyObject, getPin };
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* Node implementation
|
||||
*/
|
||||
static void freeList(Node *list)
|
||||
{
|
||||
Node *n;
|
||||
|
||||
while((n = list) != NULL)
|
||||
{
|
||||
list = n->next;
|
||||
|
||||
free(n->tokenName);
|
||||
free(n);
|
||||
}
|
||||
}
|
||||
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 766 B |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 766 B |
|
@ -0,0 +1,54 @@
|
|||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape svrcore library.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1996, 1997
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
CORE_DEPTH = ../..
|
||||
|
||||
MODULE = svrcore
|
||||
|
||||
IMPORTS = nspr20/v4.6 nss/NSS_3_10_2_RTM
|
||||
|
||||
RELEASE = svrcore
|
||||
|
||||
LIBRARY_NAME = svrcore
|
||||
|
||||
EXPORTS = svrcore.h
|
||||
|
||||
REQUIRES = nspr20 nss
|
||||
|
||||
CSRCS = user.c pin.c alt.c file.c errors.c pk11.c \
|
||||
cache.c std.c ntgetpin.c
|
||||
|
|
@ -0,0 +1,171 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Netscape svrcore library.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/***********************************************************
|
||||
*
|
||||
* ntgetpin.c - Prompts for the key database passphrase.
|
||||
*
|
||||
***********************************************************/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#if defined( _WIN32 )
|
||||
|
||||
#include <windows.h>
|
||||
#include <nspr.h>
|
||||
#include "ntresource.h"
|
||||
|
||||
#undef Debug
|
||||
#undef OFF
|
||||
#undef LITTLE_ENDIAN
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
static char password[512];
|
||||
|
||||
static void CenterDialog(HWND hwndParent, HWND hwndDialog)
|
||||
{
|
||||
RECT DialogRect;
|
||||
RECT ParentRect;
|
||||
POINT Point;
|
||||
int nWidth;
|
||||
int nHeight;
|
||||
|
||||
// Determine if the main window exists. This can be useful when
|
||||
// the application creates the dialog box before it creates the
|
||||
// main window. If it does exist, retrieve its size to center
|
||||
// the dialog box with respect to the main window.
|
||||
if( hwndParent != NULL )
|
||||
{
|
||||
GetClientRect(hwndParent, &ParentRect);
|
||||
}
|
||||
else
|
||||
{
|
||||
// if main window does not exist, center with respect to desktop
|
||||
hwndParent = GetDesktopWindow();
|
||||
GetWindowRect(hwndParent, &ParentRect);
|
||||
}
|
||||
|
||||
// get the size of the dialog box
|
||||
GetWindowRect(hwndDialog, &DialogRect);
|
||||
|
||||
// calculate height and width for MoveWindow()
|
||||
nWidth = DialogRect.right - DialogRect.left;
|
||||
nHeight = DialogRect.bottom - DialogRect.top;
|
||||
|
||||
// find center point and convert to screen coordinates
|
||||
Point.x = (ParentRect.right - ParentRect.left) / 2;
|
||||
Point.y = (ParentRect.bottom - ParentRect.top) / 2;
|
||||
|
||||
ClientToScreen(hwndParent, &Point);
|
||||
|
||||
// calculate new X, Y starting point
|
||||
Point.x -= nWidth / 2;
|
||||
Point.y -= nHeight / 2;
|
||||
|
||||
MoveWindow(hwndDialog, Point.x, Point.y, nWidth, nHeight, FALSE);
|
||||
}
|
||||
|
||||
static BOOL CALLBACK PinDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
SetDlgItemText( hDlg, IDC_TOKEN_NAME, (char *)lParam);
|
||||
CenterDialog(NULL, hDlg);
|
||||
SendDlgItemMessage(hDlg, IDEDIT, EM_SETLIMITTEXT, sizeof(password), 0);
|
||||
EnableWindow(GetDlgItem(hDlg, IDOK), FALSE);
|
||||
return(FALSE);
|
||||
|
||||
case WM_COMMAND:
|
||||
if(LOWORD(wParam) == IDEDIT)
|
||||
{
|
||||
if(HIWORD(wParam) == EN_CHANGE)
|
||||
{
|
||||
if(GetDlgItemText(hDlg, IDEDIT, password,
|
||||
sizeof(password)) > 0)
|
||||
{
|
||||
EnableWindow(GetDlgItem(hDlg, IDOK), TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
EnableWindow(GetDlgItem(hDlg, IDOK), FALSE);
|
||||
}
|
||||
}
|
||||
return (FALSE);
|
||||
}
|
||||
else if(LOWORD(wParam) == IDOK)
|
||||
{
|
||||
GetDlgItemText(hDlg, IDEDIT, password, sizeof(password));
|
||||
EndDialog(hDlg, IDOK);
|
||||
return (TRUE);
|
||||
}
|
||||
else if(LOWORD(wParam) == IDCANCEL)
|
||||
{
|
||||
memset(password, 0, sizeof(password));
|
||||
EndDialog(hDlg, IDCANCEL);
|
||||
return(FALSE);
|
||||
}
|
||||
}
|
||||
return (FALSE);
|
||||
}
|
||||
char*
|
||||
NT_PromptForPin (const char *tokenName)
|
||||
{
|
||||
int iResult = 0;
|
||||
|
||||
iResult = DialogBoxParam( GetModuleHandle( NULL ),
|
||||
MAKEINTRESOURCE(IDD_DATABASE_PASSWORD),
|
||||
HWND_DESKTOP, (DLGPROC) PinDialogProc, (LPARAM)tokenName);
|
||||
if( iResult == -1 )
|
||||
{
|
||||
iResult = GetLastError();
|
||||
/*
|
||||
ReportSlapdEvent( EVENTLOG_INFORMATION_TYPE,
|
||||
MSG_SERVER_PASSWORD_DIALOG_FAILED, 0, NULL );
|
||||
*/
|
||||
return NULL;
|
||||
}
|
||||
/* Return no-response if the user click on cancel */
|
||||
if (password[0] == 0) return 0;
|
||||
return strdup(password);
|
||||
}
|
||||
|
||||
#endif /* defined( _WIN32 ) */
|
|
@ -0,0 +1,92 @@
|
|||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "ntresource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_DATABASE_PASSWORD DIALOG DISCARDABLE 0, 0, 269, 90
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Netscape Server"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
EDITTEXT IDEDIT,43,44,129,14,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "OK",IDOK,206,11,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,206,31,50,14
|
||||
ICON IDI_KEY,IDC_STATIC,9,23,20,20
|
||||
LTEXT "A PIN is required to access",IDC_STATIC,44,15,119,12
|
||||
LTEXT "Token Name",IDC_TOKEN_NAME,43,26,132,12
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_KEY ICON DISCARDABLE "KEY.ICO"
|
||||
IDI_LOGO ICON DISCARDABLE "LOGO.ICO"
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"ntresource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by ntgetpin.rc
|
||||
//
|
||||
#define IDD_DATABASE_PASSWORD 101
|
||||
#define IDI_KEY 103
|
||||
#define IDI_LOGO 105
|
||||
#define IDR_MENU 205
|
||||
#define IDEDIT 1000
|
||||
#define IDC_TOKEN_NAME 1001
|
||||
#define ID_SERVER_RESTART 40001
|
||||
#define ID_FILE_EXIT 40003
|
||||
#define ID_SERVER_SHUTDOWN 40004
|
||||
#define ID_SERVER_SUSPEND 40005
|
||||
#define ID_SERVER_RESUME 40006
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 106
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1006
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
|
@ -0,0 +1,95 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Netscape svrcore library.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
* pin.c - SVRCORE module implementing PK11 pin callback support
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <svrcore.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <pk11func.h>
|
||||
#include <seccomon.h>
|
||||
|
||||
/*
|
||||
* Global state
|
||||
*/
|
||||
static SVRCOREPinObj *pinObj = 0;
|
||||
|
||||
/*
|
||||
* SVRCORE_Pk11PasswordFunc
|
||||
*
|
||||
* DEPRECATED public interface.
|
||||
*/
|
||||
static char *
|
||||
SVRCORE_Pk11PasswordFunc(PK11SlotInfo *slot, PRBool retry, void *ctx)
|
||||
{
|
||||
char *passwd;
|
||||
|
||||
/* If the user has not installed a cbk, then return failure (cancel) */
|
||||
if (pinObj == 0) return 0;
|
||||
|
||||
/* Invoke the callback function, translating slot into token name */
|
||||
passwd = SVRCORE_GetPin(pinObj, PK11_GetTokenName(slot), retry);
|
||||
|
||||
return passwd;
|
||||
}
|
||||
|
||||
/*
|
||||
* SVRCORE_RegisterPinObj
|
||||
*/
|
||||
void
|
||||
SVRCORE_RegisterPinObj(SVRCOREPinObj *obj)
|
||||
{
|
||||
/* Set PK11 callback function to call back here */
|
||||
PK11_SetPasswordFunc(SVRCORE_Pk11PasswordFunc);
|
||||
|
||||
/* Set object to use for getPin method */
|
||||
pinObj = obj;
|
||||
}
|
||||
|
||||
/*
|
||||
* SVRCORE_GetRegisteredPinObj
|
||||
*/
|
||||
SVRCOREPinObj *
|
||||
SVRCORE_GetRegisteredPinObj(void)
|
||||
{
|
||||
return pinObj;
|
||||
}
|
|
@ -0,0 +1,190 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Netscape svrcore library.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
* std.c - StandardSVRCORE module for reading a PIN
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <svrcore.h>
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* SVRCOREStdPinObj implementation
|
||||
*/
|
||||
struct SVRCOREStdPinObj
|
||||
{
|
||||
SVRCOREPinObj base;
|
||||
SVRCORECachedPinObj *cache;
|
||||
SVRCOREAltPinObj *alt;
|
||||
SVRCOREFilePinObj *file;
|
||||
SVRCOREUserPinObj *user;
|
||||
|
||||
SVRCOREPinObj *top;
|
||||
};
|
||||
static const SVRCOREPinMethods vtable;
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
SVRCOREError
|
||||
SVRCORE_CreateStdPinObj(
|
||||
SVRCOREStdPinObj **out,
|
||||
const char *filename, PRBool cachePINs)
|
||||
{
|
||||
SVRCOREError err = SVRCORE_Success;
|
||||
SVRCOREStdPinObj *obj = 0;
|
||||
|
||||
do {
|
||||
SVRCOREPinObj *top;
|
||||
|
||||
obj = (SVRCOREStdPinObj *)malloc(sizeof (SVRCOREStdPinObj));
|
||||
if (!obj) { err = SVRCORE_NoMemory_Error; break; }
|
||||
|
||||
obj->base.methods = &vtable;
|
||||
|
||||
obj->cache = 0;
|
||||
obj->alt = 0;
|
||||
obj->file = 0;
|
||||
obj->user = 0;
|
||||
|
||||
err = SVRCORE_CreateUserPinObj(&obj->user);
|
||||
if (err) break;
|
||||
|
||||
top = (SVRCOREPinObj*)obj->user;
|
||||
|
||||
/* If filename is provided, splice it into the chain */
|
||||
if (filename)
|
||||
{
|
||||
err = SVRCORE_CreateFilePinObj(&obj->file, filename);
|
||||
if (err) break;
|
||||
|
||||
err = SVRCORE_CreateAltPinObj(&obj->alt,
|
||||
(SVRCOREPinObj*)obj->file, top);
|
||||
if (err) break;
|
||||
|
||||
top = (SVRCOREPinObj*)obj->alt;
|
||||
}
|
||||
|
||||
/* Create cache object if requested */
|
||||
if (cachePINs)
|
||||
{
|
||||
err = SVRCORE_CreateCachedPinObj(&obj->cache, top);
|
||||
if (err) break;
|
||||
|
||||
top = (SVRCOREPinObj*)obj->cache;
|
||||
}
|
||||
|
||||
obj->top = top;
|
||||
} while(0);
|
||||
|
||||
if (err != SVRCORE_Success)
|
||||
{
|
||||
SVRCORE_DestroyStdPinObj(obj);
|
||||
}
|
||||
|
||||
*out = obj;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
void
|
||||
SVRCORE_DestroyStdPinObj(
|
||||
SVRCOREStdPinObj *obj)
|
||||
{
|
||||
if (!obj) return;
|
||||
|
||||
if (obj->user) SVRCORE_DestroyUserPinObj(obj->user);
|
||||
if (obj->file) SVRCORE_DestroyFilePinObj(obj->file);
|
||||
if (obj->alt) SVRCORE_DestroyAltPinObj(obj->alt);
|
||||
if (obj->cache) SVRCORE_DestroyCachedPinObj(obj->cache);
|
||||
|
||||
free(obj);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
void
|
||||
SVRCORE_SetStdPinInteractive(SVRCOREStdPinObj *obj, PRBool i)
|
||||
{
|
||||
SVRCORE_SetUserPinInteractive(obj->user, i);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* SVRCORE_StdPinGetPin
|
||||
*/
|
||||
SVRCOREError
|
||||
SVRCORE_StdPinGetPin(char **pin, SVRCOREStdPinObj *obj,
|
||||
const char *tokenName)
|
||||
{
|
||||
/* Make sure caching is turned on */
|
||||
if (!obj->cache)
|
||||
{
|
||||
*pin = 0;
|
||||
return SVRCORE_NoSuchToken_Error;
|
||||
}
|
||||
|
||||
return SVRCORE_CachedPinGetPin(pin, obj->cache, tokenName);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* vtable methods
|
||||
*/
|
||||
static void
|
||||
destroyObject(SVRCOREPinObj *obj)
|
||||
{
|
||||
SVRCORE_DestroyStdPinObj((SVRCOREStdPinObj*)obj);
|
||||
}
|
||||
|
||||
static char *
|
||||
getPin(SVRCOREPinObj *pinObj, const char *tokenName, PRBool retry)
|
||||
{
|
||||
SVRCOREStdPinObj *obj = (SVRCOREStdPinObj*)pinObj;
|
||||
|
||||
/* Just forward call to the top level handler */
|
||||
return SVRCORE_GetPin(obj->top, tokenName, retry);
|
||||
}
|
||||
|
||||
/*
|
||||
* VTable
|
||||
*/
|
||||
static const SVRCOREPinMethods vtable =
|
||||
{ 0, 0, destroyObject, getPin };
|
|
@ -0,0 +1,275 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Netscape svrcore library.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef __SVRCORE_H_
|
||||
#define __SVRCORE_H_
|
||||
|
||||
#include <prtypes.h>
|
||||
#include <seccomon.h>
|
||||
#include <pk11func.h>
|
||||
|
||||
PR_BEGIN_EXTERN_C
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* SVRCOREError - error values generated by components in the
|
||||
* SVRCORE module.
|
||||
*/
|
||||
enum SVRCOREError
|
||||
{
|
||||
SVRCORE_Success = 0,
|
||||
SVRCORE_NoMemory_Error = 1,
|
||||
SVRCORE_System_Error = 2,
|
||||
SVRCORE_NoSuchToken_Error = 3,
|
||||
SVRCORE_IncorrectPassword_Error = 4,
|
||||
SVRCORE_MaximumErrorValue = 4
|
||||
};
|
||||
typedef enum SVRCOREError SVRCOREError;
|
||||
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* PIN Object - provides an interface to get the PIN for
|
||||
* a PKCS11 token.
|
||||
*
|
||||
* Methods:
|
||||
* destroyObj - delete the object
|
||||
* getPin - retrieve the PIN for the token with name "tokenName". The
|
||||
* retry flag is set if this request is a retry due to an incorrect
|
||||
* PIN. Implementations should not return a "cached" copy in this case,
|
||||
* since it will result in multiple fails, and will disable some tokens.
|
||||
* The memory allocated for the returned string must be on the system
|
||||
* heap. It will be released using "free"
|
||||
*/
|
||||
typedef struct SVRCOREPinObj SVRCOREPinObj;
|
||||
typedef struct SVRCOREPinMethods SVRCOREPinMethods;
|
||||
struct SVRCOREPinMethods
|
||||
{
|
||||
void *(*reserved0)(SVRCOREPinObj *, void *);
|
||||
void (*reserved1)(SVRCOREPinObj *);
|
||||
void (*destroyObj)(SVRCOREPinObj* obj);
|
||||
char *(*getPin)(SVRCOREPinObj *obj, const char *tokenName, PRBool retryFlag);
|
||||
};
|
||||
|
||||
struct SVRCOREPinObj
|
||||
{
|
||||
const SVRCOREPinMethods *methods;
|
||||
};
|
||||
|
||||
/*
|
||||
* Methods on SVRCOREPinObj
|
||||
*/
|
||||
/* char *SVRCORE_GetPin(SVRCOREPinObj *, char *tokenName, PRBool retry) */
|
||||
#define SVRCORE_GetPin(obj, name, retry) \
|
||||
(obj)->methods->getPin(obj, name, retry)
|
||||
|
||||
/* void SVRCORE_DestroyPinObj(SVRCOREPinObj *) */
|
||||
#define SVRCORE_DestroyPinObj(obj) \
|
||||
(obj)->methods->destroyObj(obj)
|
||||
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* SVRCORE_RegisterPinObj - registers the PIN handling object with the
|
||||
* PK11 module.
|
||||
*
|
||||
* The PIN object's getPin method will be called when the NSS layer
|
||||
* requires a password/PIN for a token. The caller may provide NULL
|
||||
* as the pin object, in which case, no password callbacks will be invoked.
|
||||
* This may be used to unregister the object prior to deleting it.
|
||||
*/
|
||||
void
|
||||
SVRCORE_RegisterPinObj(SVRCOREPinObj *obj);
|
||||
|
||||
/*
|
||||
* SVRCORE_GetRegisteredPinObj - get the currently registered Pin object
|
||||
* (if any)
|
||||
*
|
||||
* Return a pointer to the currently register Pin object. If none has been
|
||||
* registered, NULL is returned.
|
||||
*/
|
||||
SVRCOREPinObj *
|
||||
SVRCORE_GetRegisteredPinObj(void);
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* SVRCOREStdPinObj - implementation of SVRCOREPinObj that
|
||||
* provides the standard handling for servers. This includes
|
||||
* optional file lookup, and optional caching
|
||||
*
|
||||
* SVRCORE_SetStdPinInteractive - allows the application to declare
|
||||
* that input via the terminal is no longer possible (set interactive
|
||||
* to PR_FALSE). See the corresponding routine for UserPinObj
|
||||
*
|
||||
* SVRCORE_StdPinGetPin - get a (securely) cached PIN value. Returns
|
||||
* SVRCORE_NoSuchToken_Error if the object is not set up for caching.
|
||||
*/
|
||||
typedef struct SVRCOREStdPinObj SVRCOREStdPinObj;
|
||||
|
||||
SVRCOREError
|
||||
SVRCORE_CreateStdPinObj(SVRCOREStdPinObj **out,
|
||||
const char *filename, PRBool cachePINs);
|
||||
|
||||
void
|
||||
SVRCORE_SetStdPinInteractive(SVRCOREStdPinObj *obj, PRBool interactive);
|
||||
|
||||
SVRCOREError
|
||||
SVRCORE_StdPinGetPin(char **pin, SVRCOREStdPinObj *obj,
|
||||
const char *tokenName);
|
||||
|
||||
void
|
||||
SVRCORE_DestroyStdPinObj(SVRCOREStdPinObj *obj);
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* SVRCOREUserPinObj - implementation of SVRCOREPinObj that
|
||||
* requests the PIN on the terminal.
|
||||
*
|
||||
* SVRCORE_SetUserPinInteractive - allows the application to declare
|
||||
* that input via the terminal is no longer possible (set interactive
|
||||
* to PR_FALSE). When this is the case, the object returns NULL (no
|
||||
* PIN available)
|
||||
*/
|
||||
typedef struct SVRCOREUserPinObj SVRCOREUserPinObj;
|
||||
|
||||
SVRCOREError
|
||||
SVRCORE_CreateUserPinObj(SVRCOREUserPinObj **out);
|
||||
|
||||
void
|
||||
SVRCORE_SetUserPinInteractive(SVRCOREUserPinObj *obj, PRBool interactive);
|
||||
|
||||
void
|
||||
SVRCORE_DestroyUserPinObj(SVRCOREUserPinObj *obj);
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* SVRCOREAltPinObj - allows cascading of PinObj. For example, an
|
||||
* application can first check a file (FilePinObj) and then the terminal
|
||||
* (UserPinObj). The primary object is called first then, if no PIN is
|
||||
* available, the alternate object is called.
|
||||
*
|
||||
* This object does not claim ownership of the PinObjs. The application
|
||||
* must delete them (after deleting the AltPinObj).
|
||||
*/
|
||||
typedef struct SVRCOREAltPinObj SVRCOREAltPinObj;
|
||||
|
||||
SVRCOREError
|
||||
SVRCORE_CreateAltPinObj(
|
||||
SVRCOREAltPinObj **out,
|
||||
SVRCOREPinObj *primary, SVRCOREPinObj *alt);
|
||||
|
||||
void SVRCORE_DestroyAltPinObj(SVRCOREAltPinObj *obj);
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* SVRCOREFilePinObj - implements reading PINs from a file. The
|
||||
* name of the file is provided in the constructor.
|
||||
*/
|
||||
typedef struct SVRCOREFilePinObj SVRCOREFilePinObj;
|
||||
|
||||
SVRCOREError
|
||||
SVRCORE_CreateFilePinObj(
|
||||
SVRCOREFilePinObj **out,
|
||||
const char *filename);
|
||||
|
||||
void
|
||||
SVRCORE_DestroyFilePinObj(SVRCOREFilePinObj *obj);
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* SVRCORECachedPinObj - implementation of SVRCOREPinObj that
|
||||
* caches the PIN in a secure way.
|
||||
*
|
||||
* SVRCORE_CachedPinGetPin - allows the application to retrieve
|
||||
* the stored pin. The application should free the value useing free()
|
||||
* after clearing the memory.
|
||||
*/
|
||||
typedef struct SVRCORECachedPinObj SVRCORECachedPinObj;
|
||||
|
||||
SVRCOREError
|
||||
SVRCORE_CreateCachedPinObj(SVRCORECachedPinObj **out, SVRCOREPinObj *alt);
|
||||
|
||||
SVRCOREError
|
||||
SVRCORE_CachedPinGetPin(char **pin, SVRCORECachedPinObj *obj,
|
||||
const char *tokenName);
|
||||
|
||||
void
|
||||
SVRCORE_DestroyCachedPinObj(SVRCORECachedPinObj *obj);
|
||||
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* Implements SVRCORESecurePinStore interface
|
||||
*/
|
||||
typedef struct SVRCOREPk11PinStore SVRCOREPk11PinStore;
|
||||
|
||||
/*
|
||||
* SVRCORE_GetPk11PinStoreError
|
||||
*/
|
||||
SECStatus SVRCORE_Pk11StoreGetError(const SVRCOREPk11PinStore *store);
|
||||
|
||||
/* Experimental */
|
||||
const char *SVRCORE_Pk11StoreGetMechName(const SVRCOREPk11PinStore *store);
|
||||
|
||||
/*
|
||||
* SVRCORE_CreatePk11PinStore
|
||||
* Args:
|
||||
* None
|
||||
* Errors:
|
||||
* SVRCORE_Success
|
||||
* SVRCORE_NoMemory_Error
|
||||
* SVRCORE_NoSuchToken_Error
|
||||
* SVRCORE_System_Error
|
||||
* SVRCORE_IncorrectPassword_Error
|
||||
*/
|
||||
SVRCOREError
|
||||
SVRCORE_CreatePk11PinStore(
|
||||
SVRCOREPk11PinStore **out, /* Output */
|
||||
const char *tokenName,
|
||||
const char *pin);
|
||||
|
||||
SVRCOREError
|
||||
SVRCORE_Pk11StoreGetPin(
|
||||
char **out, /* Output */
|
||||
SVRCOREPk11PinStore *store);
|
||||
|
||||
void
|
||||
SVRCORE_DestroyPk11PinStore(
|
||||
SVRCOREPk11PinStore *store);
|
||||
|
||||
|
||||
PR_END_EXTERN_C
|
||||
|
||||
#endif
|
|
@ -0,0 +1,205 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Netscape svrcore library.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
* user.c - SVRCORE module for reading PIN from the terminal
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <svrcore.h>
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif /* _WIN32 */
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/* I18N */
|
||||
static const char retryWarning[] =
|
||||
"Warning: Incorrect PIN may result in disabling the token";
|
||||
static const char prompt[] = "Enter PIN for";
|
||||
static const char nt_retryWarning[] =
|
||||
"Warning: You entered an incorrect PIN. Incorrect PIN may result in disabling the token";
|
||||
|
||||
struct SVRCOREUserPinObj
|
||||
{
|
||||
SVRCOREPinObj base;
|
||||
PRBool interactive;
|
||||
};
|
||||
static const struct SVRCOREPinMethods vtable;
|
||||
|
||||
#ifdef _WIN32
|
||||
extern char* NT_PromptForPin(const char *tokenName);
|
||||
#else
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
* Support routines for changing terminal modes on UNIX
|
||||
*/
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
static void echoOff(int fd)
|
||||
{
|
||||
if (isatty(fd)) {
|
||||
struct termios tio;
|
||||
tcgetattr(fd, &tio);
|
||||
tio.c_lflag &= ~ECHO;
|
||||
tcsetattr(fd, TCSAFLUSH, &tio);
|
||||
}
|
||||
}
|
||||
|
||||
static void echoOn(int fd)
|
||||
{
|
||||
if (isatty(fd)) {
|
||||
struct termios tio;
|
||||
tcgetattr(fd, &tio);
|
||||
tio.c_lflag |= ECHO;
|
||||
tcsetattr(fd, TCSAFLUSH, &tio);
|
||||
}
|
||||
}
|
||||
#endif /* _WIN32 */
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
SVRCOREError
|
||||
SVRCORE_CreateUserPinObj(SVRCOREUserPinObj **out)
|
||||
{
|
||||
SVRCOREError err = 0;
|
||||
SVRCOREUserPinObj *obj = 0;
|
||||
|
||||
do {
|
||||
obj = (SVRCOREUserPinObj*)malloc(sizeof (SVRCOREUserPinObj));
|
||||
if (!obj) { err = 1; break; }
|
||||
|
||||
obj->base.methods = &vtable;
|
||||
|
||||
obj->interactive = PR_TRUE;
|
||||
} while(0);
|
||||
|
||||
if (err)
|
||||
{
|
||||
SVRCORE_DestroyUserPinObj(obj);
|
||||
obj = 0;
|
||||
}
|
||||
|
||||
*out = obj;
|
||||
return err;
|
||||
}
|
||||
|
||||
void
|
||||
SVRCORE_DestroyUserPinObj(SVRCOREUserPinObj *obj)
|
||||
{
|
||||
if (obj) free(obj);
|
||||
}
|
||||
|
||||
void
|
||||
SVRCORE_SetUserPinInteractive(SVRCOREUserPinObj *obj, PRBool i)
|
||||
{
|
||||
obj->interactive = i;
|
||||
}
|
||||
|
||||
static void destroyObject(SVRCOREPinObj *obj)
|
||||
{
|
||||
SVRCORE_DestroyUserPinObj((SVRCOREUserPinObj*)obj);
|
||||
}
|
||||
|
||||
|
||||
static char *getPin(SVRCOREPinObj *obj, const char *tokenName, PRBool retry)
|
||||
{
|
||||
SVRCOREUserPinObj *tty = (SVRCOREUserPinObj*)obj;
|
||||
char line[128];
|
||||
char *res;
|
||||
|
||||
/* If the program is not interactive then return no result */
|
||||
if (!tty->interactive) return 0;
|
||||
|
||||
#ifdef _WIN32
|
||||
if (retry) {
|
||||
MessageBox(GetDesktopWindow(), nt_retryWarning,
|
||||
"Netscape Server", MB_ICONEXCLAMATION | MB_OK);
|
||||
}
|
||||
return NT_PromptForPin(tokenName);
|
||||
#else
|
||||
|
||||
if (retry)
|
||||
fprintf(stdout, "%s\n", retryWarning);
|
||||
|
||||
echoOff(fileno(stdin));
|
||||
|
||||
/***
|
||||
Please Note: the following printf statement was changed from fprintf(stdout,...) because
|
||||
of an odd problem with the Linux build. The issue is that libc.so has a symbol for stdout
|
||||
and libstdc++.so which we also reference has a symbol for stdout. Normally the libc.so version
|
||||
of stdout is resolved first and writing to stdout is no problem. Unfortunately something happens
|
||||
on Linux which allows the "other" stdout from libstdc++.so to get referenced so that when a call
|
||||
to fprintf(stdout,...) is made the new stdout which has never been initialized get's written
|
||||
to causing a sigsegv. At this point we can not easily remove libstdc++.so from the dependencies
|
||||
because other code which slapd uses happens to be C++ code which causes the reference of
|
||||
libstdc++.so .
|
||||
|
||||
It was determined that the quickest way to resolve the issue for now was to change the fprintf
|
||||
calls to printf thereby fixing the crashes on a temp basis. Using printf seems to work because
|
||||
it references stdout internally which means it will use the one from libc.so .
|
||||
***/
|
||||
printf("%s %s: ", prompt, tokenName);
|
||||
fflush(stdout);
|
||||
|
||||
/* Read input */
|
||||
res = fgets(line, sizeof line, stdin);
|
||||
|
||||
echoOn(fileno(stdin));
|
||||
printf("\n");
|
||||
|
||||
if (!res) return 0;
|
||||
|
||||
/* Find and kill the newline */
|
||||
if ((res = strchr(line, '\n')) != NULL) *res = 0;
|
||||
|
||||
/* Return no-response if user typed an empty line */
|
||||
if (line[0] == 0) return 0;
|
||||
|
||||
return strdup(line);
|
||||
|
||||
#endif /* _WIN32 */
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* VTable
|
||||
*/
|
||||
static const SVRCOREPinMethods vtable =
|
||||
{ 0, 0, destroyObject, getPin };
|
|
@ -1,11 +1,11 @@
|
|||
prefix=%prefix%
|
||||
exec_prefix=%exec_prefix%
|
||||
libdir=%libdir%
|
||||
includedir=%includedir%
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: svrcore-devel
|
||||
Description: Svrcore - development files for secure PIN handling using NSS crypto
|
||||
Version: %SVRCORE_VERSION%
|
||||
Requires: nspr >= %NSPR_VERSION% , nss >= %NSS_VERSION%
|
||||
Name: svrcore
|
||||
Description: Svrcore - Secure PIN handling using NSS crypto
|
||||
Version: @VERSION@
|
||||
Requires: @NSPR_NAME@ >= @NSPR_MIN_VER@ , @NSS_NAME@ >= @NSS_MIN_VER@
|
||||
Libs: -lsvrcore
|
||||
Cflags: -I${includedir}
|
||||
|
|
|
@ -0,0 +1,117 @@
|
|||
%define nspr_version 4.6
|
||||
%define nss_version 3.11
|
||||
|
||||
Summary: Secure PIN handling using NSS crypto
|
||||
Name: svrcore
|
||||
Version: 4.0.3.01
|
||||
Release: 0%{?dist}
|
||||
License: MPL/GPL/LGPL
|
||||
URL: http://www.mozilla.org/projects/security/pki/
|
||||
Group: Development/Libraries
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Requires: nspr >= %{nspr_version}
|
||||
Requires: nss >= %{nss_version}
|
||||
BuildRequires: nspr-devel >= %{nspr_version}
|
||||
BuildRequires: nss-devel >= %{nss_version}
|
||||
BuildRequires: pkgconfig
|
||||
|
||||
Source0: ftp://ftp.mozilla.org/pub/mozilla.org/directory/svrcore/releases/4.0.3/%{name}-%{version}.tar.gz
|
||||
|
||||
%description
|
||||
svrcore provides applications with several ways to handle secure PIN storage
|
||||
e.g. in an application that must be restarted, but needs the PIN to unlock
|
||||
the private key and other crypto material, without user intervention. svrcore
|
||||
uses the facilities provided by NSS.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for secure PIN handling using NSS crypto
|
||||
Group: Development/Libraries
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: nspr-devel >= %{nspr_version}
|
||||
Requires: nss-devel >= %{nss_version}
|
||||
Requires: pkgconfig
|
||||
|
||||
%description devel
|
||||
svrcore provides applications with several ways to handle secure PIN storage
|
||||
e.g. in an application that must be restarted, but needs the PIN to unlock
|
||||
the private key and other crypto material, without user intervention. svrcore
|
||||
uses the facilities provided by NSS.
|
||||
|
||||
This package contains header files and symlinks to develop programs which will
|
||||
use the libsvrcore library. You should install this package if you need to
|
||||
develop programs which will use the svrcore library.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
|
||||
%configure
|
||||
make
|
||||
|
||||
%install
|
||||
%{__rm} -rf $RPM_BUILD_ROOT
|
||||
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/libsvrcore.a
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/libsvrcore.la
|
||||
|
||||
%clean
|
||||
%{__rm} -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE README NEWS
|
||||
%{_libdir}/libsvrcore.so.*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/pkgconfig/%{name}.pc
|
||||
%{_libdir}/libsvrcore.so
|
||||
%{_includedir}/svrcore.h
|
||||
|
||||
%changelog
|
||||
* Wed Dec 13 2006 Rich Megginson <richm@stanfordalumni.org> - 4.0.3.01-0
|
||||
- Fixed support for windows build by moving old makefile to src/Makefile.win
|
||||
- and updating instructions - I could not get configure/libtool to work
|
||||
- with cygwin and the msvc compiler
|
||||
- Added support for --with-nspr and --with-nss and finding nspr/nss
|
||||
- "in-tree" when building with other mozilla components
|
||||
- Use PK11_TokenKeyGenWithFlags instead of PK11_KeyGen
|
||||
|
||||
* Fri Dec 08 2006 Toshio Kuratomi <toshio@tiki-lounge.com> - 4.0.2.02-0
|
||||
- Test build based on an second experimental autotools version of svrcore.
|
||||
|
||||
* Thu Dec 07 2006 Toshio Kuratomi <toshio@tiki-lounge.com> - 4.0.2.01-0
|
||||
- Test build based on an experimental autotools version of svrcore.
|
||||
|
||||
* Thu Jul 13 2006 Rich Megginson <rmeggins@redhat.com> - 4.0.2-3
|
||||
- Bump spec rev to 3
|
||||
- Remove unneeded buildrequires perl, gawk, sed
|
||||
- Remove leading / from path macros
|
||||
- Remove provides for package name - done automatically
|
||||
- Move pkgconfig file stuff under install
|
||||
- Added LICENSE and README under docs
|
||||
|
||||
* Mon Jun 26 2006 Rich Megginson <rmeggins@redhat.com> - 4.0.2-2
|
||||
- Bump spec rev to 2 due to change of spec file name from svrcore
|
||||
- to svrcore-devel to comply with fedora packaging guidelines
|
||||
|
||||
* Thu Jun 22 2006 Rich Megginson <rmeggins@redhat.com> - 4.0.2-1
|
||||
- Bump rev to 4.0.2; now using HEAD of mozilla/security/coreconf
|
||||
- which includes the coreconf-location.patch, so got rid of patch
|
||||
|
||||
* Tue Apr 18 2006 Rich Megginson <rmeggins@redhat.com> - 4.0.1-3
|
||||
- Use pkg-config --variable=includedir to get include dirs
|
||||
|
||||
* Wed Feb 1 2006 Rich <rmeggins@redhat.com> - 4.0.1-2
|
||||
- Requires nss version was wrong
|
||||
|
||||
* Wed Jan 11 2006 Rich Megginson <rmeggins@redhat.com> - 4.01-1
|
||||
- Removed svrcore-config - use pkg-config instead
|
||||
|
||||
* Mon Dec 19 2005 Rich Megginson <rmeggins@redhat.com> - 4.01-1
|
||||
- Initial revision
|
Загрузка…
Ссылка в новой задаче