ed2k_hash-0.3.3/ 0000755 0001750 0001750 00000000000 11257540541 012341 5 ustar tiago tiago ed2k_hash-0.3.3/COPYING 0000644 0001750 0001750 00000043131 07535440713 013402 0 ustar tiago tiago GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
, 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.
ed2k_hash-0.3.3/Makefile.dist 0000644 0001750 0001750 00000000701 07535440712 014744 0 ustar tiago tiago all:
@echo "This Makefile is only for the CVS repository"
@echo "This will be deleted before making the distribution"
@echo ""
@if test ! -d admin; then \
echo "Please recheckout this module!" ;\
echo "for cvs: use checkout once and after that update again" ;\
echo "for cvsup: checkout kde-common from cvsup and" ;\
echo " link kde-common/admin to ./admin" ;\
exit 1 ;\
fi
$(MAKE) -f admin/Makefile.common cvs
.SILENT:
ed2k_hash-0.3.3/configure.files 0000644 0001750 0001750 00000000020 07611257754 015350 0 ustar tiago tiago configure.in.in
ed2k_hash-0.3.3/configure.in 0000644 0001750 0001750 00000006076 07611257754 014675 0 ustar tiago tiago dnl This file is part of the KDE libraries/packages
dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
dnl modified by Walter Tasin (tasin@kdevelop.org)
dnl for c++ console applications
dnl This file is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Library General Public
dnl License as published by the Free Software Foundation; either
dnl version 2 of the License, or (at your option) any later version.
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Library General Public License for more details.
dnl You should have received a copy of the GNU Library General Public License
dnl along with this library; see the file COPYING.LIB. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
# Original Author was Kalle@kde.org
# I lifted it in some mater. (Stephan Kulow)
# I used much code from Janos Farkas
dnl Process this file with autoconf to produce a configure script.
AC_INIT(acinclude.m4) dnl a source file from your sub dir
dnl This is so we can use kde-common
AC_CONFIG_AUX_DIR(admin)
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
unset CDPATH
dnl Checking host/target/build systems, for make, install etc.
AC_CANONICAL_SYSTEM
dnl Perform program name transformation
AC_ARG_PROGRAM
dnl Automake doc recommends to do this only here. (Janos)
AM_INIT_AUTOMAKE(ed2k_hash,0.3.3)
dnl almost the same like KDE_SET_PEFIX but the path is /usr/local
dnl
unset CDPATH
dnl make /usr/local the default for the installation
AC_PREFIX_DEFAULT(/usr/local)
if test "x$prefix" = "xNONE"; then
prefix=$ac_default_prefix
ac_configure_args="$ac_configure_args --prefix $prefix"
fi
KDE_FAST_CONFIGURE
KDE_CONF_FILES
dnl without this order in this file, automake will be confused!
dnl
AM_CONFIG_HEADER(config.h)
dnl checks for programs.
dnl first check for c compiler
AC_CHECK_C_COMPILER
dnl CFLAGS="$NOOPT_CFLAGS" dnl __kdevelop[noopt]__
dnl create only shared libtool-libraries
AC_ENABLE_SHARED(yes)
dnl set the following to yes, if you want to create static
dnl libtool-libraries, too.
AC_ENABLE_STATIC(no)
dnl create a working libtool-script
KDEV_PROG_LIBTOOL
dnl activate the next macro call for DLOPEN tests and setting LIBDL
dnl (n.b. KDE_MISC_TESTS does the same to you, so use either this or the next one)
dnl KDE_CHECK_DLOPEN
dnl activate the next macro call for some additional tests
dnl (compat, crypt, socket, nsl, dlopen, ...)
dnl KDE_MISC_TESTS dnl __kdevelop__
dnl KDE_NEED_FLEX dnl __kdevelop__
dnl AC_PROG_YACC dnl __kdevelop__
KDE_CHECK_EXTRA_LIBS
all_libraries="$all_libraries $USER_LDFLAGS"
all_includes="$all_includes $USER_INCLUDES"
AC_SUBST(all_includes)
AC_SUBST(all_libraries)
AC_SUBST(AUTODIRS)
KDE_CREATE_SUBDIRSLIST
AC_OUTPUT( \
./Makefile \
ed2k_hash/Makefile \
ed2k_hash/docs/Makefile \
ed2k_hash/docs/en/Makefile \
)
ed2k_hash-0.3.3/README 0000644 0001750 0001750 00000000605 07566763710 013237 0 ustar tiago tiago README:
Quick install:
./configure
make
make install (probably you need to be root for that)
if 'make' fails with an error like 'missing separator', do a:
make -f admin/Makefile.common cvs
and do the above again.
Please file bugs and/or comments here:
http://sourceforge.net/projects/ed2k-tools/
You can contact me by e-mail: uberdork at users dot sourceforge dot net
Enjoy!
ed2k_hash-0.3.3/TODO 0000644 0001750 0001750 00000000146 07566763410 013044 0 ustar tiago tiago
Implement for windows:
in main.c : read_directory ()
in main.c : is_directory ()
Implement:
-
ed2k_hash-0.3.3/ed2k_hash.lsm 0000644 0001750 0001750 00000000721 07535440713 014712 0 ustar tiago tiago Begin3
Title: Ed2k_hash
Version: 0.3
Entered-date:
Description:
Keywords:
Author: Tim-Philipp Müller
Maintained-by: Tim-Philipp Müller
Primary-site: http://ed2k-tools.sourceforge.net/
Home-page: http://ed2k-tools.sourceforge.net/
Original-site: http://ed2k-tools.sourceforge.net/
Platforms: Linux and other Unices, Windows
Copying-policy: GNU Public License
End
ed2k_hash-0.3.3/stamp-h.in 0000644 0001750 0001750 00000000012 11257524701 014233 0 ustar tiago tiago timestamp
ed2k_hash-0.3.3/configure 0000755 0001750 0001750 00000336313 11257516374 014270 0 ustar tiago tiago #! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
--disable-dependency-tracking Speeds up one-time builds
--enable-dependency-tracking Do not reject slow dependency extractors"
ac_default_prefix=/usr/local
ac_help="$ac_help
--disable-fast-perl disable fast Makefile generation (needs perl)"
ac_help="$ac_help
--enable-debug enables debug symbols [default=no]"
ac_help="$ac_help
--disable-debug disables debug output and debug symbols [default=no]"
ac_help="$ac_help
--enable-strict compiles with strict compiler options (may not work!)"
ac_help="$ac_help
--enable-profile creates profiling infos [default=no]"
ac_help="$ac_help
--enable-final build size optimized apps (experimental - needs lots of memory)"
ac_help="$ac_help
--disable-closure don't delay template instantiation"
ac_help="$ac_help
--enable-shared[=PKGS] build shared libraries [default=yes]"
ac_help="$ac_help
--enable-static[=PKGS] build static libraries [default=no]"
ac_help="$ac_help
--enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
ac_help="$ac_help
--with-gnu-ld assume the C compiler uses GNU ld [default=no]"
ac_help="$ac_help
--disable-libtool-lock avoid locking (might break parallel builds)"
ac_help="$ac_help
--with-pic try to use only PIC/non-PIC objects [default=use both]"
ac_help="$ac_help
--disable-libtool-lock avoid locking (might break parallel builds)"
ac_help="$ac_help
--with-pic try to use only PIC/non-PIC objects [default=use both]"
ac_help="$ac_help
--with-extra-includes=DIR
adds non standard include paths"
ac_help="$ac_help
--with-extra-libs=DIR adds non standard library paths"
# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
host=NONE
no_create=
nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
ac_prev=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
ac_prev=
continue
fi
case "$ac_option" in
-*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) ac_optarg= ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
case "$ac_option" in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bindir="$ac_optarg" ;;
-build | --build | --buil | --bui | --bu)
ac_prev=build ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
build="$ac_optarg" ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
cache_file="$ac_optarg" ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
datadir="$ac_optarg" ;;
-disable-* | --disable-*)
ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
{ echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
fi
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
eval "enable_${ac_feature}=no" ;;
-enable-* | --enable-*)
ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
{ echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
fi
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
case "$ac_option" in
*=*) ;;
*) ac_optarg=yes ;;
esac
eval "enable_${ac_feature}='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
| --exec | --exe | --ex)
ac_prev=exec_prefix ;;
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
exec_prefix="$ac_optarg" ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
-help | --help | --hel | --he)
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat << EOF
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
--cache-file=FILE cache test results in FILE
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
[$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[same as prefix]
--bindir=DIR user executables in DIR [EPREFIX/bin]
--sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
--libexecdir=DIR program executables in DIR [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data in DIR
[PREFIX/share]
--sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data in DIR
[PREFIX/com]
--localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
--includedir=DIR C header files in DIR [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
--infodir=DIR info documentation in DIR [PREFIX/info]
--mandir=DIR man documentation in DIR [PREFIX/man]
--srcdir=DIR find the sources in DIR [configure dir or ..]
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM
run sed PROGRAM on installed program names
EOF
cat << EOF
Host type:
--build=BUILD configure for building on BUILD [BUILD=HOST]
--host=HOST configure for HOST [guessed]
--target=TARGET configure for TARGET [TARGET=HOST]
Features and packages:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR
EOF
if test -n "$ac_help"; then
echo "--enable and --with options recognized:$ac_help"
fi
exit 0 ;;
-host | --host | --hos | --ho)
ac_prev=host ;;
-host=* | --host=* | --hos=* | --ho=*)
host="$ac_optarg" ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
includedir="$ac_optarg" ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
infodir="$ac_optarg" ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
libdir="$ac_optarg" ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
libexecdir="$ac_optarg" ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
| --locals | --local | --loca | --loc | --lo)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
localstatedir="$ac_optarg" ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
mandir="$ac_optarg" ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
no_recursion=yes ;;
-oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
| --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
| --oldin | --oldi | --old | --ol | --o)
ac_prev=oldincludedir ;;
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
oldincludedir="$ac_optarg" ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
prefix="$ac_optarg" ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
program_prefix="$ac_optarg" ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
program_suffix="$ac_optarg" ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
| --program-transform-n | --program-transform- \
| --program-transform | --program-transfor \
| --program-transfo | --program-transf \
| --program-trans | --program-tran \
| --progr-tra | --program-tr | --program-t)
ac_prev=program_transform_name ;;
-program-transform-name=* | --program-transform-name=* \
| --program-transform-nam=* | --program-transform-na=* \
| --program-transform-n=* | --program-transform-=* \
| --program-transform=* | --program-transfor=* \
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name="$ac_optarg" ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
sbindir="$ac_optarg" ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
| --sharedst | --shareds | --shared | --share | --shar \
| --sha | --sh)
ac_prev=sharedstatedir ;;
-sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
sharedstatedir="$ac_optarg" ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
srcdir="$ac_optarg" ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
sysconfdir="$ac_optarg" ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
ac_prev=target ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
target="$ac_optarg" ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 2.13"
exit 0 ;;
-with-* | --with-*)
ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
{ echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
fi
ac_package=`echo $ac_package| sed 's/-/_/g'`
case "$ac_option" in
*=*) ;;
*) ac_optarg=yes ;;
esac
eval "with_${ac_package}='$ac_optarg'" ;;
-without-* | --without-*)
ac_package=`echo $ac_option|sed -e 's/-*without-//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
{ echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
fi
ac_package=`echo $ac_package| sed 's/-/_/g'`
eval "with_${ac_package}=no" ;;
--x)
# Obsolete; use --with-x.
with_x=yes ;;
-x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
| --x-incl | --x-inc | --x-in | --x-i)
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
x_includes="$ac_optarg" ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries="$ac_optarg" ;;
-*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
;;
*)
if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
echo "configure: warning: $ac_option: invalid host type" 1>&2
fi
if test "x$nonopt" != xNONE; then
{ echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
fi
nonopt="$ac_option"
;;
esac
done
if test -n "$ac_prev"; then
{ echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fi
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
# File descriptor usage:
# 0 standard input
# 1 file creation
# 2 errors and warnings
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
exec 6>/dev/null
else
exec 6>&1
fi
exec 5>./config.log
echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&5
# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell metacharacters.
ac_configure_args=
for ac_arg
do
case "$ac_arg" in
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c) ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
ac_configure_args="$ac_configure_args '$ac_arg'" ;;
*) ac_configure_args="$ac_configure_args $ac_arg" ;;
esac
done
# NLS nuisances.
# Only set these to C if already set. These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h
# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
ac_unique_file=acinclude.m4
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
ac_prog=$0
ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
{ echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
else
{ echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
echo "loading site script $ac_site_file"
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
echo "loading cache $cache_file"
. $cache_file
else
echo "creating cache $cache_file"
> $cache_file
fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
ac_exeext=
ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
ac_n= ac_c='
' ac_t=' '
else
ac_n=-n ac_c= ac_t=
fi
else
ac_n= ac_c='\c' ac_t=
fi
ac_aux_dir=
for ac_dir in admin $srcdir/admin; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break
elif test -f $ac_dir/install.sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
fi
done
if test -z "$ac_aux_dir"; then
{ echo "configure: error: can not find install-sh or install.sh in admin $srcdir/admin" 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
unset CDPATH
# Do some error checking and defaulting for the host and target type.
# The inputs are:
# configure --host=HOST --target=TARGET --build=BUILD NONOPT
#
# The rules are:
# 1. You are not allowed to specify --host, --target, and nonopt at the
# same time.
# 2. Host defaults to nonopt.
# 3. If nonopt is not specified, then host defaults to the current host,
# as determined by config.guess.
# 4. Target and build default to nonopt.
# 5. If nonopt is not specified, then target and build default to host.
# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
case $host---$target---$nonopt in
NONE---*---* | *---NONE---* | *---*---NONE) ;;
*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
esac
# Make sure we can run config.sub.
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:614: checking host system type" >&5
host_alias=$host
case "$host_alias" in
NONE)
case $nonopt in
NONE)
if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
fi ;;
*) host_alias=$nonopt ;;
esac ;;
esac
host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:635: checking target system type" >&5
target_alias=$target
case "$target_alias" in
NONE)
case $nonopt in
NONE) target_alias=$host_alias ;;
*) target_alias=$nonopt ;;
esac ;;
esac
target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:653: checking build system type" >&5
build_alias=$build
case "$build_alias" in
NONE)
case $nonopt in
NONE) build_alias=$host_alias ;;
*) build_alias=$nonopt ;;
esac ;;
esac
build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$build" 1>&6
test "$host_alias" != "$target_alias" &&
test "$program_prefix$program_suffix$program_transform_name" = \
NONENONEs,x,x, &&
program_prefix=${target_alias}-
if test "$program_transform_name" = s,x,x,; then
program_transform_name=
else
# Double any \ or $. echo might interpret backslashes.
cat <<\EOF_SED > conftestsed
s,\\,\\\\,g; s,\$,$$,g
EOF_SED
program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
rm -f conftestsed
fi
test "$program_prefix" != NONE &&
program_transform_name="s,^,${program_prefix},; $program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
# sed with no file args requires a program.
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
# expand $ac_aux_dir to an absolute path
am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:716: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
for ac_dir in $PATH; do
# Account for people who put trailing slashes in PATH elements.
case "$ac_dir/" in
/|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
# Don't use installbsd from OSF since it installs stuff as root
# by default.
for ac_prog in ginstall scoinst install; do
if test -f $ac_dir/$ac_prog; then
if test $ac_prog = install &&
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
else
ac_cv_path_install="$ac_dir/$ac_prog -c"
break 2
fi
fi
done
;;
esac
done
IFS="$ac_save_IFS"
fi
if test "${ac_cv_path_install+set}" = set; then
INSTALL="$ac_cv_path_install"
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
INSTALL="$ac_install_sh"
fi
fi
echo "$ac_t""$INSTALL" 1>&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
if test -z "$kde_save_INSTALL_given" ; then
# OK, user hasn't given any INSTALL, autoconf found one for us
# now we test, if it supports the -p flag
echo $ac_n "checking for -p flag to install""... $ac_c" 1>&6
echo "configure:773: checking for -p flag to install" >&5
rm -f confinst.$$.* > /dev/null 2>&1
echo "Testtest" > confinst.$$.orig
ac_res=no
if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
if test -f confinst.$$.new ; then
# OK, -p seems to do no harm to install
INSTALL="${INSTALL} -p"
ac_res=yes
fi
fi
rm -f confinst.$$.*
echo "$ac_t""$ac_res" 1>&6
fi
if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
fi
if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
INSTALL_SCRIPT='${INSTALL}'
fi
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
echo "configure:796: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
if test "$*" = "X"; then
# -L didn't work.
set X `ls -t $srcdir/configure conftest.file`
fi
rm -f conftest.file
if test "$*" != "X $srcdir/configure conftest.file" \
&& test "$*" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
{ echo "configure: error: ls -t appears to fail. Make sure there is not a broken
alias in your environment" 1>&2; exit 1; }
fi
test "$2" = conftest.file
)
then
# Ok.
:
else
{ echo "configure: error: newly created file is older than distributed files!
Check your system clock" 1>&2; exit 1; }
fi
echo "$ac_t""yes" 1>&6
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
am_backtick='`'
echo "configure: warning: ${am_backtick}missing' script is too old or missing" 1>&2
fi
for ac_prog in mawk gawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:848: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_AWK="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
AWK="$ac_cv_prog_AWK"
if test -n "$AWK"; then
echo "$ac_t""$AWK" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$AWK" && break
done
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:878: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftestmake <<\EOF
all:
@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
eval ac_cv_prog_make_${ac_make}_set=yes
else
eval ac_cv_prog_make_${ac_make}_set=no
fi
rm -f conftestmake
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
echo "$ac_t""yes" 1>&6
SET_MAKE=
else
echo "$ac_t""no" 1>&6
SET_MAKE="MAKE=${MAKE-make}"
fi
# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
if test "${enable_dependency_tracking+set}" = set; then
enableval="$enable_dependency_tracking"
:
fi
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
fi
if test "x$enable_dependency_tracking" != xno; then
AMDEP_TRUE=
AMDEP_FALSE='#'
else
AMDEP_TRUE='#'
AMDEP_FALSE=
fi
rm -f .deps 2>/dev/null
mkdir .deps 2>/dev/null
if test -d .deps; then
DEPDIR=.deps
else
# MS-DOS does not allow filenames that begin with a dot.
DEPDIR=_deps
fi
rmdir .deps 2>/dev/null
# test to see if srcdir already configured
if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
{ echo "configure: error: source directory already configured; run \"make distclean\" there first" 1>&2; exit 1; }
fi
# Define the identity of the package.
PACKAGE=ed2k_hash
VERSION=0.3.3
cat >> confdefs.h <> confdefs.h < confinc << 'END'
doit:
@echo done
END
# If we don't find an include directive, just comment out the code.
echo $ac_n "checking for style of include used by $am_make""... $ac_c" 1>&6
echo "configure:1039: checking for style of include used by $am_make" >&5
am__include='#'
am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# We grep out `Entering directory' and `Leaving directory'
# messages which can occur if `w' ends up in MAKEFLAGS.
# In particular we don't look at `^make:' because GNU make might
# be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'.
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
am__include=include
am__quote=
_am_result=GNU
fi
# Now try BSD make style include.
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
am__include=.include
am__quote='"'
_am_result=BSD
fi
fi
echo "$ac_t""$_am_result" 1>&6
rm -f confinc confmf
# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
enableval="$enable_debug"
if test $enableval = "no"; then
kde_use_debug_code="no"
kde_use_debug_define=yes
else
kde_use_debug_code="yes"
kde_use_debug_define=no
fi
else
kde_use_debug_code="no"
kde_use_debug_define=no
fi
# Check whether --enable-dummyoption or --disable-dummyoption was given.
if test "${enable_dummyoption+set}" = set; then
enableval="$enable_dummyoption"
:
fi
# Check whether --enable-strict or --disable-strict was given.
if test "${enable_strict+set}" = set; then
enableval="$enable_strict"
if test $enableval = "no"; then
kde_use_strict_options="no"
else
kde_use_strict_options="yes"
fi
else
kde_use_strict_options="no"
fi
# Check whether --enable-profile or --disable-profile was given.
if test "${enable_profile+set}" = set; then
enableval="$enable_profile"
kde_use_profiling=$enableval
else
kde_use_profiling="no"
fi
CFLAGS=" $CFLAGS"
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1126: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="gcc"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1156: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
break
fi
done
IFS="$ac_save_ifs"
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_CC
shift
if test $# -gt 0; then
# We chose a different compiler from the bogus one.
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
set dummy "$ac_dir/$ac_word" "$@"
shift
ac_cv_prog_CC="$@"
fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test -z "$CC"; then
case "`uname -s`" in
*win32* | *WIN32*)
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1207: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="cl"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
;;
esac
fi
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1239: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
#line 1250 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:1255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
ac_cv_prog_cc_cross=no
else
ac_cv_prog_cc_cross=yes
fi
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_prog_cc_works=no
fi
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1281: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1286: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
fi
fi
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
if test $ac_cv_prog_gcc = yes; then
GCC=yes
else
GCC=
fi
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:1314: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
ac_cv_prog_cc_g=yes
else
ac_cv_prog_cc_g=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
if test "$ac_test_CFLAGS" = set; then
CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2"
else
CFLAGS="-g"
fi
else
if test "$GCC" = yes; then
CFLAGS="-O2"
else
CFLAGS=
fi
fi
depcc="$CC" am_compiler_list=
echo $ac_n "checking dependency style of $depcc""... $ac_c" 1>&6
echo "configure:1348: checking dependency style of $depcc" >&5
if eval "test \"`echo '$''{'am_cv_CC_dependencies_compiler_type'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
am_cv_CC_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
fi
for depmode in $am_compiler_list; do
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
echo '#include "conftest.h"' > conftest.c
echo 'int i;' > conftest.h
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
none) break ;;
esac
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=conftest.c object=conftest.o \
depfile=conftest.Po tmpdepfile=conftest.TPo \
$SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
grep conftest.h conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
am_cv_CC_dependencies_compiler_type=$depmode
break
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_CC_dependencies_compiler_type=none
fi
fi
echo "$ac_t""$am_cv_CC_dependencies_compiler_type" 1>&6
CCDEPMODE="depmode=$am_cv_CC_dependencies_compiler_type"
if test "$GCC" = "yes"; then
if test "$kde_use_debug_code" = "yes"; then
CFLAGS="-g -O2 $CFLAGS"
case $host in
*-*-linux-gnu)
CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
;;
esac
else
CFLAGS="-O2 $CFLAGS"
fi
fi
if test "$kde_use_debug_define" = "yes"; then
CFLAGS="-DNDEBUG $CFLAGS"
fi
case "$host" in
*-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
*-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
esac
if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
LDFLAGS=""
fi
if test "$kde_use_profiling" = "yes"; then
echo $ac_n "checking whether $CXX supports -pg""... $ac_c" 1>&6
echo "configure:1444: checking whether $CXX supports -pg" >&5
kde_cache=`echo pg | sed 'y% .=/+-%____p_%'`
if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -pg"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "kde_cv_prog_cxx_$kde_cache=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
CXXFLAGS="$save_CXXFLAGS"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
echo "$ac_t""yes" 1>&6
:
CFLAGS="-pg $CFLAGS"
else
echo "$ac_t""no" 1>&6
:
fi
fi
USE_EXCEPTIONS=
USE_RTTI=
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1512: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# This must be in double quotes, not single quotes, because CPP may get
# substituted into the Makefile and "${CC-cc}" will confuse make.
CPP="${CC-cc} -E"
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
ac_cv_prog_CPP="$CPP"
fi
CPP="$ac_cv_prog_CPP"
else
ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6
# the following is to allow programs, that are known to
# have problems when compiled with -O2
if test -n "$CFLAGS"; then
kde_safe_IFS=$IFS
IFS=" "
NOOPT_CFLAGS=""
for i in $CFLAGS; do
case $i in
-O*)
;;
*)
NOOPT_CFLAGS="$NOOPT_CFLAGS $i"
;;
esac
done
IFS=$kde_safe_IFS
fi
# Check whether --enable-final or --disable-final was given.
if test "${enable_final+set}" = set; then
enableval="$enable_final"
kde_use_final=$enableval
else
kde_use_final=no
fi
REPO=""
NOREPO=""
echo $ac_n "checking whether $CXX supports -frepo""... $ac_c" 1>&6
echo "configure:1628: checking whether $CXX supports -frepo" >&5
kde_cache=`echo frepo | sed 'y% .=/+-%____p_%'`
if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -frepo"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "kde_cv_prog_cxx_$kde_cache=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
CXXFLAGS="$save_CXXFLAGS"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
echo "$ac_t""yes" 1>&6
:
REPO="-frepo"
NOREPO="-fno-repo"
else
echo "$ac_t""no" 1>&6
:
fi
if test -z "$REPO"; then
echo $ac_n "checking whether $CXX supports -instances=explicit""... $ac_c" 1>&6
echo "configure:1691: checking whether $CXX supports -instances=explicit" >&5
kde_cache=`echo instances=explicit | sed 'y% .=/+-%____p_%'`
if eval "test \"`echo '$''{'kde_cv_prog_cxx_$kde_cache'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -instances=explicit"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "kde_cv_prog_cxx_$kde_cache=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
CXXFLAGS="$save_CXXFLAGS"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
echo "$ac_t""yes" 1>&6
:
REPO="-instances=explicit"
NOREPO="-instances=extern"
else
echo "$ac_t""no" 1>&6
:
fi
fi
if test -n "$REPO"; then
cat >> confdefs.h <&6
echo "configure:1884: checking for ld used by GCC" >&5
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
esac
case $ac_prog in
# Accept absolute paths.
[\\/]* | [A-Za-z]:[\\/]*)
re_direlt='/[^/][^/]*/\.\./'
# Canonicalize the path of ld
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
done
test -z "$LD" && LD="$ac_prog"
;;
"")
# If it fails, then pretend we aren't using GCC.
ac_prog=ld
;;
*)
# If it is relative, then search for the first ld in PATH.
with_gnu_ld=unknown
;;
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
echo "configure:1914: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
echo "configure:1917: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -z "$LD"; then
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
lt_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
test "$with_gnu_ld" != no && break
else
test "$with_gnu_ld" != yes && break
fi
fi
done
IFS="$ac_save_ifs"
else
lt_cv_path_LD="$LD" # Let the user override the test with a path.
fi
fi
LD="$lt_cv_path_LD"
if test -n "$LD"; then
echo "$ac_t""$LD" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
echo "configure:1952: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 &5; then
lt_cv_prog_gnu_ld=yes
else
lt_cv_prog_gnu_ld=no
fi
fi
echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
with_gnu_ld=$lt_cv_prog_gnu_ld
echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
echo "configure:1969: checking for $LD option to reload object files" >&5
if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
lt_cv_ld_reload_flag='-r'
fi
echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
reload_flag=$lt_cv_ld_reload_flag
test -n "$reload_flag" && reload_flag=" $reload_flag"
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
echo "configure:1981: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$NM"; then
# Let the user override the test.
lt_cv_path_NM="$NM"
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
test -z "$ac_dir" && ac_dir=.
tmp_nm=$ac_dir/${ac_tool_prefix}nm
if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
# Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
# Tru64's nm complains that /dev/null is an invalid object file
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
lt_cv_path_NM="$tmp_nm -B"
break
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
lt_cv_path_NM="$tmp_nm -p"
break
else
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
continue # so that we can try to find one that supports BSD flags
fi
fi
done
IFS="$ac_save_ifs"
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
fi
fi
NM="$lt_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:2019: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftestdata
if ln -s X conftestdata 2>/dev/null
then
rm -f conftestdata
ac_cv_prog_LN_S="ln -s"
else
ac_cv_prog_LN_S=ln
fi
fi
LN_S="$ac_cv_prog_LN_S"
if test "$ac_cv_prog_LN_S" = "ln -s"; then
echo "$ac_t""yes" 1>&6
else
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
echo "configure:2040: checking how to recognise dependant libraries" >&5
if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
lt_cv_deplibs_check_method='unknown'
# Need to set the preceding variable on all platforms that support
# interlibrary dependencies.
# 'none' -- dependencies not supported.
# `unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
# 'test_compile' -- check by making test program.
# 'file_magic [regex]' -- check by looking for files in library path
# which responds to the $file_magic_cmd with a given egrep regex.
# If you have `file' or equivalent on your system and you're not sure
# whether `pass_all' will *always* work, you probably want this one.
case $host_os in
aix*)
lt_cv_deplibs_check_method=pass_all
;;
beos*)
lt_cv_deplibs_check_method=pass_all
;;
bsdi4*)
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
lt_cv_file_magic_cmd='/usr/bin/file -L'
lt_cv_file_magic_test_file=/shlib/libc.so
;;
cygwin* | mingw* |pw32*)
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
lt_cv_file_magic_cmd='$OBJDUMP -f'
;;
darwin* | rhapsody*)
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
lt_cv_file_magic_cmd='/usr/bin/file -L'
case "$host_os" in
rhapsody* | darwin1.012)
lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
;;
*) # Darwin 1.3 on
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
;;
esac
;;
freebsd* )
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up.
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;;
esac
else
lt_cv_deplibs_check_method=pass_all
fi
;;
gnu*)
lt_cv_deplibs_check_method=pass_all
;;
hpux10.20*|hpux11*)
lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/libc.sl
;;
irix5* | irix6*)
case $host_os in
irix5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
;;
*)
case $LD in
*-32|*"-32 ") libmagic=32-bit;;
*-n32|*"-n32 ") libmagic=N32;;
*-64|*"-64 ") libmagic=64-bit;;
*) libmagic=never-match;;
esac
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
;;
esac
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
lt_cv_deplibs_check_method=pass_all
;;
# This must be Linux ELF.
linux-gnu*)
case $host_cpu in
alpha* | i*86 | powerpc* | sparc* | ia64* | s390* | m68k* | arm* | mips* | hppa* | sh* )
lt_cv_deplibs_check_method=pass_all ;;
*)
# glibc up to 2.1.1 does not perform some relocations on ARM
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
esac
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='file_magic NetBSD/[a-z0-9]* demand paged shared library'
else
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
fi
lt_cv_file_magic_cmd='/usr/bin/file -L'
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
;;
openbsd* )
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case "$host_cpu" in
i*86 )
lt_cv_deplibs_check_method='file_magic OpenBSD/i[3-9]86 demand paged shared library'
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;;
esac
else
lt_cv_deplibs_check_method=pass_all
fi
;;
newsos6)
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/libnls.so
;;
osf3* | osf4* | osf5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
lt_cv_file_magic_test_file=/shlib/libc.so
lt_cv_deplibs_check_method=pass_all
;;
sco3.2v5*)
lt_cv_deplibs_check_method=pass_all
;;
solaris*)
lt_cv_deplibs_check_method=pass_all
lt_cv_file_magic_test_file=/lib/libc.so
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
case $host_vendor in
ncr)
lt_cv_deplibs_check_method=pass_all
;;
motorola)
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
;;
esac
;;
esac
fi
echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
if test $host != $build; then
ac_tool_prefix=${host_alias}-
else
ac_tool_prefix=
fi
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
# Only perform the check for file, if the check method requires it
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
echo "configure:2228: checking for ${ac_tool_prefix}file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case $MAGIC_CMD in
/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
?:/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
;;
*)
ac_save_MAGIC_CMD="$MAGIC_CMD"
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="/usr/bin:$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/${ac_tool_prefix}file; then
lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
egrep "$file_magic_regex" > /dev/null; then
:
else
cat <&2
*** Warning: the command libtool uses to detect shared libraries,
*** $file_magic_cmd, produces output that libtool cannot recognize.
*** The result is that libtool may fail to recognize shared libraries
*** as such. This will affect the creation of libtool libraries that
*** depend on shared libraries, but programs linked with such libtool
*** libraries will work regardless of this problem. Nevertheless, you
*** may want to report the problem to your system manager and/or to
*** bug-libtool@gnu.org
EOF
fi ;;
esac
fi
break
fi
done
IFS="$ac_save_ifs"
MAGIC_CMD="$ac_save_MAGIC_CMD"
;;
esac
fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
echo "$ac_t""$MAGIC_CMD" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
echo $ac_n "checking for file""... $ac_c" 1>&6
echo "configure:2290: checking for file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case $MAGIC_CMD in
/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
?:/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
;;
*)
ac_save_MAGIC_CMD="$MAGIC_CMD"
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="/usr/bin:$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/file; then
lt_cv_path_MAGIC_CMD="$ac_dir/file"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
egrep "$file_magic_regex" > /dev/null; then
:
else
cat <&2
*** Warning: the command libtool uses to detect shared libraries,
*** $file_magic_cmd, produces output that libtool cannot recognize.
*** The result is that libtool may fail to recognize shared libraries
*** as such. This will affect the creation of libtool libraries that
*** depend on shared libraries, but programs linked with such libtool
*** libraries will work regardless of this problem. Nevertheless, you
*** may want to report the problem to your system manager and/or to
*** bug-libtool@gnu.org
EOF
fi ;;
esac
fi
break
fi
done
IFS="$ac_save_ifs"
MAGIC_CMD="$ac_save_MAGIC_CMD"
;;
esac
fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
echo "$ac_t""$MAGIC_CMD" 1>&6
else
echo "$ac_t""no" 1>&6
fi
else
MAGIC_CMD=:
fi
fi
fi
;;
esac
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2361: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
echo "$ac_t""$RANLIB" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test -z "$ac_cv_prog_RANLIB"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2393: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_RANLIB="ranlib"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
echo "$ac_t""$RANLIB" 1>&6
else
echo "$ac_t""no" 1>&6
fi
else
RANLIB=":"
fi
fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2428: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
STRIP="$ac_cv_prog_STRIP"
if test -n "$STRIP"; then
echo "$ac_t""$STRIP" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test -z "$ac_cv_prog_STRIP"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2460: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_STRIP="strip"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
fi
fi
STRIP="$ac_cv_prog_STRIP"
if test -n "$STRIP"; then
echo "$ac_t""$STRIP" 1>&6
else
echo "$ac_t""no" 1>&6
fi
else
STRIP=":"
fi
fi
# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
libtool_flags="$libtool_flags --enable-dlopen"
# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then
enableval="$enable_libtool_lock"
:
fi
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
# Check whether --with-pic or --without-pic was given.
if test "${with_pic+set}" = set; then
withval="$with_pic"
pic_mode="$withval"
else
pic_mode=default
fi
test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case $host in
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 2527 "configure"' > conftest.$ac_ext
if { (eval echo configure:2528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
;;
*N32*)
LD="${LD-ld} -n32"
;;
*64-bit*)
LD="${LD-ld} -64"
;;
esac
fi
rm -rf conftest*
;;
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
echo "configure:2549: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
lt_cv_cc_needs_belf=no
fi
rm -f conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
CFLAGS="$SAVE_CFLAGS"
fi
;;
esac
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
echo "configure:2600: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_cygwin=no
fi
rm -f conftest*
rm -f conftest*
fi
echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
echo "configure:2633: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_mingw32=no
fi
rm -f conftest*
rm -f conftest*
fi
echo "$ac_t""$ac_cv_mingw32" 1>&6
MINGW32=
test "$ac_cv_mingw32" = yes && MINGW32=yes
# Save cache, so that ltconfig can load it
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs. It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already. You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
sed -n \
-e "s/'/'\\\\''/g" \
-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
;;
esac >> confcache
if cmp -s $cache_file confcache; then
:
else
if test -w $cache_file; then
echo "updating cache $cache_file"
cat confcache > $cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
# Actually configure libtool. ac_aux_dir is where install-sh is found.
AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
# Reload cache, that may have been modified by ltconfig
if test -r "$cache_file"; then
echo "loading cache $cache_file"
. $cache_file
else
echo "creating cache $cache_file"
> $cache_file
fi
# This can be used to rebuild libtool when needed
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking for object suffix""... $ac_c" 1>&6
echo "configure:2758: checking for object suffix" >&5
if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext
if { (eval echo configure:2764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
for ac_file in conftest.*; do
case $ac_file in
*.c) ;;
*) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
esac
done
else
{ echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_objext" 1>&6
OBJEXT=$ac_cv_objext
ac_objext=$ac_cv_objext
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
echo "configure:2784: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
ac_cv_exeext=.exe
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
if { (eval echo configure:2794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.$ac_ext | *.c | *.o | *.obj) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
else
{ echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
fi
rm -f conftest*
test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
fi
fi
EXEEXT=""
test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
echo "$ac_t""${ac_cv_exeext}" 1>&6
ac_exeext=$EXEEXT
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
# Only perform the check for file, if the check method requires it
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
echo "configure:2834: checking for ${ac_tool_prefix}file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case $MAGIC_CMD in
/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
?:/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
;;
*)
ac_save_MAGIC_CMD="$MAGIC_CMD"
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="/usr/bin:$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/${ac_tool_prefix}file; then
lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
egrep "$file_magic_regex" > /dev/null; then
:
else
cat <&2
*** Warning: the command libtool uses to detect shared libraries,
*** $file_magic_cmd, produces output that libtool cannot recognize.
*** The result is that libtool may fail to recognize shared libraries
*** as such. This will affect the creation of libtool libraries that
*** depend on shared libraries, but programs linked with such libtool
*** libraries will work regardless of this problem. Nevertheless, you
*** may want to report the problem to your system manager and/or to
*** bug-libtool@gnu.org
EOF
fi ;;
esac
fi
break
fi
done
IFS="$ac_save_ifs"
MAGIC_CMD="$ac_save_MAGIC_CMD"
;;
esac
fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
echo "$ac_t""$MAGIC_CMD" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
echo $ac_n "checking for file""... $ac_c" 1>&6
echo "configure:2896: checking for file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case $MAGIC_CMD in
/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
?:/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
;;
*)
ac_save_MAGIC_CMD="$MAGIC_CMD"
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="/usr/bin:$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/file; then
lt_cv_path_MAGIC_CMD="$ac_dir/file"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
egrep "$file_magic_regex" > /dev/null; then
:
else
cat <&2
*** Warning: the command libtool uses to detect shared libraries,
*** $file_magic_cmd, produces output that libtool cannot recognize.
*** The result is that libtool may fail to recognize shared libraries
*** as such. This will affect the creation of libtool libraries that
*** depend on shared libraries, but programs linked with such libtool
*** libraries will work regardless of this problem. Nevertheless, you
*** may want to report the problem to your system manager and/or to
*** bug-libtool@gnu.org
EOF
fi ;;
esac
fi
break
fi
done
IFS="$ac_save_ifs"
MAGIC_CMD="$ac_save_MAGIC_CMD"
;;
esac
fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
echo "$ac_t""$MAGIC_CMD" 1>&6
else
echo "$ac_t""no" 1>&6
fi
else
MAGIC_CMD=:
fi
fi
fi
;;
esac
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2967: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
echo "$ac_t""$RANLIB" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test -z "$ac_cv_prog_RANLIB"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2999: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_RANLIB="ranlib"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
echo "$ac_t""$RANLIB" 1>&6
else
echo "$ac_t""no" 1>&6
fi
else
RANLIB=":"
fi
fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3034: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
STRIP="$ac_cv_prog_STRIP"
if test -n "$STRIP"; then
echo "$ac_t""$STRIP" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test -z "$ac_cv_prog_STRIP"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3066: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_STRIP="strip"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
fi
fi
STRIP="$ac_cv_prog_STRIP"
if test -n "$STRIP"; then
echo "$ac_t""$STRIP" 1>&6
else
echo "$ac_t""no" 1>&6
fi
else
STRIP=":"
fi
fi
# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
libtool_flags="$libtool_flags --enable-dlopen"
# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then
enableval="$enable_libtool_lock"
:
fi
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
# Check whether --with-pic or --without-pic was given.
if test "${with_pic+set}" = set; then
withval="$with_pic"
pic_mode="$withval"
else
pic_mode=default
fi
test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case $host in
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 3133 "configure"' > conftest.$ac_ext
if { (eval echo configure:3134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
;;
*N32*)
LD="${LD-ld} -n32"
;;
*64-bit*)
LD="${LD-ld} -64"
;;
esac
fi
rm -rf conftest*
;;
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
echo "configure:3155: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
lt_cv_cc_needs_belf=no
fi
rm -f conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
CFLAGS="$SAVE_CFLAGS"
fi
;;
esac
LIBTOOL_SHELL="/bin/sh ./libtool"
# LIBTOOL="$LIBTOOL --silent"
echo $ac_n "checking for extra includes""... $ac_c" 1>&6
echo "configure:3214: checking for extra includes" >&5
# Check whether --with-extra-includes or --without-extra-includes was given.
if test "${with_extra_includes+set}" = set; then
withval="$with_extra_includes"
kde_use_extra_includes="$withval"
else
kde_use_extra_includes=NONE
fi
kde_extra_includes=
if test -n "$kde_use_extra_includes" && \
test "$kde_use_extra_includes" != "NONE"; then
ac_save_ifs=$IFS
IFS=':'
for dir in $kde_use_extra_includes; do
kde_extra_includes="$kde_extra_includes $dir"
USER_INCLUDES="$USER_INCLUDES -I$dir"
done
IFS=$ac_save_ifs
kde_use_extra_includes="added"
else
kde_use_extra_includes="no"
fi
echo "$ac_t""$kde_use_extra_includes" 1>&6
kde_extra_libs=
echo $ac_n "checking for extra libs""... $ac_c" 1>&6
echo "configure:3245: checking for extra libs" >&5
# Check whether --with-extra-libs or --without-extra-libs was given.
if test "${with_extra_libs+set}" = set; then
withval="$with_extra_libs"
kde_use_extra_libs=$withval
else
kde_use_extra_libs=NONE
fi
if test -n "$kde_use_extra_libs" && \
test "$kde_use_extra_libs" != "NONE"; then
ac_save_ifs=$IFS
IFS=':'
for dir in $kde_use_extra_libs; do
kde_extra_libs="$kde_extra_libs $dir"
KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
USER_LDFLAGS="$USER_LDFLAGS -L$dir"
done
IFS=$ac_save_ifs
kde_use_extra_libs="added"
else
kde_use_extra_libs="no"
fi
echo "$ac_t""$kde_use_extra_libs" 1>&6
all_libraries="$all_libraries $USER_LDFLAGS"
all_includes="$all_includes $USER_INCLUDES"
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
if test ! -s $srcdir/subdirs; then
TOPSUBDIRS=""
files=`cd $srcdir && ls -1`
dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
for i in $dirs; do
echo $i >> $srcdir/subdirs
done
fi
if test -s $srcdir/inst-apps; then
ac_topsubdirs="`cat $srcdir/inst-apps`"
else
ac_topsubdirs="`cat $srcdir/subdirs`"
fi
for i in $ac_topsubdirs; do
echo $ac_n "checking if $i should be compiled""... $ac_c" 1>&6
echo "configure:3304: checking if $i should be compiled" >&5
if test -d $srcdir/$i; then
install_it="yes"
for j in $DO_NOT_COMPILE; do
if test $i = $j; then
install_it="no"
fi
done
else
install_it="no"
fi
echo "$ac_t""$install_it" 1>&6
if test $install_it = "yes"; then
TOPSUBDIRS="$TOPSUBDIRS $i"
fi
done
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs. It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already. You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
sed -n \
-e "s/'/'\\\\''/g" \
-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
;;
esac >> confcache
if cmp -s $cache_file confcache; then
:
else
if test -w $cache_file; then
echo "updating cache $cache_file"
cat confcache > $cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
if test "x$srcdir" = x.; then
ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
fi
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
DEFS=-DHAVE_CONFIG_H
# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}
echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS </dev/null | sed 1q`:
#
# $0 $ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
do
case "\$ac_option" in
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "$CONFIG_STATUS generated by autoconf version 2.13"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
*) echo "\$ac_cs_usage"; exit 1 ;;
esac
done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
trap 'rm -fr `echo "\
./Makefile \
ed2k_hash/Makefile \
ed2k_hash/docs/Makefile \
ed2k_hash/docs/en/Makefile \
config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@sbindir@%$sbindir%g
s%@libexecdir@%$libexecdir%g
s%@datadir@%$datadir%g
s%@sysconfdir@%$sysconfdir%g
s%@sharedstatedir@%$sharedstatedir%g
s%@localstatedir@%$localstatedir%g
s%@libdir@%$libdir%g
s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@host@%$host%g
s%@host_alias@%$host_alias%g
s%@host_cpu@%$host_cpu%g
s%@host_vendor@%$host_vendor%g
s%@host_os@%$host_os%g
s%@target@%$target%g
s%@target_alias@%$target_alias%g
s%@target_cpu@%$target_cpu%g
s%@target_vendor@%$target_vendor%g
s%@target_os@%$target_os%g
s%@build@%$build%g
s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@PACKAGE@%$PACKAGE%g
s%@VERSION@%$VERSION%g
s%@EXEEXT@%$EXEEXT%g
s%@OBJEXT@%$OBJEXT%g
s%@ACLOCAL@%$ACLOCAL%g
s%@AUTOCONF@%$AUTOCONF%g
s%@AUTOMAKE@%$AUTOMAKE%g
s%@AUTOHEADER@%$AUTOHEADER%g
s%@MAKEINFO@%$MAKEINFO%g
s%@AMTAR@%$AMTAR%g
s%@install_sh@%$install_sh%g
s%@INSTALL_STRIP_PROGRAM@%$INSTALL_STRIP_PROGRAM%g
s%@AWK@%$AWK%g
s%@SET_MAKE@%$SET_MAKE%g
s%@AMDEP_TRUE@%$AMDEP_TRUE%g
s%@AMDEP_FALSE@%$AMDEP_FALSE%g
s%@AMDEPBACKSLASH@%$AMDEPBACKSLASH%g
s%@DEPDIR@%$DEPDIR%g
s%@CONF_FILES@%$CONF_FILES%g
s%@CC@%$CC%g
s%@am__include@%$am__include%g
s%@am__quote@%$am__quote%g
s%@CCDEPMODE@%$CCDEPMODE%g
s%@USE_EXCEPTIONS@%$USE_EXCEPTIONS%g
s%@USE_RTTI@%$USE_RTTI%g
s%@CPP@%$CPP%g
s%@NOOPT_CFLAGS@%$NOOPT_CFLAGS%g
s%@REPO@%$REPO%g
s%@NOREPO@%$NOREPO%g
s%@KDE_USE_FINAL_TRUE@%$KDE_USE_FINAL_TRUE%g
s%@KDE_USE_FINAL_FALSE@%$KDE_USE_FINAL_FALSE%g
s%@KDE_USE_CLOSURE_TRUE@%$KDE_USE_CLOSURE_TRUE%g
s%@KDE_USE_CLOSURE_FALSE@%$KDE_USE_CLOSURE_FALSE%g
s%@KDE_CXXFLAGS@%$KDE_CXXFLAGS%g
s%@LN_S@%$LN_S%g
s%@RANLIB@%$RANLIB%g
s%@STRIP@%$STRIP%g
s%@LIBTOOL@%$LIBTOOL%g
s%@USER_INCLUDES@%$USER_INCLUDES%g
s%@USER_LDFLAGS@%$USER_LDFLAGS%g
s%@all_includes@%$all_includes%g
s%@all_libraries@%$all_libraries%g
s%@AUTODIRS@%$AUTODIRS%g
s%@TOPSUBDIRS@%$TOPSUBDIRS%g
CEOF
EOF
cat >> $CONFIG_STATUS <<\EOF
# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
if test $ac_beg -gt 1; then
sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
else
sed "${ac_end}q" conftest.subs > conftest.s$ac_file
fi
if test ! -s conftest.s$ac_file; then
ac_more_lines=false
rm -f conftest.s$ac_file
else
if test -z "$ac_sed_cmds"; then
ac_sed_cmds="sed -f conftest.s$ac_file"
else
ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
fi
ac_file=`expr $ac_file + 1`
ac_beg=$ac_end
ac_end=`expr $ac_end + $ac_max_sed_cmds`
fi
done
if test -z "$ac_sed_cmds"; then
ac_sed_cmds=cat
fi
EOF
cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case "$ac_file" in
*:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
*) ac_file_in="${ac_file}.in" ;;
esac
# Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
# Remove last slash and all that follows it. Not all systems have dirname.
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
# The file is in a subdirectory.
test ! -d "$ac_dir" && mkdir "$ac_dir"
ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
# A "../" for each directory in $ac_dir_suffix.
ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
else
ac_dir_suffix= ac_dots=
fi
case "$ac_given_srcdir" in
.) srcdir=.
if test -z "$ac_dots"; then top_srcdir=.
else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
*) # Relative path.
srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
top_srcdir="$ac_dots$ac_given_srcdir" ;;
esac
case "$ac_given_INSTALL" in
[/$]*) INSTALL="$ac_given_INSTALL" ;;
*) INSTALL="$ac_dots$ac_given_INSTALL" ;;
esac
echo creating "$ac_file"
rm -f "$ac_file"
configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
case "$ac_file" in
*Makefile*) ac_comsub="1i\\
# $configure_input" ;;
*) ac_comsub= ;;
esac
ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
s%@INSTALL@%$INSTALL%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
ac_dC='\3'
ac_dD='%g'
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ac_uB='\([ ]\)%\1#\2define\3'
ac_uC=' '
ac_uD='\4%g'
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ac_eB='$%\1#\2define\3'
ac_eC=' '
ac_eD='%g'
if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF
fi
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case "$ac_file" in
*:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
*) ac_file_in="${ac_file}.in" ;;
esac
echo creating $ac_file
rm -f conftest.frag conftest.in conftest.out
ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
cat $ac_file_inputs > conftest.in
EOF
# Transform confdefs.h into a sed script conftest.vals that substitutes
# the proper values into config.h.in to produce config.h. And first:
# Protect against being on the right side of a sed subst in config.status.
# Protect against being in an unquoted here document in config.status.
rm -f conftest.vals
cat > conftest.hdr <<\EOF
s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
s%ac_d%ac_u%gp
s%ac_u%ac_e%gp
EOF
sed -n -f conftest.hdr confdefs.h > conftest.vals
rm -f conftest.hdr
# This sed command replaces #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
cat >> conftest.vals <<\EOF
s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
EOF
# Break up conftest.vals because some shells have a limit on
# the size of here documents, and old seds have small limits too.
rm -f conftest.tail
while :
do
ac_lines=`grep -c . conftest.vals`
# grep -c gives empty output for an empty file on some AIX systems.
if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
# Write a limited-size here document to conftest.frag.
echo ' cat > conftest.frag <> $CONFIG_STATUS
sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
echo 'CEOF
sed -f conftest.frag conftest.in > conftest.out
rm -f conftest.in
mv conftest.out conftest.in
' >> $CONFIG_STATUS
sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
rm -f conftest.vals
mv conftest.tail conftest.vals
done
rm -f conftest.vals
cat >> $CONFIG_STATUS <<\EOF
rm -f conftest.frag conftest.h
echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
cat conftest.in >> conftest.h
rm -f conftest.in
if cmp -s $ac_file conftest.h 2>/dev/null; then
echo "$ac_file is unchanged"
rm -f conftest.h
else
# Remove last slash and all that follows it. Not all systems have dirname.
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
# The file is in a subdirectory.
test ! -d "$ac_dir" && mkdir "$ac_dir"
fi
rm -f $ac_file
mv conftest.h $ac_file
fi
fi; done
EOF
cat >> $CONFIG_STATUS < "\$am_dir"stamp-h\$am_indx
;;
esac
am_indx=\`expr \$am_indx + 1\`
done
AMDEP_TRUE="$AMDEP_TRUE"
ac_aux_dir="$ac_aux_dir"
EOF
cat >> $CONFIG_STATUS <<\EOF
test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
test x"$AMDEP_TRUE" != x"" ||
for mf in $CONFIG_FILES; do
case "$mf" in
Makefile) dirpart=.;;
*/Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
*) continue;;
esac
grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
# Extract the definition of DEP_FILES from the Makefile without
# running `make'.
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
test -z "$DEPDIR" && continue
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n -e '/^U = / s///p' < "$mf"`
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
# We invoke sed twice because it is the simplest approach to
# changing $(DEPDIR) to its actual value in the expansion.
for file in `sed -n -e '
/^DEP_FILES = .*\\\\$/ {
s/^DEP_FILES = //
:loop
s/\\\\$//
p
n
/\\\\$/ b loop
p
}
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
$ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
ed2k_hash-0.3.3/Makefile.in 0000644 0001750 0001750 00000044362 11257516374 014426 0 ustar tiago tiago # KDE tags expanded automatically by am_edit - $Revision: 1.1.1.1 $
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# 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@
####### kdevelop will overwrite this part!!! (begin)##########
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_alias = @build_alias@
build_triplet = @build@
host_alias = @host_alias@
host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@
AMTAR = @AMTAR@
ARTSCCONFIG = @ARTSCCONFIG@
AS = @AS@
AUTODIRS = @AUTODIRS@
AWK = @AWK@
CC = @CC@
CONF_FILES = @CONF_FILES@
CPP = @CPP@
CXX = @CXX@
CXXCPP = @CXXCPP@
DCOPIDL = @DCOPIDL@
DCOPIDL2CPP = @DCOPIDL2CPP@
DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DPMSINC = @DPMSINC@
DPMSLIB = @DPMSLIB@
EXEEXT = @EXEEXT@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GLINC = @GLINC@
GLLIB = @GLLIB@
GMSGFMT = @GMSGFMT@
IDL = @IDL@
IDL_DEPENDENCIES = @IDL_DEPENDENCIES@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JAR = @JAR@
JAVAC = @JAVAC@
JAVAH = @JAVAH@
JVMLIBS = @JVMLIBS@
KDECONFIG = @KDECONFIG@
KDE_CXXFLAGS = @KDE_CXXFLAGS@
KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
KDE_INCLUDES = @KDE_INCLUDES@
KDE_LDFLAGS = @KDE_LDFLAGS@
KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
KDE_MT_LIBS = @KDE_MT_LIBS@
KDE_PLUGIN = @KDE_PLUGIN@
KDE_RPATH = @KDE_RPATH@
KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
LEX = @LEX@
LEXLIB = @LEXLIB@
LIBCOMPAT = @LIBCOMPAT@
LIBCRYPT = @LIBCRYPT@
LIBDL = @LIBDL@
LIBGEN = @LIBGEN@
LIBJPEG = @LIBJPEG@
LIBMICO = @LIBMICO@
LIBOBJS = @LIBOBJS@
LIBPNG = @LIBPNG@
LIBPTHREAD = @LIBPTHREAD@
LIBPYTHON = @LIBPYTHON@
LIBQIMGIO = @LIBQIMGIO@
LIBRESOLV = @LIBRESOLV@
LIBSHADOW = @LIBSHADOW@
LIBSM = @LIBSM@
LIBSOCKET = @LIBSOCKET@
LIBTIFF = @LIBTIFF@
LIBTOOL = @LIBTOOL@
LIBUCB = @LIBUCB@
LIBUTIL = @LIBUTIL@
LIBXINERAMA = @LIBXINERAMA@
LIBZ = @LIBZ@
LIB_KAB = @LIB_KAB@
LIB_KDECORE = @LIB_KDECORE@
LIB_KDEPRINT = @LIB_KDEPRINT@
LIB_KDEUI = @LIB_KDEUI@
LIB_KFILE = @LIB_KFILE@
LIB_KFM = @LIB_KFM@
LIB_KHTML = @LIB_KHTML@
LIB_KIMGIO = @LIB_KIMGIO@
LIB_KIO = @LIB_KIO@
LIB_KPARTS = @LIB_KPARTS@
LIB_KSPELL = @LIB_KSPELL@
LIB_KSYCOCA = @LIB_KSYCOCA@
LIB_QPE = @LIB_QPE@
LIB_QT = @LIB_QT@
LIB_QTOPIA = @LIB_QTOPIA@
LIB_SMB = @LIB_SMB@
LIB_X11 = @LIB_X11@
LIB_XEXT = @LIB_XEXT@
LN_S = @LN_S@
MCOPIDL = @MCOPIDL@
MEINPROC = @MEINPROC@
MICO_INCLUDES = @MICO_INCLUDES@
MICO_LDFLAGS = @MICO_LDFLAGS@
MOC = @MOC@
MSGFMT = @MSGFMT@
NOOPT_CFLAGS = @NOOPT_CFLAGS@
NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
NOREPO = @NOREPO@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PAMLIBS = @PAMLIBS@
PASSWDLIBS = @PASSWDLIBS@
PYTHONINC = @PYTHONINC@
PYTHONLIB = @PYTHONLIB@
PYTHONMODDIR = @PYTHONMODDIR@
QTE_NORTTI = @QTE_NORTTI@
QTOPIA_INCLUDES = @QTOPIA_INCLUDES@
QT_INCLUDES = @QT_INCLUDES@
QT_LDFLAGS = @QT_LDFLAGS@
RANLIB = @RANLIB@
REPO = @REPO@
SETUIDFLAGS = @SETUIDFLAGS@
STRIP = @STRIP@
TOPSUBDIRS = @TOPSUBDIRS@
UIC = @UIC@
UIC_TR = @UIC_TR@
USER_INCLUDES = @USER_INCLUDES@
USER_LDFLAGS = @USER_LDFLAGS@
USE_EXCEPTIONS = @USE_EXCEPTIONS@
USE_RTTI = @USE_RTTI@
USE_THREADS = @USE_THREADS@
VERSION = @VERSION@
WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
XGETTEXT = @XGETTEXT@
XPMINC = @XPMINC@
XPMLIB = @XPMLIB@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_INCLUDES = @X_INCLUDES@
X_LDFLAGS = @X_LDFLAGS@
X_PRE_LIBS = @X_PRE_LIBS@
all_includes = @all_includes@
all_libraries = @all_libraries@
am__include = @am__include@
am__quote = @am__quote@
idldir = @idldir@
install_sh = @install_sh@
jni_includes = @jni_includes@
kde_appsdir = @kde_appsdir@
kde_bindir = @kde_bindir@
kde_confdir = @kde_confdir@
kde_datadir = @kde_datadir@
kde_htmldir = @kde_htmldir@
kde_icondir = @kde_icondir@
kde_includes = @kde_includes@
kde_libraries = @kde_libraries@
kde_libs_htmldir = @kde_libs_htmldir@
kde_libs_prefix = @kde_libs_prefix@
kde_locale = @kde_locale@
kde_mimedir = @kde_mimedir@
kde_moduledir = @kde_moduledir@
kde_qtver = @kde_qtver@
kde_servicesdir = @kde_servicesdir@
kde_servicetypesdir = @kde_servicetypesdir@
kde_sounddir = @kde_sounddir@
kde_styledir = @kde_styledir@
kde_templatesdir = @kde_templatesdir@
kde_wallpaperdir = @kde_wallpaperdir@
kde_widgetdir = @kde_widgetdir@
micodir = @micodir@
qt_includes = @qt_includes@
qt_libraries = @qt_libraries@
x_includes = @x_includes@
x_libraries = @x_libraries@
SUBDIRS = ed2k_hash
EXTRA_DIST = ed2k_hash.kdevprj admin AUTHORS COPYING ChangeLog INSTALL README TODO ed2k_hash.lsm
####### kdevelop will overwrite this part!!! (end)############
# not a GNU package. You can remove this line, if
# have all needed files, that a GNU package needs
AUTOMAKE_OPTIONS = foreign
MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
uninstall-info-recursive all-recursive install-data-recursive \
install-exec-recursive installdirs-recursive install-recursive \
uninstall-recursive check-recursive installcheck-recursive
DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \
Makefile.am Makefile.in TODO acinclude.m4 aclocal.m4 \
admin/ChangeLog admin/config.guess admin/config.sub \
admin/depcomp admin/install-sh admin/ltcf-c.sh \
admin/ltcf-cxx.sh admin/ltcf-gcj.sh admin/ltconfig \
admin/ltmain.sh admin/missing admin/mkinstalldirs admin/ylwrap \
config.h.in configure configure.in
DIST_SUBDIRS = $(SUBDIRS)
#>- all: config.h
#>+ 1
all: docs-am config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
#>- cd $(top_srcdir) && \
#>- $(AUTOMAKE) --foreign ./Makefile
#>+ 3
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign ./Makefile
cd $(top_srcdir) && perl admin/am_edit Makefile.in
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$@ $(SHELL) ./config.status
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): configure.in acinclude.m4
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.h: stamp-h
@if test ! -f $@; then \
rm -f stamp-h; \
$(MAKE) stamp-h; \
else :; fi
stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h stamp-hT
@echo timestamp > stamp-hT 2> /dev/null
cd $(top_builddir) \
&& CONFIG_FILES= CONFIG_HEADERS=config.h \
$(SHELL) ./config.status
@mv stamp-hT stamp-h
$(srcdir)/config.h.in: $(srcdir)/./stamp-h.in
@if test ! -f $@; then \
rm -f $(srcdir)/./stamp-h.in; \
$(MAKE) $(srcdir)/./stamp-h.in; \
else :; fi
$(srcdir)/./stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
@rm -f $(srcdir)/./stamp-h.in $(srcdir)/./stamp-h.inT
@echo timestamp > $(srcdir)/./stamp-h.inT 2> /dev/null
cd $(top_srcdir) && $(AUTOHEADER)
@mv $(srcdir)/./stamp-h.inT $(srcdir)/./stamp-h.in
distclean-hdr:
-rm -f config.h
uninstall-info-am:
# 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
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(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 $(LISP)
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(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 "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
|| etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP)
GTAGS:
here=`CDPATH=: && cd $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
#>+ 4
KDE_DIST=subdirs special.m4.in configure.files ed2k_hash.kdevses Makefile.dist configure.in.in
DISTFILES= $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
top_distdir = .
# Avoid unsightly `./'.
distdir = $(PACKAGE)-$(VERSION)
GZIP_ENV = --best
distdir: $(DISTFILES)
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
mkdir $(distdir)
$(mkinstalldirs) $(distdir)/admin
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
for subdir in $(SUBDIRS); do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" \
distdir=../$(distdir)/$$subdir \
distdir) \
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="${top_distdir}" distdir="$(distdir)" \
dist-hook
-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: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(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
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
chmod a-w $(distdir)
dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
&& cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
|| (echo "Error: files left after uninstall" 1>&2; \
exit 1) ) \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& $(MAKE) $(AM_MAKEFLAGS) distclean \
&& rm -f $(distdir).tar.gz \
&& (test `find . -type f -print | wc -l` -eq 0 \
|| (echo "Error: files left after distclean" 1>&2; \
exit 1) )
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
@echo "$(distdir).tar.gz is ready for distribution" | \
sed 'h;s/./=/g;p;x;p;x'
check-am: all-am
check: check-recursive
all-am: Makefile config.h
installdirs: installdirs-recursive
installdirs-am:
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)" \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
#>- clean: clean-recursive
#>+ 1
clean: kde-rpo-clean clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
dist-all: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
distclean: distclean-recursive
-rm -f config.status config.cache config.log
distclean-am: clean-am distclean-generic distclean-hdr distclean-libtool \
distclean-tags
dvi: dvi-recursive
dvi-am:
info: info-recursive
info-am:
install-data-am:
install-exec-am:
install-info: install-info-recursive
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
clean-generic clean-libtool clean-recursive dist dist-all \
distcheck distclean distclean-generic distclean-hdr \
distclean-libtool distclean-recursive distclean-tags distdir \
dvi dvi-am dvi-recursive info info-am info-recursive install \
install-am install-data install-data-am install-data-recursive \
install-exec install-exec-am install-exec-recursive \
install-info install-info-am install-info-recursive install-man \
install-recursive install-strip installcheck installcheck-am \
installdirs installdirs-am installdirs-recursive \
maintainer-clean maintainer-clean-generic \
maintainer-clean-recursive mostlyclean mostlyclean-generic \
mostlyclean-libtool mostlyclean-recursive tags tags-recursive \
uninstall uninstall-am uninstall-info-am \
uninstall-info-recursive uninstall-recursive
$(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in ;
$(top_srcdir)/subdirs:
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs
$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/special.m4.in $(top_srcdir)/admin/libtool.m4.in
@cd $(top_srcdir) && cat admin/acinclude.m4.in special.m4.in admin/libtool.m4.in > acinclude.m4
package-messages:
$(MAKE) -f admin/Makefile.common package-messages
dist-hook:
cd $(top_distdir) && perl admin/am_edit -padmin
cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs
# 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:
#>+ 2
docs-am:
#>+ 6
force-reedit:
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign ./Makefile
cd $(top_srcdir) && perl admin/am_edit Makefile.in
#>+ 2
final:
$(MAKE) all-am
#>+ 2
final-install:
$(MAKE) install-am
#>+ 2
no-final:
$(MAKE) all-am
#>+ 2
no-final-install:
$(MAKE) install-am
#>+ 3
cvs-clean:
$(MAKE) -f $(top_srcdir)/admin/Makefile.common cvs-clean
#>+ 3
kde-rpo-clean:
-rm -f *.rpo
ed2k_hash-0.3.3/AUTHORS 0000644 0001750 0001750 00000000376 07611105654 013420 0 ustar tiago tiago Original Author:
----------------
Tim-Philipp Müller
Contributors:
-------------
Jerome Laheurte
- implemented directory stuff for WIN32 platform
- WIN32 GUI
Magnus
- Mac OS X GUI
ed2k_hash-0.3.3/acinclude.m4 0000644 0001750 0001750 00000465006 07611257754 014557 0 ustar tiago tiago ## -*- autoconf -*-
dnl This file is part of the KDE libraries/packages
dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
dnl This file is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Library General Public
dnl License as published by the Free Software Foundation; either
dnl version 2 of the License, or (at your option) any later version.
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Library General Public License for more details.
dnl You should have received a copy of the GNU Library General Public License
dnl along with this library; see the file COPYING.LIB. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
dnl IMPORTANT NOTE:
dnl Please do not modify this file unless you expect your modifications to be
dnl carried into every other module in the repository. If you decide that you
dnl really want to modify it, contact coolo@kde.org mentioning that you have
dnl and that the modified file should be committed to every module.
dnl
dnl Single-module modifications are best placed in configure.in for kdelibs
dnl and kdebase or configure.in.in if present.
dnl ------------------------------------------------------------------------
dnl Forward compatibility macros (make autoconf 2.13 look like 2.50),
dnl thanks to Raja R Harinath.
dnl ------------------------------------------------------------------------
dnl
ifdef([_AC_PATH_X_XMKMF],[],
[AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])])
ifdef([AC_OUTPUT_SUBDIRS],[],
[AC_DEFUN([AC_OUTPUT_SUBDIRS],[subdirs=$1; _AC_OUTPUT_SUBDIRS])])
# KDE_PATH_X_DIRECT
dnl Internal subroutine of AC_PATH_X.
dnl Set ac_x_includes and/or ac_x_libraries.
AC_DEFUN(KDE_PATH_X_DIRECT,
[if test "$ac_x_includes" = NO; then
# Guess where to find include files, by looking for this one X11 .h file.
test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
# First, try using that file with no special directory specified.
AC_TRY_CPP([#include <$x_direct_test_include>],
[# We can compile using X headers with no special include directory.
ac_x_includes=],
[# Look for the header file in a standard set of common directories.
# Check X11 before X11Rn because it is often a symlink to the current release.
for ac_dir in \
/usr/X11/include \
/usr/X11R6/include \
/usr/X11R5/include \
/usr/X11R4/include \
\
/usr/include/X11 \
/usr/include/X11R6 \
/usr/include/X11R5 \
/usr/include/X11R4 \
\
/usr/local/X11/include \
/usr/local/X11R6/include \
/usr/local/X11R5/include \
/usr/local/X11R4/include \
\
/usr/local/include/X11 \
/usr/local/include/X11R6 \
/usr/local/include/X11R5 \
/usr/local/include/X11R4 \
\
/usr/X386/include \
/usr/x386/include \
/usr/XFree86/include/X11 \
\
/usr/include \
/usr/local/include \
/usr/unsupported/include \
/usr/athena/include \
/usr/local/x11r5/include \
/usr/lpp/Xamples/include \
\
/usr/openwin/include \
/usr/openwin/share/include \
; \
do
if test -r "$ac_dir/$x_direct_test_include"; then
ac_x_includes=$ac_dir
break
fi
done])
fi # $ac_x_includes = NO
if test "$ac_x_libraries" = NO; then
# Check for the libraries.
test -z "$x_direct_test_library" && x_direct_test_library=Xt
test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
# See if we find them without any special options.
# Don't add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
AC_TRY_LINK(, [${x_direct_test_function}()],
[LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
ac_x_libraries=],
[LIBS="$ac_save_LIBS"
# First see if replacing the include by lib works.
# Check X11 before X11Rn because it is often a symlink to the current release.
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
/usr/X11/lib \
/usr/X11R6/lib \
/usr/X11R5/lib \
/usr/X11R4/lib \
\
/usr/lib/X11 \
/usr/lib/X11R6 \
/usr/lib/X11R5 \
/usr/lib/X11R4 \
\
/usr/local/X11/lib \
/usr/local/X11R6/lib \
/usr/local/X11R5/lib \
/usr/local/X11R4/lib \
\
/usr/local/lib/X11 \
/usr/local/lib/X11R6 \
/usr/local/lib/X11R5 \
/usr/local/lib/X11R4 \
\
/usr/X386/lib \
/usr/x386/lib \
/usr/XFree86/lib/X11 \
\
/usr/lib \
/usr/local/lib \
/usr/unsupported/lib \
/usr/athena/lib \
/usr/local/x11r5/lib \
/usr/lpp/Xamples/lib \
/lib/usr/lib/X11 \
\
/usr/openwin/lib \
/usr/openwin/share/lib \
; \
do
dnl Don't even attempt the hair of trying to link an X program!
for ac_extension in a so sl; do
if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
ac_x_libraries=$ac_dir
break 2
fi
done
done])
fi # $ac_x_libraries = NO
])
dnl ------------------------------------------------------------------------
dnl Find a file (or one of more files in a list of dirs)
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(AC_FIND_FILE,
[
$3=NO
for i in $2;
do
for j in $1;
do
echo "configure: __oline__: $i/$j" >&AC_FD_CC
if test -r "$i/$j"; then
echo "taking that" >&AC_FD_CC
$3=$i
break 2
fi
done
done
])
dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
dnl if-not-found, test-parameter)
AC_DEFUN(KDE_FIND_PATH,
[
AC_MSG_CHECKING([for $1])
if test -n "$$2"; then
kde_cv_path="$$2";
else
kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
AC_CACHE_VAL(kde_cv_path_$kde_cache,
[
kde_cv_path="NONE"
dirs="$3"
kde_save_IFS=$IFS
IFS=':'
for dir in $PATH; do
dirs="$dirs $dir"
done
IFS=$kde_save_IFS
for dir in $dirs; do
if test -x "$dir/$1"; then
if test -n "$5"
then
evalstr="$dir/$1 $5 2>&1 "
if eval $evalstr; then
kde_cv_path="$dir/$1"
break
fi
else
kde_cv_path="$dir/$1"
break
fi
fi
done
eval "kde_cv_path_$kde_cache=$kde_cv_path"
])
eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
fi
if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
AC_MSG_RESULT(not found)
$4
else
AC_MSG_RESULT($kde_cv_path)
$2=$kde_cv_path
fi
])
AC_DEFUN(KDE_MOC_ERROR_MESSAGE,
[
AC_MSG_ERROR([No Qt meta object compiler (moc) found!
Please check whether you installed Qt correctly.
You need to have a running moc binary.
configure tried to run $ac_cv_path_moc and the test didn't
succeed. If configure shouldn't have tried this one, set
the environment variable MOC to the right one before running
configure.
])
])
AC_DEFUN(KDE_UIC_ERROR_MESSAGE,
[
AC_MSG_WARN([No Qt ui compiler (uic) found!
Please check whether you installed Qt correctly.
You need to have a running uic binary.
configure tried to run $ac_cv_path_uic and the test didn't
succeed. If configure shouldn't have tried this one, set
the environment variable UIC to the right one before running
configure.
])
])
dnl ------------------------------------------------------------------------
dnl Find the meta object compiler and the ui compiler in the PATH,
dnl in $QTDIR/bin, and some more usual places
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(AC_PATH_QT_MOC_UIC,
[
qt_bindirs=""
for dir in $kde_qt_dirs; do
qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
done
qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
if test ! "$ac_qt_bindir" = "NO"; then
qt_bindirs="$ac_qt_bindir $qt_bindirs"
fi
KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
if test -z "$UIC_NOT_NEEDED"; then
KDE_FIND_PATH(uic, UIC, [$qt_bindirs], [UIC=""])
if test -z "$UIC" ; then
KDE_UIC_ERROR_MESSAGE
exit 1
fi
else
UIC="echo uic not available: "
fi
AC_SUBST(MOC)
AC_SUBST(UIC)
UIC_TR="i18n"
if test $kde_qtver = 3; then
UIC_TR="tr2i18n"
fi
AC_SUBST(UIC_TR)
])
AC_DEFUN(KDE_1_CHECK_PATHS,
[
KDE_1_CHECK_PATH_HEADERS
KDE_TEST_RPATH=
if test -n "$USE_RPATH"; then
if test -n "$kde_libraries"; then
KDE_TEST_RPATH="-R $kde_libraries"
fi
if test -n "$qt_libraries"; then
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
fi
if test -n "$x_libraries"; then
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
fi
KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
fi
AC_MSG_CHECKING([for KDE libraries installed])
ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
if AC_TRY_EVAL(ac_link) && test -s conftest; then
AC_MSG_RESULT(yes)
else
AC_MSG_ERROR([your system fails at linking a small KDE application!
Check, if your compiler is installed correctly and if you have used the
same compiler to compile Qt and kdelibs as you did use now.
For more details about this problem, look at the end of config.log.])
fi
if eval `KDEDIR= ./conftest 2>&5`; then
kde_result=done
else
kde_result=problems
fi
KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
kde_have_all_paths=yes
KDE_SET_PATHS($kde_result)
])
AC_DEFUN(KDE_SET_PATHS,
[
kde_cv_all_paths="kde_have_all_paths=\"yes\" \
kde_htmldir=\"$kde_htmldir\" \
kde_appsdir=\"$kde_appsdir\" \
kde_icondir=\"$kde_icondir\" \
kde_sounddir=\"$kde_sounddir\" \
kde_datadir=\"$kde_datadir\" \
kde_locale=\"$kde_locale\" \
kde_cgidir=\"$kde_cgidir\" \
kde_confdir=\"$kde_confdir\" \
kde_mimedir=\"$kde_mimedir\" \
kde_toolbardir=\"$kde_toolbardir\" \
kde_wallpaperdir=\"$kde_wallpaperdir\" \
kde_templatesdir=\"$kde_templatesdir\" \
kde_bindir=\"$kde_bindir\" \
kde_servicesdir=\"$kde_servicesdir\" \
kde_servicetypesdir=\"$kde_servicetypesdir\" \
kde_moduledir=\"$kde_moduledir\" \
kde_styledir=\"$kde_styledir\" \
kde_widgetdir=\"$kde_widgetdir\" \
kde_result=$1"
])
AC_DEFUN(KDE_SET_DEFAULT_PATHS,
[
if test "$1" = "default"; then
if test -z "$kde_htmldir"; then
kde_htmldir='\${prefix}/share/doc/HTML'
fi
if test -z "$kde_appsdir"; then
kde_appsdir='\${prefix}/share/applnk'
fi
if test -z "$kde_icondir"; then
kde_icondir='\${prefix}/share/icons'
fi
if test -z "$kde_sounddir"; then
kde_sounddir='\${prefix}/share/sounds'
fi
if test -z "$kde_datadir"; then
kde_datadir='\${prefix}/share/apps'
fi
if test -z "$kde_locale"; then
kde_locale='\${prefix}/share/locale'
fi
if test -z "$kde_cgidir"; then
kde_cgidir='\${exec_prefix}/cgi-bin'
fi
if test -z "$kde_confdir"; then
kde_confdir='\${prefix}/share/config'
fi
if test -z "$kde_mimedir"; then
kde_mimedir='\${prefix}/share/mimelnk'
fi
if test -z "$kde_toolbardir"; then
kde_toolbardir='\${prefix}/share/toolbar'
fi
if test -z "$kde_wallpaperdir"; then
kde_wallpaperdir='\${prefix}/share/wallpapers'
fi
if test -z "$kde_templatesdir"; then
kde_templatesdir='\${prefix}/share/templates'
fi
if test -z "$kde_bindir"; then
kde_bindir='\${exec_prefix}/bin'
fi
if test -z "$kde_servicesdir"; then
kde_servicesdir='\${prefix}/share/services'
fi
if test -z "$kde_servicetypesdir"; then
kde_servicetypesdir='\${prefix}/share/servicetypes'
fi
if test -z "$kde_moduledir"; then
if test "$kde_qtver" = "2"; then
kde_moduledir='\${exec_prefix}/lib/kde2'
else
kde_moduledir='\${exec_prefix}/lib/kde3'
fi
fi
if test -z "$kde_styledir"; then
kde_styledir='\${exec_prefix}/lib/kde3/plugins/styles'
fi
if test -z "$kde_widgetdir"; then
kde_widgetdir='\${exec_prefix}/lib/kde3/plugins/designer'
fi
KDE_SET_PATHS(defaults)
else
if test $kde_qtver = 1; then
AC_MSG_RESULT([compiling])
KDE_1_CHECK_PATHS
else
AC_MSG_ERROR([path checking not yet supported for KDE 2])
fi
fi
])
AC_DEFUN(KDE_CHECK_PATHS_FOR_COMPLETENESS,
[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
test -z "$kde_icondir" || test -z "$kde_sounddir" ||
test -z "$kde_datadir" || test -z "$kde_locale" ||
test -z "$kde_cgidir" || test -z "$kde_confdir" ||
test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
test -z "$kde_styledir" || test -z "kde_widgetdir"
test "x$kde_have_all_paths" != "xyes"; then
kde_have_all_paths=no
fi
])
AC_DEFUN(KDE_MISSING_PROG_ERROR,
[
AC_MSG_ERROR([The important program $1 was not found!
Please check whether you installed KDE correctly.
])
])
AC_DEFUN(KDE_SUBST_PROGRAMS,
[
kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
if test -n "$KDEDIRS"; then
kde_save_IFS=$IFS
IFS=:
for dir in $KDEDIRS; do
kde_default_bindirs="$dir/bin $kde_default_bindirs "
done
IFS=$kde_save_IFS
fi
kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(mcopidl)])
KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(artsc-config)])
KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then
kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
if test "$KDE_XSL_STYLESHEET" = "NO"; then
KDE_XSL_STYLESHEET=""
else
KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
fi
fi
DCOP_DEPENDENCIES='$(DCOPIDL)'
AC_SUBST(DCOPIDL)
AC_SUBST(DCOPIDL2CPP)
AC_SUBST(DCOP_DEPENDENCIES)
AC_SUBST(MCOPIDL)
AC_SUBST(ARTSCCONFIG)
AC_SUBST(KDECONFIG)
AC_SUBST(MEINPROC)
AC_SUBST(KDE_XSL_STYLESHEET)
if test -x "$KDECONFIG"; then # it can be "compiled"
kde_libs_prefix=`$KDECONFIG --prefix`
if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
This means it has been moved since you installed it.
This won't work. Please recompile kdelibs for the new prefix.
])
fi
kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
else
kde_libs_prefix='$(prefix)'
kde_libs_htmldir='$(kde_htmldir)'
fi
AC_SUBST(kde_libs_prefix)
AC_SUBST(kde_libs_htmldir)
])dnl
AC_DEFUN(AC_CREATE_KFSSTND,
[
AC_REQUIRE([AC_CHECK_RPATH])
AC_MSG_CHECKING([for KDE paths])
kde_result=""
kde_cached_paths=yes
AC_CACHE_VAL(kde_cv_all_paths,
[
KDE_SET_DEFAULT_PATHS($1)
kde_cached_paths=no
])
eval "$kde_cv_all_paths"
KDE_CHECK_PATHS_FOR_COMPLETENESS
if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
# wrong values were cached, may be, we can set better ones
kde_result=
kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
kde_datadir= kde_locale= kde_cgidir= kde_confdir=
kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
kde_have_all_paths=
kde_styledir=
kde_widgetdir=
KDE_SET_DEFAULT_PATHS($1)
eval "$kde_cv_all_paths"
KDE_CHECK_PATHS_FOR_COMPLETENESS
kde_result="$kde_result (cache overridden)"
fi
if test "$kde_have_all_paths" = "no"; then
AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
Since it had compiled and linked before, it must be a strange problem on your system.
Look at config.log for details. If you are not able to fix this, look at
http://www.kde.org/faq/installation.html or any www.kde.org mirror.
(If you're using an egcs version on Linux, you may update binutils!)
])
else
rm -f conftest*
AC_MSG_RESULT($kde_result)
fi
bindir=$kde_bindir
KDE_SUBST_PROGRAMS
])
AC_DEFUN(AC_SUBST_KFSSTND,
[
AC_SUBST(kde_htmldir)
AC_SUBST(kde_appsdir)
AC_SUBST(kde_icondir)
AC_SUBST(kde_sounddir)
AC_SUBST(kde_datadir)
AC_SUBST(kde_locale)
AC_SUBST(kde_confdir)
AC_SUBST(kde_mimedir)
AC_SUBST(kde_wallpaperdir)
AC_SUBST(kde_bindir)
dnl for KDE 2
AC_SUBST(kde_templatesdir)
AC_SUBST(kde_servicesdir)
AC_SUBST(kde_servicetypesdir)
AC_SUBST(kde_moduledir)
AC_SUBST(kde_styledir)
AC_SUBST(kde_widgetdir)
if test "$kde_qtver" = 1; then
kde_minidir="$kde_icondir/mini"
else
# for KDE 1 - this breaks KDE2 apps using minidir, but
# that's the plan ;-/
kde_minidir="/dev/null"
fi
dnl AC_SUBST(kde_minidir)
dnl AC_SUBST(kde_cgidir)
dnl AC_SUBST(kde_toolbardir)
])
AC_DEFUN(KDE_MISC_TESTS,
[
AC_LANG_C
dnl Checks for libraries.
AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD
AC_SUBST(LIBUTIL)
AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
AC_SUBST(LIBCOMPAT)
kde_have_crypt=
AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
AC_MSG_WARN([you have no crypt in either libcrypt or libc.
You should install libcrypt from another source or configure with PAM
support])
kde_have_crypt=no
]))
AC_SUBST(LIBCRYPT)
if test $kde_have_crypt = yes; then
AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
fi
AC_CHECK_SOCKLEN_T
AC_LANG_C
AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
AC_CHECK_LIB(dnet_stub, dnet_ntoa,
[X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
fi
AC_CHECK_FUNC(inet_ntoa)
if test $ac_cv_func_inet_ntoa = no; then
AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
fi
AC_CHECK_FUNC(connect)
if test $ac_cv_func_connect = no; then
AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
$X_EXTRA_LIBS)
fi
AC_CHECK_FUNC(remove)
if test $ac_cv_func_remove = no; then
AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
fi
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
AC_CHECK_FUNC(shmat, ,
AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
# Solaris 2.6 and others need -lresolv for res_init
AC_CHECK_FUNCS(res_init, , [
kde_libs_safe="$LIBS"
LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
AC_TRY_LINK(
[
#include
],
[
res_init();
],
LIBRESOLV="-lresolv"
X_EXTRA_LIBS="$X_EXTRA_LIBS $LIBRESOLV"
AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
)
LIBS=$kde_libs_safe
])
LIBSOCKET="$X_EXTRA_LIBS"
AC_SUBST(LIBSOCKET)
AC_SUBST(LIBRESOLV)
AC_SUBST(X_EXTRA_LIBS)
AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
AC_SUBST(LIBUCB)
case $host in dnl this *is* LynxOS specific
*-*-lynxos* )
AC_MSG_CHECKING([LynxOS header file wrappers])
[CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
AC_MSG_RESULT(disabled)
AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
;;
esac
KDE_CHECK_TYPES
KDE_CHECK_LIBDL
])
dnl ------------------------------------------------------------------------
dnl Find the header files and libraries for X-Windows. Extended the
dnl macro AC_PATH_X
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(K_PATH_X,
[
AC_REQUIRE([KDE_MISC_TESTS])dnl
AC_ARG_ENABLE(
embedded,
[ --enable-embedded link to Qt-embedded, don't use X],
kde_use_qt_emb=$enableval,
kde_use_qt_emb=no
)
AC_ARG_ENABLE(
qtopia,
[ --enable-qtopia link to Qt-embedded, link to the Qtopia Environment],
kde_use_qt_emb_palm=$enableval,
kde_use_qt_emb_palm=no
)
if test "$kde_use_qt_emb" = "no"; then
AC_MSG_CHECKING(for X)
AC_LANG_SAVE
AC_LANG_C
AC_CACHE_VAL(kde_cv_have_x,
[# One or both of the vars are not set, and there is no cached value.
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
kde_x_includes=NO
else
kde_x_includes=$x_includes
fi
if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
kde_x_libraries=NO
else
kde_x_libraries=$x_libraries
fi
# below we use the standard autoconf calls
ac_x_libraries=$kde_x_libraries
ac_x_includes=$kde_x_includes
KDE_PATH_X_DIRECT
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
dnl location. The correct location is /usr/lib32 or an undefined value
dnl (the linker is smart enough to pick the correct default library).
dnl Things work just fine if you use just AC_PATH_X_DIRECT.
dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
dnl x_includes should be left alone.
case "$host" in
mips-sgi-irix6*)
;;
*-*-solaris*)
;;
*)
_AC_PATH_X_XMKMF
if test -z "$ac_x_includes"; then
ac_x_includes="."
fi
if test -z "$ac_x_libraries"; then
ac_x_libraries="/usr/lib"
fi
esac
#from now on we use our own again
# when the user already gave --x-includes, we ignore
# what the standard autoconf macros told us.
if test "$kde_x_includes" = NO; then
kde_x_includes=$ac_x_includes
fi
# for --x-libraries too
if test "$kde_x_libraries" = NO; then
kde_x_libraries=$ac_x_libraries
fi
if test "$kde_x_includes" = NO; then
AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
fi
if test "$kde_x_libraries" = NO; then
AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
fi
# Record where we found X for the cache.
kde_cv_have_x="have_x=yes \
kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
])dnl
eval "$kde_cv_have_x"
if test "$have_x" != yes; then
AC_MSG_RESULT($have_x)
no_x=yes
else
AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
fi
if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
X_INCLUDES=""
x_includes="."; dnl better than nothing :-
else
x_includes=$kde_x_includes
X_INCLUDES="-I$x_includes"
fi
if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
X_LDFLAGS=""
x_libraries="/usr/lib"; dnl better than nothing :-
else
x_libraries=$kde_x_libraries
X_LDFLAGS="-L$x_libraries"
fi
all_includes="$X_INCLUDES"
all_libraries="$X_LDFLAGS"
AC_SUBST(X_INCLUDES)
AC_SUBST(X_LDFLAGS)
AC_SUBST(x_libraries)
AC_SUBST(x_includes)
# Check for libraries that X11R6 Xt/Xaw programs need.
ac_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $X_LDFLAGS"
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
# check for ICE first), but we must link in the order -lSM -lICE or
# we get undefined symbols. So assume we have SM if we have ICE.
# These have to be linked with before -lX11, unlike the other
# libraries we check for below, so use a different variable.
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
AC_CHECK_LIB(ICE, IceConnectionNumber,
[LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
AC_SUBST(LIBSM)
LDFLAGS="$ac_save_LDFLAGS"
AC_SUBST(X_PRE_LIBS)
LIB_X11='-lX11 $(LIBSOCKET)'
AC_SUBST(LIB_X11)
AC_MSG_CHECKING(for libXext)
AC_CACHE_VAL(kde_cv_have_libXext,
[
kde_ldflags_safe="$LDFLAGS"
kde_libs_safe="$LIBS"
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
LIBS="-lXext -lX11 $LIBSOCKET"
AC_TRY_LINK([
#include
#ifdef STDC_HEADERS
# include
#endif
],
[
printf("hello Xext\n");
],
kde_cv_have_libXext=yes,
kde_cv_have_libXext=no
)
LDFLAGS=$kde_ldflags_safe
LIBS=$kde_libs_safe
])
AC_MSG_RESULT($kde_cv_have_libXext)
if test "$kde_cv_have_libXext" = "no"; then
AC_MSG_ERROR([We need a working libXext to proceed. Since configure
can't find it itself, we stop here assuming that make wouldn't find
them either.])
fi
AC_MSG_CHECKING(for Xinerama)
AC_ARG_WITH(xinerama,
[ --with-xinerama enable support for Xinerama ],
[
no_xinerama=no
], [
no_xinerama=yes
]
)
kde_save_LDFLAGS="$LDFLAGS"
kde_save_CFLAGS="$CFLAGS"
kde_save_LIBS="$LIBS"
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
CFLAGS="$CFLAGS -I$x_includes"
LIBS="-lXinerama -lXext"
if test "x$no_xinerama" = "xno"; then
AC_CACHE_VAL(ac_cv_have_xinerama,
[
AC_TRY_LINK([#include
#include ],
[XineramaIsActive(NULL);],
[ac_cv_have_xinerama="yes"],
[ac_cv_have_xinerama="no"])
])
else
ac_cv_have_xinerama=no;
fi
AC_MSG_RESULT($ac_cv_have_xinerama)
LIBXINERAMA=""
if test "$ac_cv_have_xinerama" = "yes"; then
AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support])
LIBXINERAMA="-lXinerama"
fi
AC_SUBST(LIBXINERAMA)
LDFLAGS="$kde_save_LDFLAGS"
CFLAGS="$kde_save_CFLAGS"
LIBS="$kde_save_LIBS"
LIB_XEXT="-lXext"
QTE_NORTTI=""
else
dnl We're using QT Embedded
CXXFLAGS="$CXXFLAGS -fno-rtti -DQWS"
CFLAGS="$CFLAGS -DQWS"
LDFLAGS="$LDFLAGS -DQWS"
QTE_NORTTI="-fno-rtti -DQWS"
X_PRE_LIBS=""
LIB_X11=""
LIB_XEXT=""
LIBSM=""
X_INCLUDES=""
X_LDFLAGS=""
x_includes=""
x_libraries=""
AC_SUBST(X_PRE_LIBS)
AC_SUBST(LIB_X11)
AC_SUBST(LIBSM)
AC_SUBST(X_INCLUDES)
AC_SUBST(X_LDFLAGS)
AC_SUBST(x_includes)
AC_SUBST(x_libraries)
fi
AC_SUBST(QTE_NORTTI)
AC_SUBST(LIB_XEXT)
AC_LANG_RESTORE
])
AC_DEFUN(KDE_PRINT_QT_PROGRAM,
[
AC_REQUIRE([KDE_USE_QT])
cat > conftest.$ac_ext <
#include
EOF
if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <
#include
#include
EOF
if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <
EOF
fi
fi
if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <
#include
#include
EOF
fi
echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
cat >> conftest.$ac_ext <> conftest.$ac_ext <> conftest.$ac_ext <> conftest.$ac_ext <> conftest.$ac_ext <&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
fi
rm -f conftest*
CXXFLAGS="$ac_cxxflags_safe"
LDFLAGS="$ac_ldflags_safe"
LIBS="$ac_libs_safe"
LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
export LD_LIBRARY_PATH
LIBRARY_PATH="$ac_LIBRARY_PATH"
export LIBRARY_PATH
AC_LANG_RESTORE
])
if test "$kde_cv_qt_direct" = "yes"; then
AC_MSG_RESULT(yes)
$1
else
AC_MSG_RESULT(no)
$2
fi
])
dnl ------------------------------------------------------------------------
dnl Try to find the Qt headers and libraries.
dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(AC_PATH_QT_1_3,
[
AC_REQUIRE([K_PATH_X])
AC_REQUIRE([KDE_USE_QT])
dnl ------------------------------------------------------------------------
dnl Add configure flag to enable linking to MT version of Qt library.
dnl ------------------------------------------------------------------------
AC_ARG_ENABLE(
mt,
[ --disable-mt link to non-threaded Qt (deprecated)],
kde_use_qt_mt=$enableval,
[
if test $kde_qtver = 3; then
kde_use_qt_mt=yes
else
kde_use_qt_mt=no
fi
]
)
USING_QT_MT=""
dnl ------------------------------------------------------------------------
dnl If we not get --disable-qt-mt then adjust some vars for the host.
dnl ------------------------------------------------------------------------
KDE_MT_LDFLAGS=
KDE_MT_LIBS=
if test "x$kde_use_qt_mt" = "xyes"; then
KDE_CHECK_THREADING
if test "x$kde_use_threading" = "xyes"; then
CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
KDE_MT_LDFLAGS="$USE_THREADS"
KDE_MT_LIBS="$LIBPTHREAD"
else
kde_use_qt_mt=no
fi
fi
AC_SUBST(KDE_MT_LDFLAGS)
AC_SUBST(KDE_MT_LIBS)
kde_qt_was_given=yes
dnl ------------------------------------------------------------------------
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
dnl ------------------------------------------------------------------------
if test -z "$LIBQT_GLOB"; then
if test "x$kde_use_qt_emb" = "xyes"; then
LIBQT_GLOB="libqte.*"
else
LIBQT_GLOB="libqt.*"
fi
fi
if test -z "$LIBQT"; then
dnl ------------------------------------------------------------
dnl If we got --enable-embedded then adjust the Qt library name.
dnl ------------------------------------------------------------
if test "x$kde_use_qt_emb" = "xyes"; then
qtlib="qte"
else
qtlib="qt"
fi
kde_int_qt="-l$qtlib"
else
kde_int_qt="$LIBQT"
kde_lib_qt_set=yes
fi
if test -z "$LIBQPE"; then
dnl ------------------------------------------------------------
dnl If we got --enable-palmtop then add -lqpe to the link line
dnl ------------------------------------------------------------
if test "x$kde_use_qt_emb" = "xyes"; then
if test "x$kde_use_qt_emb_palm" = "xyes"; then
LIB_QPE="-lqpe"
else
LIB_QPE=""
fi
else
LIB_QPE=""
fi
fi
dnl ------------------------------------------------------------------------
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
dnl ------------------------------------------------------------------------
if test "x$kde_use_qt_mt" = "xyes"; then
if test -z "$LIBQT"; then
LIBQT="-l$qtlib-mt"
kde_int_qt="-l$qtlib-mt"
else
LIBQT="$qtlib-mt"
kde_int_qt="$qtlib-mt"
fi
LIBQT_GLOB="lib$qtlib-mt.*"
USING_QT_MT="using -mt"
else
LIBQT="-l$qtlib"
fi
if test $kde_qtver != 1; then
AC_REQUIRE([AC_FIND_PNG])
AC_REQUIRE([AC_FIND_JPEG])
LIBQT="$LIBQT $LIBPNG $LIBJPEG"
fi
if test $kde_qtver = 3; then
AC_REQUIRE([KDE_CHECK_LIBDL])
LIBQT="$LIBQT $LIBDL"
fi
AC_MSG_CHECKING([for Qt])
if test "x$kde_use_qt_emb" != "xyes"; then
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
fi
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
qt_libraries=""
qt_includes=""
AC_ARG_WITH(qt-dir,
[ --with-qt-dir=DIR where the root of Qt is installed ],
[ ac_qt_includes="$withval"/include
ac_qt_libraries="$withval"/lib
ac_qt_bindir="$withval"/bin
])
AC_ARG_WITH(qt-includes,
[ --with-qt-includes=DIR where the Qt includes are. ],
[
ac_qt_includes="$withval"
])
kde_qt_libs_given=no
AC_ARG_WITH(qt-libraries,
[ --with-qt-libraries=DIR where the Qt library is installed.],
[ ac_qt_libraries="$withval"
kde_qt_libs_given=yes
])
AC_CACHE_VAL(ac_cv_have_qt,
[#try to guess Qt locations
qt_incdirs=""
for dir in $kde_qt_dirs; do
qt_incdirs="$qt_incdirs $dir/include $dir"
done
qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 $x_includes"
if test ! "$ac_qt_includes" = "NO"; then
qt_incdirs="$ac_qt_includes $qt_incdirs"
fi
if test "$kde_qtver" != "1"; then
kde_qt_header=qstyle.h
else
kde_qt_header=qglobal.h
fi
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
ac_qt_includes="$qt_incdir"
qt_libdirs=""
for dir in $kde_qt_dirs; do
qt_libdirs="$qt_libdirs $dir/lib $dir"
done
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
if test ! "$ac_qt_libraries" = "NO"; then
qt_libdir=$ac_qt_libraries
else
qt_libdirs="$ac_qt_libraries $qt_libdirs"
# if the Qt was given, the chance is too big that libqt.* doesn't exist
qt_libdir=NONE
for dir in $qt_libdirs; do
try="ls -1 $dir/${LIBQT_GLOB}"
if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
done
fi
ac_qt_libraries="$qt_libdir"
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_cxxflags_safe="$CXXFLAGS"
ac_ldflags_safe="$LDFLAGS"
ac_libs_safe="$LIBS"
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
KDE_PRINT_QT_PROGRAM
if AC_TRY_EVAL(ac_link) && test -s conftest; then
rm -f conftest*
else
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
ac_qt_libraries="NO"
fi
rm -f conftest*
CXXFLAGS="$ac_cxxflags_safe"
LDFLAGS="$ac_ldflags_safe"
LIBS="$ac_libs_safe"
AC_LANG_RESTORE
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
ac_cv_have_qt="have_qt=no"
ac_qt_notfound=""
missing_qt_mt=""
if test "$ac_qt_includes" = NO; then
if test "$ac_qt_libraries" = NO; then
ac_qt_notfound="(headers and libraries)";
else
ac_qt_notfound="(headers)";
fi
else
if test "x$kde_use_qt_mt" = "xyes"; then
missing_qt_mt="
Make sure that you have compiled Qt with thread support!"
ac_qt_notfound="(library $qtlib-mt)";
else
ac_qt_notfound="(library $qtlib)";
fi
fi
AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
For more details about this problem, look at the end of config.log.$missing_qt_mt])
else
have_qt="yes"
fi
])
eval "$ac_cv_have_qt"
if test "$have_qt" != yes; then
AC_MSG_RESULT([$have_qt]);
else
ac_cv_have_qt="have_qt=yes \
ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
qt_libraries="$ac_qt_libraries"
qt_includes="$ac_qt_includes"
fi
if test ! "$kde_qt_libs_given" = "yes"; then
KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
fi
AC_SUBST(qt_libraries)
AC_SUBST(qt_includes)
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
QT_INCLUDES=""
else
QT_INCLUDES="-I$qt_includes"
all_includes="$QT_INCLUDES $all_includes"
fi
if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
QT_LDFLAGS=""
else
QT_LDFLAGS="-L$qt_libraries"
all_libraries="$all_libraries $QT_LDFLAGS"
fi
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
AC_SUBST(QT_INCLUDES)
AC_SUBST(QT_LDFLAGS)
AC_PATH_QT_MOC_UIC
if test "x$kde_use_qt_emb" != "xyes"; then
LIB_QT="$kde_int_qt "'$(LIBPNG) $(LIBJPEG) -lXext $(LIB_X11) $(LIBSM)'
else
LIB_QT="$kde_int_qt "'$(LIBPNG) $(LIBJPEG)'
fi
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
AC_SUBST(LIB_QT)
AC_SUBST(LIB_QPE)
AC_SUBST(kde_qtver)
])
AC_DEFUN(AC_PATH_QT,
[
AC_PATH_QT_1_3
])
AC_DEFUN(KDE_CHECK_FINAL,
[
AC_ARG_ENABLE(final, [ --enable-final build size optimized apps (experimental - needs lots of memory)],
kde_use_final=$enableval, kde_use_final=no)
KDE_COMPILER_REPO
if test "x$kde_use_final" = "xyes"; then
KDE_USE_FINAL_TRUE=""
KDE_USE_FINAL_FALSE="#"
else
KDE_USE_FINAL_TRUE="#"
KDE_USE_FINAL_FALSE=""
fi
AC_SUBST(KDE_USE_FINAL_TRUE)
AC_SUBST(KDE_USE_FINAL_FALSE)
AC_ARG_ENABLE(closure, [ --disable-closure don't delay template instantiation],
kde_use_closure=$enableval, kde_use_closure=yes)
if test "x$kde_use_closure" = "xyes"; then
KDE_USE_CLOSURE_TRUE=""
KDE_USE_CLOSURE_FALSE="#"
# CXXFLAGS="$CXXFLAGS $REPO"
else
KDE_USE_CLOSURE_TRUE="#"
KDE_USE_CLOSURE_FALSE=""
fi
AC_SUBST(KDE_USE_CLOSURE_TRUE)
AC_SUBST(KDE_USE_CLOSURE_FALSE)
])
dnl ------------------------------------------------------------------------
dnl Now, the same with KDE
dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(AC_BASE_PATH_KDE,
[
AC_PREREQ([2.13])
AC_REQUIRE([AC_PATH_QT])dnl
AC_CHECK_RPATH
AC_MSG_CHECKING([for KDE])
if test "${prefix}" != NONE; then
kde_includes=${prefix}/include
ac_kde_includes=$prefix/include
if test "${exec_prefix}" != NONE; then
kde_libraries=${exec_prefix}/lib
ac_kde_libraries=$exec_prefix/lib
else
kde_libraries=${prefix}/lib
ac_kde_libraries=$prefix/lib
fi
else
ac_kde_includes=
ac_kde_libraries=
kde_libraries=""
kde_includes=""
fi
AC_CACHE_VAL(ac_cv_have_kde,
[#try to guess kde locations
if test "$kde_qtver" = 1; then
kde_check_header="ksock.h"
kde_check_lib="libkdecore.la"
else
kde_check_header="ksharedptr.h"
kde_check_lib="libkio.la"
fi
if test -z "$1"; then
kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
kde_incdirs="$ac_kde_includes $kde_incdirs"
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
ac_kde_includes="$kde_incdir"
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
AC_MSG_ERROR([
in the prefix, you've chosen, are no KDE headers installed. This will fail.
So, check this please and use another prefix!])
fi
kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib/kde3 /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib"
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib $KDEDIR $kde_libdirs"
kde_libdirs="$ac_kde_libraries $kde_libdirs"
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
ac_kde_libraries="$kde_libdir"
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
AC_MSG_ERROR([
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
So, check this please and use another prefix!])
fi
ac_kde_libraries="$kde_libdir"
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO; then
ac_cv_have_kde="have_kde=no"
else
ac_cv_have_kde="have_kde=yes \
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
fi
else dnl test -z $1
ac_cv_have_kde="have_kde=no"
fi
])dnl
eval "$ac_cv_have_kde"
if test "$have_kde" != "yes"; then
if test "${prefix}" = NONE; then
ac_kde_prefix="$ac_default_prefix"
else
ac_kde_prefix="$prefix"
fi
if test "$exec_prefix" = NONE; then
ac_kde_exec_prefix="$ac_kde_prefix"
AC_MSG_RESULT([will be installed in $ac_kde_prefix])
else
ac_kde_exec_prefix="$exec_prefix"
AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
fi
kde_libraries="${ac_kde_exec_prefix}/lib"
kde_includes=${ac_kde_prefix}/include
else
ac_cv_have_kde="have_kde=yes \
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
kde_libraries="$ac_kde_libraries"
kde_includes="$ac_kde_includes"
fi
AC_SUBST(kde_libraries)
AC_SUBST(kde_includes)
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then
KDE_INCLUDES=""
else
KDE_INCLUDES="-I$kde_includes"
all_includes="$KDE_INCLUDES $all_includes"
fi
KDE_LDFLAGS="-L$kde_libraries"
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
all_libraries="$all_libraries $KDE_LDFLAGS"
fi
AC_SUBST(KDE_LDFLAGS)
AC_SUBST(KDE_INCLUDES)
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
all_libraries="$all_libraries $USER_LDFLAGS"
all_includes="$all_includes $USER_INCLUDES"
AC_SUBST(all_includes)
AC_SUBST(all_libraries)
AC_SUBST(AUTODIRS)
])
AC_DEFUN(KDE_CHECK_EXTRA_LIBS,
[
AC_MSG_CHECKING(for extra includes)
AC_ARG_WITH(extra-includes, [ --with-extra-includes=DIR
adds non standard include paths],
kde_use_extra_includes="$withval",
kde_use_extra_includes=NONE
)
kde_extra_includes=
if test -n "$kde_use_extra_includes" && \
test "$kde_use_extra_includes" != "NONE"; then
ac_save_ifs=$IFS
IFS=':'
for dir in $kde_use_extra_includes; do
kde_extra_includes="$kde_extra_includes $dir"
USER_INCLUDES="$USER_INCLUDES -I$dir"
done
IFS=$ac_save_ifs
kde_use_extra_includes="added"
else
kde_use_extra_includes="no"
fi
AC_SUBST(USER_INCLUDES)
AC_MSG_RESULT($kde_use_extra_includes)
kde_extra_libs=
AC_MSG_CHECKING(for extra libs)
AC_ARG_WITH(extra-libs, [ --with-extra-libs=DIR adds non standard library paths],
kde_use_extra_libs=$withval,
kde_use_extra_libs=NONE
)
if test -n "$kde_use_extra_libs" && \
test "$kde_use_extra_libs" != "NONE"; then
ac_save_ifs=$IFS
IFS=':'
for dir in $kde_use_extra_libs; do
kde_extra_libs="$kde_extra_libs $dir"
KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
USER_LDFLAGS="$USER_LDFLAGS -L$dir"
done
IFS=$ac_save_ifs
kde_use_extra_libs="added"
else
kde_use_extra_libs="no"
fi
AC_SUBST(USER_LDFLAGS)
AC_MSG_RESULT($kde_use_extra_libs)
])
AC_DEFUN(KDE_1_CHECK_PATH_HEADERS,
[
AC_MSG_CHECKING([for KDE headers installed])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
cat > conftest.$ac_ext <
#endif
#include
#include "confdefs.h"
#include
int main() {
printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
printf("kde_wallpaperdir=\\"%s\\"\n",
KApplication::kde_wallpaperdir().data());
printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
printf("kde_moduledir=\\"/tmp/dummy\\"\n");
printf("kde_styledir=\\"/tmp/dummy\\"\n");
printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
return 0;
}
EOF
ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
if AC_TRY_EVAL(ac_compile); then
AC_MSG_RESULT(yes)
else
AC_MSG_ERROR([your system is not able to compile a small KDE application!
Check, if you installed the KDE header files correctly.
For more details about this problem, look at the end of config.log.])
fi
AC_LANG_RESTORE
])
AC_DEFUN(KDE_CHECK_KDEQTADDON,
[
AC_MSG_CHECKING(for kde-qt-addon)
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
[
kde_ldflags_safe="$LDFLAGS"
kde_libs_safe="$LIBS"
kde_cxxflags_safe="$CXXFLAGS"
LIBS="-lkde-qt-addon $LIBQT $LIBS"
CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
AC_TRY_LINK([
#include
],
[
QDomDocument doc;
],
kde_cv_have_kdeqtaddon=yes,
kde_cv_have_kdeqtaddon=no
)
LDFLAGS=$kde_ldflags_safe
LIBS=$kde_libs_safe
kde_cxxflags_safe="$CXXFLAGS"
])
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
if test "$kde_cv_have_kdeqtaddon" = "no"; then
AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
It is a separate package (and CVS module) named kde-qt-addon.])
fi
])
AC_DEFUN(KDE_CHECK_KIMGIO,
[
AC_REQUIRE([AC_BASE_PATH_KDE])
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
AC_REQUIRE([AC_FIND_TIFF])
AC_REQUIRE([AC_FIND_JPEG])
AC_REQUIRE([AC_FIND_PNG])
AC_REQUIRE([KDE_CREATE_LIBS_ALIASES])
if test "$1" = "existance"; then
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
kde_save_LIBS="$LIBS"
LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
AC_CHECK_LIB(kimgio, kimgioRegister, [
LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
LIBS="$kde_save_LIBS"
AC_LANG_RESTORE
else
LIBKIMGIO_EXISTS=yes
fi
if test "$LIBKIMGIO_EXISTS" = "yes"; then
LIB_KIMGIO='-lkimgio'
else
LIB_KIMGIO=''
fi
AC_SUBST(LIB_KIMGIO)
])
AC_DEFUN(KDE_CREATE_LIBS_ALIASES,
[
AC_REQUIRE([KDE_MISC_TESTS])
AC_REQUIRE([KDE_CHECK_LIBDL])
AC_REQUIRE([K_PATH_X])
if test $kde_qtver = 3; then
LIB_KDECORE='-lkdecore'
AC_SUBST(LIB_KDECORE)
LIB_KDEUI='-lkdeui'
AC_SUBST(LIB_KDEUI)
LIB_KIO='-lkio'
AC_SUBST(LIB_KIO)
LIB_SMB='-lsmb'
AC_SUBST(LIB_SMB)
LIB_KAB='-lkab'
AC_SUBST(LIB_KAB)
LIB_KHTML='-lkhtml'
AC_SUBST(LIB_KHTML)
LIB_KSPELL='-lkspell'
AC_SUBST(LIB_KSPELL)
LIB_KPARTS='-lkparts'
AC_SUBST(LIB_KPARTS)
LIB_KDEPRINT='-lkdeprint'
AC_SUBST(LIB_KDEPRINT)
# these are for backward compatibility
LIB_KSYCOCA='-lkio'
AC_SUBST(LIB_KSYCOCA)
LIB_KFILE='-lkio'
AC_SUBST(LIB_KFILE)
elif test $kde_qtver = 2; then
LIB_KDECORE='-lkdecore'
AC_SUBST(LIB_KDECORE)
LIB_KDEUI='-lkdeui'
AC_SUBST(LIB_KDEUI)
LIB_KIO='-lkio'
AC_SUBST(LIB_KIO)
LIB_KSYCOCA='-lksycoca'
AC_SUBST(LIB_KSYCOCA)
LIB_SMB='-lsmb'
AC_SUBST(LIB_SMB)
LIB_KFILE='-lkfile'
AC_SUBST(LIB_KFILE)
LIB_KAB='-lkab'
AC_SUBST(LIB_KAB)
LIB_KHTML='-lkhtml'
AC_SUBST(LIB_KHTML)
LIB_KSPELL='-lkspell'
AC_SUBST(LIB_KSPELL)
LIB_KPARTS='-lkparts'
AC_SUBST(LIB_KPARTS)
LIB_KDEPRINT='-lkdeprint'
AC_SUBST(LIB_KDEPRINT)
else
LIB_KDECORE='-lkdecore -lXext $(LIB_QT)'
AC_SUBST(LIB_KDECORE)
LIB_KDEUI='-lkdeui $(LIB_KDECORE)'
AC_SUBST(LIB_KDEUI)
LIB_KFM='-lkfm $(LIB_KDECORE)'
AC_SUBST(LIB_KFM)
LIB_KFILE='-lkfile $(LIB_KFM) $(LIB_KDEUI)'
AC_SUBST(LIB_KFILE)
LIB_KAB='-lkab $(LIB_KIMGIO) $(LIB_KDECORE)'
AC_SUBST(LIB_KAB)
fi
])
AC_DEFUN(AC_PATH_KDE,
[
AC_BASE_PATH_KDE
AC_ARG_ENABLE(path-check, [ --disable-path-check don't try to find out, where to install],
[
if test "$enableval" = "no";
then ac_use_path_checking="default"
else ac_use_path_checking=""
fi
],
[
if test "$kde_qtver" = 1;
then ac_use_path_checking=""
else ac_use_path_checking="default"
fi
]
)
AC_CREATE_KFSSTND($ac_use_path_checking)
AC_SUBST_KFSSTND
KDE_CREATE_LIBS_ALIASES
])
dnl obsolete
AC_DEFUN(AC_CHECK_SETENV,
[
AC_OBSOLETE([$0], [; instead use AC_CHECK_FUNCS([setenv unsetenv])])dnl
AC_CHECK_FUNCS([setenv unsetenv])
])
AC_DEFUN(AC_CHECK_GETDOMAINNAME,
[
AC_MSG_CHECKING(for getdomainname)
AC_CACHE_VAL(ac_cv_func_getdomainname,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
save_CXXFLAGS="$CXXFLAGS"
kde_safe_LIBS="$LIBS"
LIBS="$LIBS $X_EXTRA_LIBS"
if test "$GCC" = "yes"; then
CXXFLAGS="$CXXFLAGS -pedantic-errors"
fi
AC_TRY_COMPILE([
#include
#include
],
[
char buffer[200];
getdomainname(buffer, 200);
],
ac_cv_func_getdomainname=yes,
ac_cv_func_getdomainname=no)
CXXFLAGS="$save_CXXFLAGS"
LIBS=$kde_safe_LIBS
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_func_getdomainname)
AC_MSG_CHECKING([if getdomainname needs custom prototype])
AC_CACHE_VAL(ac_cv_proto_getdomainname,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
if eval "test \"`echo $ac_cv_func_getdomainname`\" = yes"; then
ac_cv_proto_getdomainname=no
else
kde_safe_libs=$LIBS
LIBS="$LIBS $X_EXTRA_LIBS"
AC_TRY_LINK([
#include
#include
extern "C" int getdomainname (char *, int);
],
[
char buffer[200];
getdomainname(buffer, 200);
],
ac_cv_func_getdomainname=yes
ac_cv_proto_getdomainname=yes,
AC_MSG_RESULT([fatal error])
AC_MSG_ERROR([getdomainname unavailable]))
fi
LIBS=$kde_safe_libs
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_proto_getdomainname)
if eval "test \"`echo $ac_cv_func_getdomainname`\" = yes"; then
AC_DEFINE(HAVE_GETDOMAINNAME, 1, [Define if you have getdomainname])
fi
if eval "test \"`echo $ac_cv_proto_getdomainname`\" = no"; then
AC_DEFINE(HAVE_GETDOMAINNAME_PROTO, 1,
[Define if you have getdomainname prototype])
fi
])
AC_DEFUN(AC_CHECK_GETHOSTNAME,
[
AC_MSG_CHECKING([for gethostname])
AC_CACHE_VAL(ac_cv_func_gethostname,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
save_CXXFLAGS="$CXXFLAGS"
if test "$GCC" = "yes"; then
CXXFLAGS="$CXXFLAGS -pedantic-errors"
fi
AC_TRY_LINK([
#include
#include
],
[
char buffer[200];
gethostname(buffer, 200);
],
ac_cv_func_gethostname=yes,
ac_cv_func_gethostname=no)
CXXFLAGS="$save_CXXFLAGS"
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_func_gethostname)
AC_MSG_CHECKING([if gethostname needs custom prototype])
AC_CACHE_VAL(ac_cv_proto_gethostname,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
ac_cv_proto_gethostname=no
else
AC_TRY_LINK([
#include
#include
extern "C" int gethostname (char *, int);
],
[
char buffer[200];
gethostname(buffer, 200);
],
ac_cv_func_gethostname=yes
ac_cv_proto_gethostname=yes,
AC_MSG_RESULT([fatal error])
AC_MSG_ERROR(gethostname unavailable))
fi
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_proto_gethostname)
if eval "test \"`echo $ac_cv_proto_gethostname`\" = no"; then
AC_DEFINE(HAVE_GETHOSTNAME_PROTO, 1,
[Define if you have gethostname prototype])
fi
if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
AC_DEFINE(HAVE_GETHOSTNAME, 1, [Define if you have gethostname])
fi
])
AC_DEFUN(AC_CHECK_USLEEP,
[
AC_MSG_CHECKING([for usleep])
AC_CACHE_VAL(ac_cv_func_usleep,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_libs_safe="$LIBS"
LIBS="$LIBS $LIBUCB"
AC_TRY_LINK([
#include
#include
],
[
usleep(200);
],
ac_cv_func_usleep=yes,
ac_cv_func_usleep=no)
LIBS="$ac_libs_safe"
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_func_usleep)
if eval "test \"`echo $ac_cv_func_usleep`\" = yes"; then
AC_DEFINE(HAVE_USLEEP, 1, [Define if you have the usleep function])
fi
])
AC_DEFUN(AC_CHECK_RANDOM,
[
AC_MSG_CHECKING([for random])
AC_CACHE_VAL(ac_cv_func_random,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_libs_safe="$LIBS"
LIBS="$LIBS $LIBUCB"
AC_TRY_LINK([
#include
],
[
random();
],
ac_cv_func_random=yes,
ac_cv_func_random=no)
LIBS="$ac_libs_safe"
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_func_random)
if eval "test \"`echo $ac_cv_func_random`\" = yes"; then
AC_DEFINE(HAVE_RANDOM, 1, [Define if you have random])
fi
])
AC_DEFUN(AC_FIND_GIF,
[AC_MSG_CHECKING([for giflib])
AC_CACHE_VAL(ac_cv_lib_gif,
[ac_save_LIBS="$LIBS"
if test "x$kde_use_qt_emb" != "xyes"; then
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
else
LIBS="$all_libraries -lgif"
fi
AC_TRY_LINK(dnl
[
#ifdef __cplusplus
extern "C" {
#endif
int GifLastError(void);
#ifdef __cplusplus
}
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
],
[return GifLastError();],
eval "ac_cv_lib_gif=yes",
eval "ac_cv_lib_gif=no")
LIBS="$ac_save_LIBS"
])dnl
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
else
AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
fi
])
AC_DEFUN(KDE_FIND_JPEG_HELPER,
[
AC_MSG_CHECKING([for libjpeg$2])
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
[
AC_LANG_C
ac_save_LIBS="$LIBS"
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK(
[/* Override any gcc2 internal prototype to avoid an error. */
struct jpeg_decompress_struct;
typedef struct jpeg_decompress_struct * j_decompress_ptr;
typedef int size_t;
#ifdef __cplusplus
extern "C" {
#endif
void jpeg_CreateDecompress(j_decompress_ptr cinfo,
int version, size_t structsize);
#ifdef __cplusplus
}
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
],
[jpeg_CreateDecompress(0L, 0, 0);],
eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
eval "ac_cv_lib_jpeg_$1=no")
LIBS="$ac_save_LIBS"
CFLAGS="$ac_save_CFLAGS"
])
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
LIBJPEG="$ac_cv_lib_jpeg_$1"
AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
else
AC_MSG_RESULT(no)
$3
fi
])
AC_DEFUN(AC_FIND_JPEG,
[
dnl first look for libraries
KDE_FIND_JPEG_HELPER(6b, 6b,
KDE_FIND_JPEG_HELPER(normal, [],
[
LIBJPEG=
]
)
)
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
dnl requires system dependent includes loaded before it)
jpeg_incdirs="/usr/include /usr/local/include $kde_extra_includes"
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
test "x$jpeg_incdir" = xNO && jpeg_incdir=
dnl if headers _and_ libraries are missing, this is no error, and we
dnl continue with a warning (the user will get no jpeg support in khtml)
dnl if only one is missing, it means a configuration error, but we still
dnl only warn
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
else
if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
AC_MSG_WARN([
There is an installation error in jpeg support. You seem to have only one
of either the headers _or_ the libraries installed. You may need to either
provide correct --with-extra-... options, or the development package of
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
Disabling JPEG support.
])
else
AC_MSG_WARN([libjpeg not found. disable JPEG support.])
fi
jpeg_incdir=
LIBJPEG=
fi
AC_SUBST(LIBJPEG)
])
AC_DEFUN(AC_FIND_ZLIB,
[
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
AC_MSG_CHECKING([for libz])
AC_CACHE_VAL(ac_cv_lib_z,
[
AC_LANG_C
kde_save_LIBS="$LIBS"
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
kde_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK(dnl
[
#include
],
[return (zlibVersion() == ZLIB_VERSION); ],
eval "ac_cv_lib_z='-lz'",
eval "ac_cv_lib_z=no")
LIBS="$kde_save_LIBS"
CFLAGS="$kde_save_CFLAGS"
])dnl
if test ! "$ac_cv_lib_z" = no; then
AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
LIBZ="$ac_cv_lib_z"
AC_SUBST(LIBZ)
AC_MSG_RESULT($ac_cv_lib_z)
else
AC_MSG_ERROR(not found. Check your installation and look into config.log)
LIBZ=""
AC_SUBST(LIBZ)
fi
])
AC_DEFUN(KDE_TRY_TIFFLIB,
[
AC_MSG_CHECKING([for libtiff $1])
AC_CACHE_VAL(kde_cv_libtiff_$1,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
kde_save_LIBS="$LIBS"
if test "x$kde_use_qt_emb" != "xyes"; then
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
else
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
fi
kde_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK(dnl
[
#include
],
[return (TIFFOpen( "", "r") == 0); ],
[
kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
], [
kde_cv_libtiff_$1=no
])
LIBS="$kde_save_LIBS"
CXXFLAGS="$kde_save_CXXFLAGS"
AC_LANG_RESTORE
])
if test "$kde_cv_libtiff_$1" = "no"; then
AC_MSG_RESULT(no)
LIBTIFF=""
$3
else
LIBTIFF="$kde_cv_libtiff_$1"
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
$2
fi
])
AC_DEFUN(AC_FIND_TIFF,
[
AC_REQUIRE([K_PATH_X])
AC_REQUIRE([AC_FIND_ZLIB])
AC_REQUIRE([AC_FIND_JPEG])
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
KDE_TRY_TIFFLIB(tiff, [],
KDE_TRY_TIFFLIB(tiff34))
AC_SUBST(LIBTIFF)
])
AC_DEFUN(AC_FIND_PNG,
[
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
AC_REQUIRE([AC_FIND_ZLIB])
AC_MSG_CHECKING([for libpng])
AC_CACHE_VAL(ac_cv_lib_png,
[
kde_save_LIBS="$LIBS"
if test "x$kde_use_qt_emb" != "xyes"; then
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
else
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
fi
kde_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
AC_LANG_C
AC_TRY_LINK(dnl
[
#include
],
[
png_structp png_ptr = png_create_read_struct( /* image ptr */
PNG_LIBPNG_VER_STRING, 0, 0, 0 );
return( png_ptr != 0 );
],
eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
eval "ac_cv_lib_png=no"
)
LIBS="$kde_save_LIBS"
CFLAGS="$kde_save_CFLAGS"
])dnl
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
LIBPNG="$ac_cv_lib_png"
AC_SUBST(LIBPNG)
AC_MSG_RESULT($ac_cv_lib_png)
else
AC_MSG_RESULT(no)
LIBPNG=""
AC_SUBST(LIBPNG)
fi
])
AC_DEFUN(AC_CHECK_BOOL,
[
AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
])
AC_DEFUN(AC_CHECK_GNU_EXTENSIONS,
[
AC_MSG_CHECKING(if you need GNU extensions)
AC_CACHE_VAL(ac_cv_gnu_extensions,
[
cat > conftest.c << EOF
#include
#ifdef __GNU_LIBRARY__
yes
#endif
EOF
if (eval "$ac_cpp conftest.c") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_gnu_extensions=yes
else
ac_cv_gnu_extensions=no
fi
])
AC_MSG_RESULT($ac_cv_gnu_extensions)
if test "$ac_cv_gnu_extensions" = "yes"; then
AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
fi
])
AC_DEFUN(KDE_CHECK_COMPILER_FLAG,
[
AC_MSG_CHECKING(whether $CXX supports -$1)
kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -$1"
AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
CXXFLAGS="$save_CXXFLAGS"
AC_LANG_RESTORE
])
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
AC_MSG_RESULT(yes)
:
$2
else
AC_MSG_RESULT(no)
:
$3
fi
])
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
dnl it's all white-space separated
AC_DEFUN(AC_REMOVE_FORBIDDEN,
[ __val=$$1
__forbid=" $2 "
if test -n "$__val"; then
__new=""
ac_save_IFS=$IFS
IFS=" "
for i in $__val; do
case "$__forbid" in
*" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
*) # Careful to not add spaces, where there were none, because otherwise
# libtool gets confused, if we change e.g. CXX
if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
esac
done
IFS=$ac_save_IFS
$1=$__new
fi
])
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
AC_DEFUN(AC_VALIDIFY_CXXFLAGS,
[dnl
if test "x$kde_use_qt_emb" != "xyes"; then
AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
else
AC_REMOVE_FORBIDDEN(CXX, [-rpath])
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
fi
])
AC_DEFUN(AC_CHECK_COMPILERS,
[
AC_ARG_ENABLE(debug,[ --enable-debug[=ARG] enables debug symbols (yes|no|full) [default=no]],
[
case $enableval in
yes)
kde_use_debug_code="yes"
kde_use_debug_define=no
;;
full)
kde_use_debug_code="full"
kde_use_debug_define=no
;;
*)
kde_use_debug_code="no"
kde_use_debug_define=yes
;;
esac
],
[kde_use_debug_code="no"
kde_use_debug_define=no
])
dnl Just for configure --help
AC_ARG_ENABLE(dummyoption,[ --disable-debug disables debug output and debug symbols [default=no]],[],[])
AC_ARG_ENABLE(strict,[ --enable-strict compiles with strict compiler options (may not work!)],
[
if test $enableval = "no"; then
kde_use_strict_options="no"
else
kde_use_strict_options="yes"
fi
], [kde_use_strict_options="no"])
AC_ARG_ENABLE(warnings,[ --enable-warnings compiles with -Wall and similiar],
[
if test $enableval = "no"; then
kde_use_warnings="no"
else
kde_use_warnings="yes"
fi
], [kde_use_warnings="no"])
dnl enable warnings for debug build
if test "$kde_use_debug_code" != "no"; then
kde_use_warnings=yes
fi
AC_ARG_ENABLE(profile,[ --enable-profile creates profiling infos [default=no]],
[kde_use_profiling=$enableval],
[kde_use_profiling="no"]
)
dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
CFLAGS=" $CFLAGS"
AC_PROG_CC
AC_PROG_CPP
if test "$GCC" = "yes"; then
if test "$kde_use_debug_code" != "no"; then
if test $kde_use_debug_code = "full"; then
CFLAGS="-g3 $CFLAGS"
else
CFLAGS="-g -O2 $CFLAGS"
fi
else
CFLAGS="-O2 $CFLAGS"
fi
fi
if test "$kde_use_debug_define" = "yes"; then
CFLAGS="-DNDEBUG $CFLAGS"
fi
case "$host" in
*-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
*-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
esac
if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
LDFLAGS=""
fi
CXXFLAGS=" $CXXFLAGS"
AC_PROG_CXX
if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
if test "$kde_use_debug_code" != "no"; then
if test "$CXX" = "KCC"; then
CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
else
if test "$kde_use_debug_code" = "full"; then
CXXFLAGS="-g3 $CXXFLAGS"
else
CXXFLAGS="-g -O2 $CXXFLAGS"
fi
fi
KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
dnl convenience compiler flags
KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
AC_SUBST(WOVERLOADED_VIRTUAL)
else
if test "$CXX" = "KCC"; then
CXXFLAGS="+K3 $CXXFLAGS"
else
CXXFLAGS="-O2 $CXXFLAGS"
fi
fi
fi
if test "$kde_use_debug_define" = "yes"; then
CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
fi
if test "$kde_use_profiling" = "yes"; then
KDE_CHECK_COMPILER_FLAG(pg,
[
CFLAGS="-pg $CFLAGS"
CXXFLAGS="-pg $CXXFLAGS"
])
fi
if test "$kde_use_warnings" = "yes"; then
if test "$GCC" = "yes"; then
case $host in
*-*-linux-gnu)
CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion $CXXFLAGS"
;;
esac
CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
KDE_CHECK_COMPILER_FLAG(Wbad-function-cast,[CXXFLAGS="-Wbad-function-cast $CXXFLAGS"])
KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
fi
fi
if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then
CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
fi
if test "$GXX" = "yes"; then
KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
fi
if test "$CXX" = "KCC"; then
dnl unfortunately we currently cannot disable exception support in KCC
dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= )
AC_ARG_ENABLE(pch,[ --enable-pch enables precompiled header support (currently only KCC) [default=no]],
[
kde_use_pch=$enableval
],[kde_use_pch=no])
if test "$kde_use_pch" = "yes"; then
dnl TODO: support --pch-dir!
KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
dnl the below works (but the dir must exist), but it's
dnl useless for a whole package.
dnl The are precompiled headers for each source file, so when compiling
dnl from scratch, it doesn't make a difference, and they take up
dnl around ~5Mb _per_ sourcefile.
dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
fi
dnl this flag controls inlining. by default KCC inlines in optimisation mode
dnl all implementations that are defined inside the class {} declaration.
dnl because of templates-compatibility with broken gcc compilers, this
dnl can cause excessive inlining. This flag limits it to a sane level
KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
dnl Some source files are shared between multiple executables
dnl (or libraries) and some of those need template instantiations.
dnl In that case KCC needs to compile those sources with
dnl --one_instantiation_per_object. To make it easy for us we compile
dnl _all_ objects with that flag (--one_per is a shorthand).
KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
fi
AC_SUBST(USE_EXCEPTIONS)
dnl obsolete macro - provided to keep things going
USE_RTTI=
AC_SUBST(USE_RTTI)
case "$host" in
*-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
*-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
*-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
*-*-solaris*)
if test "$GXX" = yes; then
libstdcpp=`$CXX -print-file-name=libstdc++.so`
if test ! -f $libstdcpp; then
AC_MSG_ERROR([You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so])
fi
fi
;;
esac
AC_VALIDIFY_CXXFLAGS
AC_PROG_CXXCPP
# the following is to allow programs, that are known to
# have problems when compiled with -O2
if test -n "$CXXFLAGS"; then
kde_safe_IFS=$IFS
IFS=" "
NOOPT_CXXFLAGS=""
for i in $CXXFLAGS; do
case $i in
-O*)
;;
*)
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS $i"
;;
esac
done
IFS=$kde_safe_IFS
fi
if test -n "$CFLAGS"; then
kde_safe_IFS=$IFS
IFS=" "
NOOPT_CFLAGS=""
for i in $CFLAGS; do
case $i in
-O*)
;;
*)
NOOPT_CFLAGS="$NOOPT_CFLAGS $i"
;;
esac
done
IFS=$kde_safe_IFS
fi
if test "x$kde_use_qt_emb" = "xyes"; then
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS -fno-rtti -DQWS"
fi
AC_SUBST(NOOPT_CXXFLAGS)
AC_SUBST(NOOPT_CFLAGS)
KDE_CHECK_FINAL
ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
KDE_CXXFLAGS=
AC_SUBST(KDE_CXXFLAGS)
])
AC_DEFUN(KDE_ADD_DEPENDENCIES,
[
[A]M_DEPENDENCIES(CC)
[A]M_DEPENDENCIES(CXX)
])
dnl just a wrapper to clean up configure.in
AC_DEFUN(KDE_PROG_LIBTOOL,
[
AC_REQUIRE([AC_CHECK_COMPILERS])
AC_REQUIRE([AC_ENABLE_SHARED])
AC_REQUIRE([AC_ENABLE_STATIC])
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
AC_LANG_SAVE
AC_LANG_C
AC_OBJEXT
AC_EXEEXT
AC_LANG_RESTORE
AM_PROG_LIBTOOL
AC_LIBTOOL_CXX
LIBTOOL_SHELL="/bin/sh ./libtool"
# LIBTOOL="$LIBTOOL --silent"
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
AC_SUBST(KDE_PLUGIN)
])
AC_DEFUN(KDE_CHECK_TYPES,
[ AC_CHECK_SIZEOF(int, 4)dnl
AC_CHECK_SIZEOF(long, 4)dnl
AC_CHECK_SIZEOF(char *, 4)dnl
AC_CHECK_SIZEOF(char, 1)dnl
])dnl
AC_DEFUN(KDE_DO_IT_ALL,
[
AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM
AM_INIT_AUTOMAKE($1, $2)
AM_DISABLE_LIBRARIES
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
AC_CHECK_COMPILERS
KDE_PROG_LIBTOOL
AM_KDE_WITH_NLS
AC_PATH_KDE
])
AC_DEFUN(AC_CHECK_RPATH,
[
AC_MSG_CHECKING(for rpath)
AC_ARG_ENABLE(rpath,
[ --disable-rpath do not use the rpath feature of ld],
USE_RPATH=$enableval, USE_RPATH=yes)
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
KDE_RPATH="-R \$(kde_libraries)"
if test -n "$qt_libraries"; then
KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
fi
dnl $x_libraries is set to /usr/lib in case
if test -n "$X_LDFLAGS"; then
KDE_RPATH="$KDE_RPATH -R \$(x_libraries)"
fi
if test -n "$KDE_EXTRA_RPATH"; then
KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
fi
fi
AC_SUBST(KDE_EXTRA_RPATH)
AC_SUBST(KDE_RPATH)
AC_MSG_RESULT($USE_RPATH)
])
dnl Check for the type of the third argument of getsockname
AC_DEFUN(AC_CHECK_SOCKLEN_T, [
AC_MSG_CHECKING(for socklen_t)
AC_CACHE_VAL(ac_cv_socklen_t, [
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([
#include
#include
],[
socklen_t a=0;
getsockname(0,(struct sockaddr*)0, &a);
],
ac_cv_socklen_t=socklen_t,
AC_TRY_COMPILE([
#include
#include
],[
int a=0;
getsockname(0,(struct sockaddr*)0, &a);
],
ac_cv_socklen_t=int,
ac_cv_socklen_t=size_t
)
)
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_socklen_t)
if test "$ac_cv_socklen_t" != "socklen_t"; then
AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
[Define the real type of socklen_t])
fi
AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
])
dnl This is a merge of some macros out of the gettext aclocal.m4
dnl since we don't need anything, I took the things we need
dnl the copyright for them is:
dnl >
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
dnl This Makefile.in is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE.
dnl >
dnl for this file it is relicensed under LGPL
AC_DEFUN(AM_KDE_WITH_NLS,
[
dnl If we use NLS figure out what method
AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
[test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
GMSGFMT=":"
fi
MSGFMT=$GMSGFMT
AC_SUBST(GMSGFMT)
AC_SUBST(MSGFMT)
AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
dnl Test whether we really found GNU xgettext.
if test "$XGETTEXT" != ":"; then
dnl If it is no GNU xgettext we define it as : so that the
dnl Makefiles still can work.
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
: ;
else
AC_MSG_RESULT(
[found xgettext programs is not GNU xgettext; ignore it])
XGETTEXT=":"
fi
fi
AC_SUBST(XGETTEXT)
])
# Search path for a program which passes the given test.
# Ulrich Drepper , 1996.
# serial 1
# Stephan Kulow: I appended a _KDE against name conflicts
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
AC_DEFUN(AM_PATH_PROG_WITH_TEST_KDE,
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
AC_MSG_CHECKING([for $ac_word])
AC_CACHE_VAL(ac_cv_path_$1,
[case "[$]$1" in
/*)
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in ifelse([$5], , $PATH, [$5]); do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if [$3]; then
ac_cv_path_$1="$ac_dir/$ac_word"
break
fi
fi
done
IFS="$ac_save_ifs"
dnl If no 4th arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
])dnl
;;
esac])dnl
$1="$ac_cv_path_$1"
if test -n "[$]$1"; then
AC_MSG_RESULT([$]$1)
else
AC_MSG_RESULT(no)
fi
AC_SUBST($1)dnl
])
# Check whether LC_MESSAGES is available in .
# Ulrich Drepper , 1995.
# serial 1
AC_DEFUN(AM_LC_MESSAGES,
[if test $ac_cv_header_locale_h = yes; then
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include ], [return LC_MESSAGES],
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
if test $am_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
fi
fi])
dnl From Jim Meyering.
dnl FIXME: migrate into libit.
AC_DEFUN([AM_FUNC_OBSTACK],
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
[AC_TRY_LINK([#include "obstack.h"],
[struct obstack *mem;obstack_free(mem,(char *) 0)],
am_cv_func_obstack=yes,
am_cv_func_obstack=no)])
if test $am_cv_func_obstack = yes; then
AC_DEFINE(HAVE_OBSTACK)
else
LIBOBJS="$LIBOBJS obstack.o"
fi
])
dnl From Jim Meyering. Use this if you use the GNU error.[ch].
dnl FIXME: Migrate into libit
AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
[AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
am_cv_lib_error_at_line=yes,
am_cv_lib_error_at_line=no)])
if test $am_cv_lib_error_at_line = no; then
LIBOBJS="$LIBOBJS error.o"
fi
AC_SUBST(LIBOBJS)dnl
])
# Macro to add for using GNU gettext.
# Ulrich Drepper , 1995.
# serial 1
# Stephan Kulow: I put a KDE in it to avoid name conflicts
AC_DEFUN(AM_KDE_GNU_GETTEXT,
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
AC_REQUIRE([AC_TYPE_OFF_T])dnl
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
AC_REQUIRE([AC_FUNC_MMAP])dnl
AC_REQUIRE([AM_KDE_WITH_NLS])dnl
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h string.h values.h alloca.h])
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
__argz_count __argz_stringify __argz_next])
AC_MSG_CHECKING(for stpcpy)
AC_CACHE_VAL(kde_cv_func_stpcpy,
[
kde_safe_cxxflags=$CXXFLAGS
CXXFLAGS="-Wmissing-prototypes -Werror"
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([
#include
],
[
char buffer[200];
stpcpy(buffer, buffer);
],
kde_cv_func_stpcpy=yes,
kde_cv_func_stpcpy=no)
AC_LANG_RESTORE
CXXFLAGS=$kde_safe_cxxflags
])
AC_MSG_RESULT($kde_cv_func_stpcpy)
if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
fi
AM_LC_MESSAGES
if test "x$CATOBJEXT" != "x"; then
if test "x$ALL_LINGUAS" = "x"; then
LINGUAS=
else
AC_MSG_CHECKING(for catalogs to be installed)
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
esac
done
LINGUAS=$NEW_LINGUAS
AC_MSG_RESULT($LINGUAS)
fi
dnl Construct list of names of catalog files to be constructed.
if test -n "$LINGUAS"; then
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
fi
fi
])
AC_DEFUN(AC_HAVE_XPM,
[AC_REQUIRE_CPP()dnl
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
test -z "$XPM_INCLUDE" && XPM_INCLUDE=
AC_ARG_WITH(xpm, [ --without-xpm disable color pixmap XPM tests],
xpm_test=$withval, xpm_test="yes")
if test "x$xpm_test" = xno; then
ac_cv_have_xpm=no
else
AC_MSG_CHECKING(for XPM)
AC_CACHE_VAL(ac_cv_have_xpm,
[
AC_LANG_C
ac_save_ldflags="$LDFLAGS"
ac_save_cflags="$CFLAGS"
if test "x$kde_use_qt_emb" != "xyes"; then
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
else
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
fi
CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
AC_TRY_LINK([#include ],[],
ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
LDFLAGS="$ac_save_ldflags"
CFLAGS="$ac_save_cflags"
])dnl
if test "$ac_cv_have_xpm" = no; then
AC_MSG_RESULT(no)
XPM_LDFLAGS=""
XPMINC=""
$2
else
AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
if test "$XPM_LDFLAGS" = ""; then
XPMLIB='-lXpm $(LIB_X11)'
else
XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
fi
if test "$XPM_INCLUDE" = ""; then
XPMINC=""
else
XPMINC="-I$XPM_INCLUDE"
fi
AC_MSG_RESULT(yes)
$1
fi
fi
AC_SUBST(XPMINC)
AC_SUBST(XPMLIB)
])
AC_DEFUN(AC_HAVE_DPMS,
[AC_REQUIRE_CPP()dnl
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
DPMS_LIB=
AC_ARG_WITH(dpms, [ --without-dpms disable DPMS power saving],
dpms_test=$withval, dpms_test="yes")
if test "x$dpms_test" = xno; then
ac_cv_have_dpms=no
else
AC_MSG_CHECKING(for DPMS)
dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
AC_CACHE_VAL(ac_cv_have_dpms,
[
if test "x$kde_use_qt_emb" = "xyes"; then
AC_MSG_RESULT(no)
ac_cv_have_dpms="no"
else
AC_LANG_C
ac_save_ldflags="$LDFLAGS"
ac_save_cflags="$CFLAGS"
ac_save_libs="$LIBS"
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
CFLAGS="$CFLAGS $X_INCLUDES"
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
AC_TRY_LINK([
#include
#include
#include
#include
int foo_test_dpms()
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
ac_cv_have_dpms="yes", [
LDFLAGS="$ac_save_ldflags"
CFLAGS="$ac_save_cflags"
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
LIBS="$LIBS -lXdpms"
CFLAGS="$CFLAGS $X_INCLUDES"
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
AC_TRY_LINK([
#include
#include
#include
#include
int foo_test_dpms()
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
[
ac_cv_have_dpms="-lXdpms"
],ac_cv_have_dpms="no")
])
LDFLAGS="$ac_save_ldflags"
CFLAGS="$ac_save_cflags"
LIBS="$ac_save_libs"
fi
])dnl
if test "$ac_cv_have_dpms" = no; then
AC_MSG_RESULT(no)
DPMS_LDFLAGS=""
DPMSINC=""
$2
else
AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
if test "$ac_cv_have_dpms" = "-lXdpms"; then
DPMS_LIB="-lXdpms"
fi
if test "$DPMS_LDFLAGS" = ""; then
DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
else
DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
fi
if test "$DPMS_INCLUDE" = ""; then
DPMSINC=""
else
DPMSINC="-I$DPMS_INCLUDE"
fi
AC_MSG_RESULT(yes)
$1
fi
fi
AC_SUBST(DPMSINC)
AC_SUBST(DPMSLIB)
])
AC_DEFUN(AC_HAVE_GL,
[AC_REQUIRE_CPP()dnl
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
test -z "$GL_LDFLAGS" && GL_LDFLAGS=
test -z "$GL_INCLUDE" && GL_INCLUDE=
AC_ARG_WITH(gl, [ --without-gl disable 3D GL modes],
gl_test=$withval, gl_test="yes")
if test "x$kde_use_qt_emb" = "xyes"; then
# GL and Qt Embedded is a no-go for now.
ac_cv_have_gl=no
elif test "x$gl_test" = xno; then
ac_cv_have_gl=no
else
AC_MSG_CHECKING(for GL)
AC_CACHE_VAL(ac_cv_have_gl,
[
AC_LANG_C
ac_save_ldflags="$LDFLAGS"
ac_save_cflags="$CFLAGS"
LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
CFLAGS="$CFLAGS $X_INCLUDES"
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
AC_TRY_LINK([#include
#include
], [],
ac_cv_have_gl="mesa", ac_cv_have_gl="no")
if test "x$ac_cv_have_gl" = "xno"; then
LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGL -lGLU"
test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
CFLAGS="$ac_save_cflags $X_INCLUDES"
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
AC_TRY_LINK([#include
#include
], [],
ac_cv_have_gl="yes", ac_cv_have_gl="no")
fi
LDFLAGS="$ac_save_ldflags"
CFLAGS="$ac_save_cflags"
])dnl
if test "$ac_cv_have_gl" = "no"; then
AC_MSG_RESULT(no)
GL_LDFLAGS=""
GLINC=""
$2
else
AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
if test "$GL_LDFLAGS" = ""; then
if test "$ac_cv_have_gl" = "mesa"; then
GLLIB='-lMesaGL -lMesaGLU $(LIB_X11)'
else
GLLIB='-lGL -lGLU $(LIB_X11)'
fi
else
if test "$ac_cv_have_gl" = "mesa"; then
GLLIB="$GL_LDFLAGS -lMesaGL -lMesaGLU "'$(LIB_X11)'
else
GLLIB="$GL_LDFLAGS -lGL -lGLU "'$(LIB_X11)'
fi
fi
if test "$GL_INCLUDE" = ""; then
GLINC=""
else
GLINC="-I$GL_INCLUDE"
fi
AC_MSG_RESULT($ac_cv_have_gl)
$1
fi
fi
AC_SUBST(GLINC)
AC_SUBST(GLLIB)
])
dnl shadow password and PAM magic - maintained by ossi@kde.org
AC_DEFUN(KDE_PAM, [
AC_REQUIRE([KDE_CHECK_LIBDL])
AC_ARG_WITH(pam,
[ --with-pam[=ARG] enable support for PAM: ARG=[yes|no|service name]],
[ if test "x$withval" = "xyes"; then
use_pam=yes
pam_service=kde
elif test "x$withval" = "xno"; then
use_pam=no
else
use_pam=yes
pam_service=$withval
fi
ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
], [
AC_CACHE_VAL(ac_cv_path_pam,
[ use_pam=no
AC_CHECK_LIB(pam, pam_start,
[ AC_CHECK_HEADER(security/pam_appl.h,
[ use_pam=yes
pam_service=kde ])
], , $LIBDL)
ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
])
])
eval "$ac_cv_path_pam"
AC_MSG_CHECKING(for PAM)
if test "x$use_pam" = xno; then
AC_MSG_RESULT(no)
PAMLIBS=""
else
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
dnl test whether struct pam_message is const (Linux) or not (Sun)
AC_MSG_CHECKING(for const pam_message)
AC_EGREP_HEADER([struct pam_message], security/pam_appl.h,
[ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h,
[AC_MSG_RESULT([const: Linux-type PAM])],
[AC_MSG_RESULT([nonconst: Sun-type PAM])
AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
)],
[AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
fi
AC_SUBST(PAMLIBS)
])
dnl DEF_PAM_SERVICE(arg name, full name, define name)
AC_DEFUN(DEF_PAM_SERVICE, [
AC_ARG_WITH($1-pam,
[ --with-$1-pam=[val] override PAM service from --with-pam for $2],
[ if test "x$use_pam" = xyes; then
$3_PAM_SERVICE="$withval"
else
AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
You may want to enforce it by using --with-pam.])
fi
],
[ if test "x$use_pam" = xyes; then
$3_PAM_SERVICE="$pam_service"
fi
])
if test -n "$$3_PAM_SERVICE"; then
AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
fi
AC_SUBST($3_PAM_SERVICE)
])
AC_DEFUN(KDE_SHADOWPASSWD, [
AC_REQUIRE([KDE_PAM])
AC_CHECK_LIB(shadow, getspent,
[ LIBSHADOW="-lshadow"
ac_use_shadow=yes
],
[ dnl for UnixWare
AC_CHECK_LIB(gen, getspent,
[ LIBGEN="-lgen"
ac_use_shadow=yes
],
[ AC_CHECK_FUNC(getspent,
[ ac_use_shadow=yes ],
[ ac_use_shadow=no ])
])
])
AC_SUBST(LIBSHADOW)
AC_SUBST(LIBGEN)
AC_MSG_CHECKING([for shadow passwords])
AC_ARG_WITH(shadow,
[ --with-shadow If you want shadow password support ],
[ if test "x$withval" != "xno"; then
use_shadow=yes
else
use_shadow=no
fi
], [
use_shadow="$ac_use_shadow"
])
if test "x$use_shadow" = xyes; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
else
AC_MSG_RESULT(no)
LIBSHADOW=
LIBGEN=
fi
dnl finally make the relevant binaries setuid root, if we have shadow passwds.
dnl this still applies, if we could use it indirectly through pam.
if test "x$use_shadow" = xyes ||
( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
case $host in
*-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
SETUIDFLAGS="-m 4755 -o root";;
*)
SETUIDFLAGS="-m 4755";;
esac
fi
AC_SUBST(SETUIDFLAGS)
])
AC_DEFUN(KDE_PASSWDLIBS, [
AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
AC_REQUIRE([KDE_PAM])
AC_REQUIRE([KDE_SHADOWPASSWD])
if test "x$use_pam" = "xyes"; then
PASSWDLIBS="$PAMLIBS"
else
PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
fi
dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires
dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
dnl may need to read /etc/master.passwd).
case $host in
*-*-freebsd*)
SETUIDFLAGS="-m 4755 -o root"
;;
*)
;;
esac
AC_SUBST(PASSWDLIBS)
])
AC_DEFUN(KDE_CHECK_LIBDL,
[
AC_CHECK_LIB(dl, dlopen, [
LIBDL="-ldl"
ac_cv_have_dlfcn=yes
])
AC_CHECK_LIB(dld, shl_unload, [
LIBDL="-ldld"
ac_cv_have_shload=yes
])
AC_SUBST(LIBDL)
])
AC_DEFUN(KDE_CHECK_DLOPEN,
[
KDE_CHECK_LIBDL
AC_CHECK_HEADERS(dlfcn.h dl.h)
if test "$ac_cv_header_dlfcn_h" = "no"; then
ac_cv_have_dlfcn=no
fi
if test "$ac_cv_header_dl_h" = "no"; then
ac_cv_have_shload=no
fi
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
dnl (MM)
AC_ARG_ENABLE(dlopen,
[ --disable-dlopen link statically [default=no]] ,
enable_dlopen=$enableval,
enable_dlopen=yes)
# override the user's opinion, if we know it better ;)
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
enable_dlopen=no
fi
if test "$ac_cv_have_dlfcn" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
fi
if test "$ac_cv_have_shload" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
fi
if test "$enable_dlopen" = no ; then
test -n "$1" && eval $1
else
test -n "$2" && eval $2
fi
])
AC_DEFUN(KDE_CHECK_DYNAMIC_LOADING,
[
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
KDE_PROG_LIBTOOL
AC_MSG_CHECKING([dynamic loading])
eval "`egrep '^build_libtool_libs=' libtool`"
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
dynamic_loading=yes
AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
else
dynamic_loading=no
fi
AC_MSG_RESULT($dynamic_loading)
if test "$dynamic_loading" = "yes"; then
$1
else
$2
fi
])
AC_DEFUN(KDE_ADD_INCLUDES,
[
if test -z "$1"; then
test_include="Pix.h"
else
test_include="$1"
fi
AC_MSG_CHECKING([for libg++ ($test_include)])
AC_CACHE_VAL(kde_cv_libgpp_includes,
[
kde_cv_libgpp_includes=no
for ac_dir in \
\
/usr/include/g++ \
/usr/include \
/usr/unsupported/include \
/opt/include \
$extra_include \
; \
do
if test -r "$ac_dir/$test_include"; then
kde_cv_libgpp_includes=$ac_dir
break
fi
done
])
AC_MSG_RESULT($kde_cv_libgpp_includes)
if test "$kde_cv_libgpp_includes" != "no"; then
all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
fi
])
])
AC_DEFUN(KDE_CHECK_MICO,
[
AC_REQUIRE([KDE_CHECK_LIBDL])
AC_REQUIRE([KDE_MISC_TESTS])
AC_MSG_CHECKING(for MICO)
if test -z "$MICODIR"; then
kde_micodir=/usr/local
else
kde_micodir="$MICODIR"
fi
AC_ARG_WITH(micodir,
[ --with-micodir=micodir where mico is installed ],
kde_micodir=$withval,
kde_micodir=$kde_micodir
)
AC_CACHE_VAL(kde_cv_mico_incdir,
[
mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
])
kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
if test ! -r $kde_micodir/include/CORBA.h; then
AC_MSG_ERROR([No CORBA.h found, specify another micodir])
fi
AC_MSG_RESULT($kde_micodir)
MICO_INCLUDES=-I$kde_micodir/include
AC_SUBST(MICO_INCLUDES)
MICO_LDFLAGS=-L$kde_micodir/lib
AC_SUBST(MICO_LDFLAGS)
micodir=$kde_micodir
AC_SUBST(micodir)
AC_MSG_CHECKING([for MICO version])
AC_CACHE_VAL(kde_cv_mico_version,
[
AC_LANG_C
cat >conftest.$ac_ext <
#include
int main() {
printf("MICO_VERSION=%s\n",MICO_VERSION);
return (0);
}
EOF
ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
if AC_TRY_EVAL(ac_compile); then
if eval `./conftest 2>&5`; then
kde_cv_mico_version=$MICO_VERSION
else
AC_MSG_ERROR([your system is not able to execute a small application to
find MICO version! Check $kde_micodir/include/mico/version.h])
fi
else
AC_MSG_ERROR([your system is not able to compile a small application to
find MICO version! Check $kde_micodir/include/mico/version.h])
fi
])
dnl installed MICO version
mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
if test "x$1" = "x"; then
req_version="2.3.0"
else
req_version=$1
fi
dnl required MICO version
req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
if test "$mico_v_maj" -lt "$req_v_maj" || \
( test "$mico_v_maj" -eq "$req_v_maj" && \
test "$mico_v_mid" -lt "$req_v_mid" ) || \
( test "$mico_v_mid" -eq "$req_v_mid" && \
test "$mico_v_min" -lt "$req_v_min" )
then
AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
at least is required. You should upgrade MICO.])
else
AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
fi
LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
AC_SUBST(LIBMICO)
if test -z "$IDL"; then
IDL='$(kde_bindir)/cuteidl'
fi
AC_SUBST(IDL)
IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
AC_SUBST(IDL_DEPENDENCIES)
idldir="\$(includedir)/idl"
AC_SUBST(idldir)
])
AC_DEFUN(KDE_CHECK_MINI_STL,
[
AC_REQUIRE([KDE_CHECK_MICO])
AC_MSG_CHECKING(if we use mico's mini-STL)
AC_CACHE_VAL(kde_cv_have_mini_stl,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
kde_save_cxxflags="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
AC_TRY_COMPILE(
[
#include
],
[
#ifdef HAVE_MINI_STL
#error "nothing"
#endif
],
kde_cv_have_mini_stl=no,
kde_cv_have_mini_stl=yes)
CXXFLAGS="$kde_save_cxxflags"
AC_LANG_RESTORE
])
if test "x$kde_cv_have_mini_stl" = "xyes"; then
AC_MSG_RESULT(yes)
$1
else
AC_MSG_RESULT(no)
$2
fi
])
])
AC_DEFUN(KDE_CHECK_LIBPTHREAD,
[
AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
AC_SUBST(LIBPTHREAD)
])
AC_DEFUN(KDE_CHECK_PTHREAD_OPTION,
[
AC_ARG_ENABLE(kernel-threads, [ --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.],
kde_use_kernthreads=$enableval, kde_use_kernthreads=no)
if test "$kde_use_kernthreads" = "yes"; then
ac_save_CXXFLAGS="$CXXFLAGS"
ac_save_CFLAGS="$CXXFLAGS"
CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h)
CXXFLAGS="$ac_save_CXXFLAGS"
CFLAGS="$ac_save_CFLAGS"
if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
kde_use_kernthreads=no
else
dnl Add proper -I and -l statements
AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD
if test "x$LIBPTHREAD" = "x"; then
kde_use_kernthreads=no
else
USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
fi
fi
else
USE_THREADS=""
if test -z "$LIBPTHREAD"; then
KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] )
fi
fi
case $host_os in
solaris*)
KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
;;
freebsd*)
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
;;
aix*)
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
LIBPTHREAD="$LIBPTHREAD -lc_r"
;;
linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
if test "$CXX" = "KCC"; then
CXXFLAGS="$CXXFLAGS --thread_safe"
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
fi
;;
*)
;;
esac
AC_SUBST(USE_THREADS)
AC_SUBST(LIBPTHREAD)
])
AC_DEFUN(KDE_CHECK_THREADING,
[
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
dnl default is yes if libpthread is found and no if no libpthread is available
if test -z "$LIBPTHREAD"; then
if test -z "$USE_THREADS"; then
kde_check_threading_default=no
else
kde_check_threading_default=yes
fi
else
kde_check_threading_default=yes
fi
AC_ARG_ENABLE(threading, [ --disable-threading disables threading even if libpthread found ],
kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
if test "x$kde_use_threading" = "xyes"; then
AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
fi
])
AC_DEFUN(KDE_TRY_LINK_PYTHON,
[
if test "$kde_python_link_found" = no; then
if test "$1" = normal; then
AC_MSG_CHECKING(if a Python application links)
else
AC_MSG_CHECKING(if Python depends on $2)
fi
AC_CACHE_VAL(kde_cv_try_link_python_$1,
[
AC_LANG_SAVE
AC_LANG_C
kde_save_cflags="$CFLAGS"
CFLAGS="$CFLAGS $PYTHONINC"
kde_save_libs="$LIBS"
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
kde_save_ldflags="$LDFLAGS"
LDFLAGS="$LDFLAGS $PYTHONLIB"
AC_TRY_LINK(
[
#include
],[
PySys_SetArgv(1, 0);
],
[kde_cv_try_link_python_$1=yes],
[kde_cv_try_link_python_$1=no]
)
CFLAGS="$kde_save_cflags"
LIBS="$kde_save_libs"
LDFLAGS="$kde_save_ldflags"
])
if test "$kde_cv_try_link_python_$1" = "yes"; then
AC_MSG_RESULT(yes)
kde_python_link_found=yes
if test ! "$1" = normal; then
LIBPYTHON="$LIBPYTHON $2"
fi
$3
else
AC_MSG_RESULT(no)
$4
fi
AC_LANG_RESTORE
fi
])
AC_DEFUN(KDE_CHECK_PYTHON_DIR,
[
AC_MSG_CHECKING([for Python directory])
AC_CACHE_VAL(kde_cv_pythondir,
[
if test -z "$PYTHONDIR"; then
kde_cv_pythondir=/usr/local
else
kde_cv_pythondir="$PYTHONDIR"
fi
])
AC_ARG_WITH(pythondir,
[ --with-pythondir=pythondir use python installed in pythondir ],
[
ac_python_dir=$withval
], ac_python_dir=$kde_cv_pythondir
)
AC_MSG_RESULT($ac_python_dir)
])
AC_DEFUN(KDE_CHECK_PYTHON_INTERN,
[
AC_REQUIRE([KDE_CHECK_LIBDL])
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
if test -z "$1"; then
version="1.5"
else
version="$1"
fi
AC_MSG_CHECKING([for Python$version])
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
if test ! -r $python_incdir/Python.h; then
AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
python_incdir=$python_incdir/python$version
if test ! -r $python_incdir/Python.h; then
python_incdir=no
fi
fi
PYTHONINC=-I$python_incdir
python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
if test ! -r $python_libdir/libpython$version.a; then
AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
python_libdir=$python_libdir/python$version/config
if test ! -r $python_libdir/libpython$version.a; then
python_libdir=no
fi
fi
PYTHONLIB=-L$python_libdir
kde_orig_LIBPYTHON=$LIBPYTHON
if test -z "$LIBPYTHON"; then
LIBPYTHON=-lpython$version
fi
python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
python_moddir=$python_moddir/python$version
if test ! -r $python_moddir/copy.py; then
python_moddir=no
fi
PYTHONMODDIR=$python_moddir
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then
LIBPYTHON=$kde_orig_LIBPYTHON
test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
$2
else
dnl Note: this test is very weak
kde_python_link_found=no
KDE_TRY_LINK_PYTHON(normal)
KDE_TRY_LINK_PYTHON(m, -lm)
KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
KDE_TRY_LINK_PYTHON(tcl, -ltcl)
KDE_TRY_LINK_PYTHON(db2, -ldb2)
KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
[AC_MSG_WARN([it seems, Python depends on another library.
Pleae set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
and contact the authors to let them know about this problem])
])
LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
AC_SUBST(PYTHONINC)
AC_SUBST(PYTHONLIB)
AC_SUBST(LIBPYTHON)
AC_SUBST(PYTHONMODDIR)
AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
fi
])
AC_DEFUN(KDE_CHECK_PYTHON,
[
KDE_CHECK_PYTHON_INTERN("2.1", [KDE_CHECK_PYTHON_INTERN("2.0",
[ KDE_CHECK_PYTHON_INTERN($1, $2) ])
])
])
AC_DEFUN(KDE_CHECK_STL_SGI,
[
AC_MSG_CHECKING([if STL implementation is SGI like])
AC_CACHE_VAL(kde_cv_stl_type_sgi,
[
AC_TRY_COMPILE([
#include
using namespace std;
],[
string astring="Hallo Welt.";
astring.erase(0, 6); // now astring is "Welt"
return 0;
], kde_cv_stl_type_sgi=yes,
kde_cv_stl_type_sgi=no)
])
AC_MSG_RESULT($kde_cv_stl_type_sgi)
if test "$kde_cv_stl_type_sgi" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
fi
])
AC_DEFUN(KDE_CHECK_STL_HP,
[
AC_MSG_CHECKING([if STL implementation is HP like])
AC_CACHE_VAL(kde_cv_stl_type_hp,
[
AC_TRY_COMPILE([
#include
using namespace std;
],[
string astring="Hello World";
astring.remove(0, 6); // now astring is "World"
return 0;
], kde_cv_stl_type_hp=yes,
kde_cv_stl_type_hp=no)
])
AC_MSG_RESULT($kde_cv_stl_type_hp)
if test "$kde_cv_stl_type_hp" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
fi
])
AC_DEFUN(KDE_CHECK_STL,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
KDE_CHECK_STL_SGI
if test "$kde_cv_stl_type_sgi" = "no"; then
KDE_CHECK_STL_HP
if test "$kde_cv_stl_type_hp" = "no"; then
AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?")
fi
fi
CXXFLAGS="$ac_save_CXXFLAGS"
AC_LANG_RESTORE
])
AC_DEFUN(AC_FIND_QIMGIO,
[AC_REQUIRE([AC_FIND_JPEG])
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
AC_MSG_CHECKING([for qimgio])
AC_CACHE_VAL(ac_cv_lib_qimgio,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_save_LIBS="$LIBS"
ac_save_CXXFLAGS="$CXXFLAGS"
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
AC_TRY_RUN(dnl
[
#include
#include
int main() {
QString t = "hallo";
t.fill('t');
qInitImageIO();
}
],
ac_cv_lib_qimgio=yes,
ac_cv_lib_qimgio=no,
ac_cv_lib_qimgio=no)
LIBS="$ac_save_LIBS"
CXXFLAGS="$ac_save_CXXFLAGS"
AC_LANG_RESTORE
])dnl
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
AC_SUBST(LIBQIMGIO)
else
AC_MSG_RESULT(not found)
fi
])
AC_DEFUN(KDE_CHECK_ANSI,
[
])
AC_DEFUN(KDE_CHECK_INSURE,
[
AC_ARG_ENABLE(insure, [ --enable-insure use insure++ for debugging [default=no]],
[
if test $enableval = "no"; dnl
then ac_use_insure="no"
else ac_use_insure="yes"
fi
], [ac_use_insure="no"])
AC_MSG_CHECKING(if we will use Insure++ to debug)
AC_MSG_RESULT($ac_use_insure)
if test "$ac_use_insure" = "yes"; dnl
then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
fi
])
AC_DEFUN(AM_DISABLE_LIBRARIES,
[
AC_PROVIDE([AM_ENABLE_STATIC])
AC_PROVIDE([AM_ENABLE_SHARED])
enable_static=no
enable_shared=yes
])
AC_DEFUN(AC_CHECK_UTMP_FILE,
[
AC_MSG_CHECKING([for utmp file])
AC_CACHE_VAL(kde_cv_utmp_file,
[
kde_cv_utmp_file=no
for ac_file in \
\
/var/run/utmp \
/var/adm/utmp \
/etc/utmp \
; \
do
if test -r "$ac_file"; then
kde_cv_utmp_file=$ac_file
break
fi
done
])
if test "$kde_cv_utmp_file" != "no"; then
AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
$1
AC_MSG_RESULT($kde_cv_utmp_file)
else
$2
AC_MSG_RESULT([non found])
fi
])
AC_DEFUN(KDE_CREATE_SUBDIRSLIST,
[
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
if test ! -s $srcdir/subdirs; then
dnl Note: Makefile.common creates subdirs, so this is just a fallback
TOPSUBDIRS=""
files=`cd $srcdir && ls -1`
dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
for i in $dirs; do
echo $i >> $srcdir/subdirs
done
fi
if test -s $srcdir/inst-apps; then
ac_topsubdirs="`cat $srcdir/inst-apps`"
else
ac_topsubdirs="`cat $srcdir/subdirs`"
fi
for i in $ac_topsubdirs; do
AC_MSG_CHECKING([if $i should be compiled])
if test -d $srcdir/$i; then
install_it="yes"
for j in $DO_NOT_COMPILE; do
if test $i = $j; then
install_it="no"
fi
done
else
install_it="no"
fi
AC_MSG_RESULT($install_it)
if test $install_it = "yes"; then
TOPSUBDIRS="$TOPSUBDIRS $i"
fi
done
AC_SUBST(TOPSUBDIRS)
])
AC_DEFUN(KDE_CHECK_NAMESPACES,
[
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([
],
[
namespace Foo {
extern int i;
namespace Bar {
extern int i;
}
}
int Foo::i = 0;
int Foo::Bar::i = 1;
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_NAMESPACES)
], [
AC_MSG_RESULT(no)
])
AC_LANG_RESTORE
])
AC_DEFUN(KDE_CHECK_NEWLIBS,
[
])
dnl ------------------------------------------------------------------------
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(AC_CHECK_S_ISSOCK,
[
AC_MSG_CHECKING(for S_ISSOCK)
AC_CACHE_VAL(ac_cv_have_s_issock,
[
AC_LANG_SAVE
AC_LANG_C
AC_TRY_LINK(
[
#include
],
[
struct stat buff;
int b = S_ISSOCK( buff.st_mode );
],
ac_cv_have_s_issock=yes,
ac_cv_have_s_issock=no)
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_have_s_issock)
if test "$ac_cv_have_s_issock" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
fi
])
dnl ------------------------------------------------------------------------
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(AC_CHECK_KDEMAXPATHLEN,
[
AC_MSG_CHECKING(for MAXPATHLEN)
AC_CACHE_VAL(ac_cv_maxpathlen,
[
AC_LANG_C
cat > conftest.$ac_ext <
#endif
#include
#include
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif
KDE_HELLO MAXPATHLEN
EOF
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
else
ac_cv_maxpathlen=1024
fi
rm conftest.*
])
AC_MSG_RESULT($ac_cv_maxpathlen)
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
])
dnl -------------------------------------------------------------------------
dnl See if the compiler supports a template repository bero@redhat.de
dnl -------------------------------------------------------------------------
AC_DEFUN(KDE_COMPILER_REPO,
[
REPO=""
NOREPO=""
KDE_CHECK_COMPILER_FLAG(frepo,
[
REPO="-frepo"
NOREPO="-fno-repo"
])
if test -z "$REPO"; then
KDE_CHECK_COMPILER_FLAG(instances=explicit,
[
REPO="-instances=explicit"
NOREPO="-instances=extern"
])
fi
if test -n "$REPO"; then
AC_DEFINE_UNQUOTED(HAVE_TEMPLATE_REPOSITORY, 1,
[C++ compiler supports template repository])
$1
fi
AC_SUBST(REPO)
AC_SUBST(NOREPO)
])
AC_DEFUN(KDE_CHECK_HEADER,
[
AC_LANG_SAVE
kde_safe_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $all_includes"
AC_LANG_CPLUSPLUS
AC_CHECK_HEADER($1, $2, $3)
CPPFLAGS=$kde_safe_cppflags
AC_LANG_RESTORE
])
AC_DEFUN(KDE_FAST_CONFIGURE,
[
dnl makes configure fast (needs perl)
AC_ARG_ENABLE(fast-perl, [ --disable-fast-perl disable fast Makefile generation (needs perl)],
with_fast_perl=$enableval, with_fast_perl=yes)
])
AC_DEFUN(KDE_CONF_FILES,
[
val=
if test -f $srcdir/configure.files ; then
val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
fi
CONF_FILES=
if test -n "$val" ; then
for i in $val ; do
CONF_FILES="$CONF_FILES $i"
done
fi
AC_SUBST(CONF_FILES)
])dnl
AC_DEFUN(KDE_SET_PREFIX,
[
unset CDPATH
dnl make $KDEDIR the default for the installation
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
if test "x$prefix" = "xNONE"; then
prefix=$ac_default_prefix
ac_configure_args="$ac_configure_args --prefix $prefix"
fi
KDE_FAST_CONFIGURE
KDE_CONF_FILES
])
pushdef([AC_PROG_INSTALL],
[
dnl our own version, testing for a -p flag
popdef([AC_PROG_INSTALL])
dnl as AC_PROG_INSTALL works as it works we first have
dnl to save if the user didn't specify INSTALL, as the
dnl autoconf one overwrites INSTALL and we have no chance to find
dnl out afterwards
test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
AC_PROG_INSTALL
if test -z "$kde_save_INSTALL_given" ; then
# OK, user hasn't given any INSTALL, autoconf found one for us
# now we test, if it supports the -p flag
AC_MSG_CHECKING(for -p flag to install)
rm -f confinst.$$.* > /dev/null 2>&1
echo "Testtest" > confinst.$$.orig
ac_res=no
if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
if test -f confinst.$$.new ; then
# OK, -p seems to do no harm to install
INSTALL="${INSTALL} -p"
ac_res=yes
fi
fi
rm -f confinst.$$.*
AC_MSG_RESULT($ac_res)
fi
dnl the following tries to resolve some signs and wonders coming up
dnl with different autoconf/automake versions
dnl e.g.:
dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
dnl install-@DIR@PROGRAMS targets to explicitly use that flag
dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
dnl INSTALL_SCRIPT, which breaks with automake <= 1.4
dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure
dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from
dnl automake (due to broken Makefile.am or whatever) to install programs,
dnl and so does not see the -s flag in automake > 1.4
dnl to clean up that mess we:
dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
dnl which cleans KDE's program with automake > 1.4;
dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
dnl with automake<=1.4
dnl note that dues to this sometimes two '-s' flags are used (if KDE
dnl properly uses install-@DIR@PROGRAMS, but I don't care
dnl
dnl And to all this comes, that I even can't write in comments variable
dnl names used by automake, because it is so stupid to think I wanted to
dnl _use_ them, therefor I have written A_M_... instead of AM_
dnl hmm, I wanted to say something ... ahh yes: Arghhh.
if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
fi
if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
INSTALL_SCRIPT='${INSTALL}'
fi
])dnl
AC_DEFUN(KDE_LANG_CPLUSPLUS,
[AC_LANG_CPLUSPLUS
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
])
pushdef([AC_LANG_CPLUSPLUS],
[popdef([AC_LANG_CPLUSPLUS])
KDE_LANG_CPLUSPLUS
])
AC_DEFUN(KDE_CHECK_LONG_LONG,
[
AC_MSG_CHECKING(for long long)
AC_CACHE_VAL(kde_cv_c_long_long,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_LINK([], [
long long foo = 0;
foo = foo+1;
],
kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
AC_LANG_RESTORE
])
AC_MSG_RESULT($kde_cv_c_long_long)
if test "$kde_cv_c_long_long" = yes; then
AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
fi
])
AC_DEFUN(KDE_CHECK_LIB,
[
kde_save_LIBS="$LIBS"
LIBS="$LIBS $all_libraries"
case $host_os in
aix*) LIBS="-brtl $LIBS"
test "$GCC" = yes && LIBS="-Wl,$LIBS"
;;
esac
AC_CHECK_LIB($1, $2, $3, $4, $5)
LIBS="$kde_save_LIBS"
])
AC_DEFUN(KDE_CHECK_INITGROUPS,
[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_CHECK_FUNCS(initgroups)
if test "x$ac_cv_func_initgroups" = "xyes"; then
case $host_os in
aix*) AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_MSG_CHECKING([for initgroups prototype])
AC_CACHE_VAL(kde_cv_check_initgroups_proto,
[ AC_TRY_COMPILE(
[ #include
],
[ char buffer[10];
gid_t id;
int x = initgroups(buffer,id);
],
kde_cv_check_initgroups_proto=yes,
kde_cv_check_initgroups_proto=no)
])
AC_MSG_RESULT($kde_cv_check_initgroups_proto)
AC_LANG_RESTORE
;;
*)
kde_cv_check_initgroups_proto=yes
;;
esac
else
kde_cv_check_initgroups_proto=no
fi
if test "x$kde_cv_check_initgroups_proto" = "xyes"; then
kde_check_initgroups_proto=1
else
kde_check_initgroups_proto=0
fi
AC_DEFINE_UNQUOTED(HAVE_INITGROUPS_PROTO,$kde_check_initgroups_proto,
[initgroups may exist but not its prototype (e.g. AIX<4.3.3:8)])
])
AC_DEFUN(KDE_CHECK_JAVA_DIR,
[
AC_MSG_CHECKING([for Java directory])
AC_ARG_WITH(java,
[ --with-java=javadir use java installed in javadir, --without-java disables ],
[ ac_java_dir=$withval
], ac_java_dir=""
)
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
if test "x$ac_java_dir" = xno; then
kde_cv_java_bindir=no
kde_cv_java_includedir=no
kde_java_libjvmdir=no
kde_java_libhpidir=no
else
if test "x$ac_java_dir" = x; then
dnl No option set -> look in $PATH
AC_CACHE_VAL(kde_cv_java_bindir,
[
dnl First look for javac in $PATH. If not found we'll look at the option.
KDE_FIND_PATH(javac, JAVAC, [], [])
if test -n "$JAVAC"; then
kde_cv_java_bindir=`echo $JAVAC | sed -e 's,/javac$,/,'`
dnl this substitution might not work - well, we test for jni.h below
kde_cv_java_includedir=`echo $kde_cv_java_bindir | sed -e 's,bin/$,include/,'`
else
kde_cv_java_bindir=no
fi
])
else
dnl config option set
kde_cv_java_bindir=$ac_java_dir/bin
kde_cv_java_includedir=$ac_java_dir/include
fi
fi
dnl At this point kde_cv_java_bindir and kde_cv_java_includedir are either set or "no"
if test ! "x$kde_cv_java_bindir" = xno; then
dnl Look for libjvm.so
kde_java_libjvmdir=`find $kde_cv_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
dnl Look for libhpi.so and avoid green threads
kde_java_libhpidir=`find $kde_cv_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,'`
dnl Now check everything's fine under there
if test ! -x "$kde_cv_java_bindir/javac"; then
AC_MSG_ERROR([javac not found under $kde_cv_java_bindir - it seems you passed a wrong --with-java.])
fi
if test ! -x "$kde_cv_java_bindir/javah"; then
AC_MSG_ERROR([javah not found under $kde_cv_java_bindir. javac was found though! Use --with-java or --without-java.])
fi
if test ! -x "$kde_cv_java_bindir/jar"; then
AC_MSG_ERROR([jar not found under $kde_cv_java_bindir. javac was found though! Use --with-java or --without-java.])
fi
if test ! -r "$kde_cv_java_includedir/jni.h"; then
AC_MSG_ERROR([jni.h not found under $kde_cv_java_includedir. Use --with-java or --without-java.])
fi
if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
fi
if test ! -r "$kde_java_libhpidir/libhpi.so"; then
AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
fi
jni_includes="-I$kde_cv_java_includedir"
dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
dnl and under linux here..
test -d "$kde_cv_java_includedir/linux" && jni_includes="$jni_includes -I$kde_cv_java_includedir/linux"
test -d "$kde_cv_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_cv_java_includedir/genunix"
dnl Check for JNI version
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_cxxflags_safe="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
AC_TRY_COMPILE([
#include
],
[
#ifndef JNI_VERSION_1_2
Syntax Error
#endif
],[ kde_jni_works=yes ],
[ kde_jni_works=no ])
if test $kde_jni_works = no; then
AC_MSG_ERROR([Incorrect version of $kde_cv_java_includedir/jni.h.
You need to have Java Development Kit (JDK) version 1.2.
Use --with-java to specify another location.
Use --without-java to configure without java support.
Or download a newer JDK and try again.
See e.g. http://java.sun.com/products/jdk/1.2 ])
fi
CXXFLAGS="$ac_cxxflags_safe"
AC_LANG_RESTORE
dnl All tests ok, inform and subst the variables
AC_MSG_RESULT([javac/javah/jar in $kde_cv_java_bindir, jni.h in $kde_cv_java_includedir])
JAVAC=$kde_cv_java_bindir/javac
AC_SUBST(JAVAC)
JAVAH=$kde_cv_java_bindir/javah
AC_SUBST(JAVAH)
JAR=$kde_cv_java_bindir/jar
AC_SUBST(JAR)
AC_SUBST(jni_includes)
JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_cv_java_libhpidir -lhpi"
AC_SUBST(JVMLIBS)
fi
])
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
dnl big packages, m4_foreach is dog-slow. So use our own version of
dnl it. (matz@kde.org)
m4_define([mm_foreach],
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
m4_define([mm_car], [[$1]])
m4_define([mm_car2], [[$@]])
m4_define([_mm_foreach],
[m4_if(m4_quote($2), [], [],
[m4_define([$1], [mm_car($2)])$3[]_mm_foreach([$1],
mm_car2(m4_shift($2)),
[$3])])])
m4_define([AC_FOREACH],
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
AC_DEFUN(KDE_NEED_FLEX,
[
AC_REQUIRE([AM_PROG_LEX])
if test -z "$LEXLIB"; then
AC_MSG_ERROR([You need to have flex installed.])
fi
AC_SUBST(LEXLIB)
])
AC_DEFUN(AC_PATH_QTOPIA,
[
dnl TODO: use AC_CACHE_VAL
if test -z "$1"; then
qtopia_minver_maj=1
qtopia_minver_min=5
qtopia_minver_pat=0
else
qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
fi
qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
AC_REQUIRE([AC_PATH_QT])
AC_MSG_CHECKING([for Qtopia])
LIB_QTOPIA="-lqpe"
AC_SUBST(LIB_QTOPIA)
kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
ac_qtopia_incdir=NO
AC_ARG_WITH(qtopia-dir,
[ --with-qtopia-dir=DIR where the root of Qtopia is installed ],
[ ac_qtopia_incdir="$withval"/include] )
qtopia_incdirs=""
for dir in $kde_qtopia_dirs; do
qtopia_incdirs="$qtopia_incdirs $dir/include"
done
if test ! "$ac_qtopia_incdir" = "NO"; then
qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
fi
qtopia_incdir=""
AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
ac_qtopia_incdir="$qtopia_incdir"
if test -z "$qtopia_incdir"; then
AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
fi
qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
if test "$qtopia_ver" -lt "$qtopia_minver"; then
AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
is required.])
fi
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_cxxflags_safe="$CXXFLAGS"
ac_ldflags_safe="$LDFLAGS"
ac_libs_safe="$LIBS"
CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
LIBS="$LIBS $LIB_QTOPIA $LIBQT"
cat > conftest.$ac_ext <
#include
int main( int argc, char **argv )
{
QPEApplication app( argc, argv );
return 0;
}
EOF
if AC_TRY_EVAL(ac_link) && test -s conftest; then
rm -f conftest*
else
rm -f conftest*
AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
the end of config.log])
fi
CXXFLAGS="$ac_cxxflags_safe"
LDFLAGS="$ac_ldflags_safe"
LIBS="$ac_libs_safe"
AC_LANG_RESTORE
QTOPIA_INCLUDES="-I$qtopia_incdir"
AC_SUBST(QTOPIA_INCLUDES)
AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
])
AC_DEFUN(AC_CHECK_C_COMPILER,
[
AC_ARG_ENABLE(debug,[ --enable-debug enables debug symbols [default=no]],
[
if test $enableval = "no"; dnl
then
kde_use_debug_code="no"
kde_use_debug_define=yes
else
kde_use_debug_code="yes"
kde_use_debug_define=no
fi
],
[kde_use_debug_code="no"
kde_use_debug_define=no
])
dnl Just for configure --help
AC_ARG_ENABLE(dummyoption,[ --disable-debug disables debug output and debug symbols [default=no]],[],[])
AC_ARG_ENABLE(strict,[ --enable-strict compiles with strict compiler options (may not work!)],
[
if test $enableval = "no"; then
kde_use_strict_options="no"
else
kde_use_strict_options="yes"
fi
], [kde_use_strict_options="no"])
AC_ARG_ENABLE(profile,[ --enable-profile creates profiling infos [default=no]],
[kde_use_profiling=$enableval],
[kde_use_profiling="no"]
)
dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
CFLAGS=" $CFLAGS"
AC_PROG_CC
if test "$GCC" = "yes"; then
if test "$kde_use_debug_code" = "yes"; then
CFLAGS="-g -O2 $CFLAGS"
case $host in
*-*-linux-gnu)
CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
;;
esac
else
CFLAGS="-O2 $CFLAGS"
fi
fi
if test "$kde_use_debug_define" = "yes"; then
CFLAGS="-DNDEBUG $CFLAGS"
fi
case "$host" in
*-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
*-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
esac
if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
LDFLAGS=""
fi
if test "$kde_use_profiling" = "yes"; then
KDE_CHECK_COMPILER_FLAG(pg,
[
CFLAGS="-pg $CFLAGS"
])
fi
USE_EXCEPTIONS=
AC_SUBST(USE_EXCEPTIONS)
dnl obsolete macro - provided to keep things going
USE_RTTI=
AC_SUBST(USE_RTTI)
AC_PROG_CPP
# the following is to allow programs, that are known to
# have problems when compiled with -O2
if test -n "$CFLAGS"; then
kde_safe_IFS=$IFS
IFS=" "
NOOPT_CFLAGS=""
for i in $CFLAGS; do
case $i in
-O*)
;;
*)
NOOPT_CFLAGS="$NOOPT_CFLAGS $i"
;;
esac
done
IFS=$kde_safe_IFS
fi
AC_SUBST(NOOPT_CFLAGS)
KDE_CHECK_FINAL
ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDEV_ADD_DEPENDENCIES]), [])
KDE_CXXFLAGS=
AC_SUBST(KDE_CXXFLAGS)
])
AC_DEFUN(KDEV_ADD_DEPENDENCIES,
[
[A]M_DEPENDENCIES(CC)
])
dnl just a wrapper to clean up configure.in only for c projects
AC_DEFUN(KDEV_PROG_LIBTOOL,
[
AC_REQUIRE([AC_CHECK_C_COMPILER])
AC_REQUIRE([AC_ENABLE_SHARED])
AC_REQUIRE([AC_ENABLE_STATIC])
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
AC_LANG_SAVE
AC_LANG_C
AC_OBJEXT
AC_EXEEXT
AC_LANG_RESTORE
AM_PROG_LIBTOOL
AC_LIBTOOL_SETUP
LIBTOOL_SHELL="/bin/sh ./libtool"
# LIBTOOL="$LIBTOOL --silent"
])
## libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
## Copyright 1996, 1997, 1998, 1999, 2000, 2001
## Free Software Foundation, Inc.
## Originally by Gordon Matzigkeit , 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 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##
## 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.
# serial 46 AC_PROG_LIBTOOL
AC_DEFUN([AC_PROG_LIBTOOL],
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[AC_LIBTOOL_CXX],
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
])])
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
[AC_LIBTOOL_GCJ],
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
[AC_LIBTOOL_GCJ],
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
[AC_LIBTOOL_GCJ],
[ifdef([AC_PROG_GCJ],
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
])])
ifdef([A][M_PROG_GCJ],
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
])])
ifdef([LT_AC_PROG_GCJ],
[define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
])])])])])])
AC_DEFUN([_AC_PROG_LIBTOOL],
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
# Save cache, so that ltconfig can load it
AC_CACHE_SAVE
# Actually configure libtool. ac_aux_dir is where install-sh is found.
AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
|| AC_MSG_ERROR([libtool configure failed])
# Reload cache, that may have been modified by ltconfig
AC_CACHE_LOAD
# This can be used to rebuild libtool when needed
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
AC_SUBST(LIBTOOL)dnl
# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log
])
AC_DEFUN([AC_LIBTOOL_SETUP],
[AC_PREREQ(2.13)dnl
AC_REQUIRE([AC_ENABLE_SHARED])dnl
AC_REQUIRE([AC_ENABLE_STATIC])dnl
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_LD])dnl
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
AC_REQUIRE([AC_PROG_NM])dnl
AC_REQUIRE([AC_PROG_LN_S])dnl
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
AC_REQUIRE([AC_OBJEXT])dnl
AC_REQUIRE([AC_EXEEXT])dnl
dnl
# Only perform the check for file, if the check method requires it
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
AC_PATH_MAGIC
fi
;;
esac
AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_CHECK_TOOL(STRIP, strip, :)
# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
[libtool_flags="$libtool_flags --enable-dlopen"])
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
[libtool_flags="$libtool_flags --enable-win32-dll"])
AC_ARG_ENABLE(libtool-lock,
[ --disable-libtool-lock avoid locking (might break parallel builds)])
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
AC_ARG_WITH(pic,
[ --with-pic try to use only PIC/non-PIC objects [default=use both]],
pic_mode="$withval", pic_mode=default)
test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case $host in
*-*-irix6*)
# Find out which ABI we are using.
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
;;
*N32*)
LD="${LD-ld} -n32"
;;
*64-bit*)
LD="${LD-ld} -64"
;;
esac
fi
rm -rf conftest*
;;
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
[AC_LANG_SAVE
AC_LANG_C
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
AC_LANG_RESTORE])
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
CFLAGS="$SAVE_CFLAGS"
fi
;;
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
# recent cygwin and mingw systems supply a stub DllMain which the user
# can override, but on older systems we have to supply one
AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
[AC_TRY_LINK([],
[extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
DllMain (0, 0, 0);],
[lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
case $host/$CC in
*-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
# old mingw systems require "-dll" to link a DLL, while more recent ones
# require "-mdll"
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -mdll"
AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
[AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
CFLAGS="$SAVE_CFLAGS" ;;
*-*-cygwin* | *-*-pw32*)
# cygwin systems need to pass --dll to the linker, and not link
# crt.o which will require a WinMain@16 definition.
lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
esac
;;
])
esac
])
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
# AC_ENABLE_SHARED - implement the --enable-shared flag
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
AC_DEFUN([AC_ENABLE_SHARED],
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(shared,
changequote(<<, >>)dnl
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
case $enableval in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
for pkg in $enableval; do
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
IFS="$ac_save_ifs"
;;
esac],
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
])
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_SHARED(no)])
# AC_ENABLE_STATIC - implement the --enable-static flag
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
AC_DEFUN([AC_ENABLE_STATIC],
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(static,
changequote(<<, >>)dnl
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
case $enableval in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
for pkg in $enableval; do
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
IFS="$ac_save_ifs"
;;
esac],
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
])
# AC_DISABLE_STATIC - set the default static flag to --disable-static
AC_DEFUN([AC_DISABLE_STATIC],
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_STATIC(no)])
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(fast-install,
changequote(<<, >>)dnl
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
case $enableval in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
for pkg in $enableval; do
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
IFS="$ac_save_ifs"
;;
esac],
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
])
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_FAST_INSTALL(no)])
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
# Where MODE is either `yes' or `no'. If omitted, it defaults to
# `both'.
AC_DEFUN([AC_LIBTOOL_PICMODE],
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
pic_mode=ifelse($#,1,$1,default)])
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
AC_DEFUN([AC_PATH_TOOL_PREFIX],
[AC_MSG_CHECKING([for $1])
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
[case $MAGIC_CMD in
/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
?:/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
;;
*)
ac_save_MAGIC_CMD="$MAGIC_CMD"
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
dnl $ac_dummy forces splitting on constant user-supplied paths.
dnl POSIX.2 word splitting is done only on the output of word expansions,
dnl not every word. This closes a longstanding sh security hole.
ac_dummy="ifelse([$2], , $PATH, [$2])"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$1; then
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
egrep "$file_magic_regex" > /dev/null; then
:
else
cat <&2
*** Warning: the command libtool uses to detect shared libraries,
*** $file_magic_cmd, produces output that libtool cannot recognize.
*** The result is that libtool may fail to recognize shared libraries
*** as such. This will affect the creation of libtool libraries that
*** depend on shared libraries, but programs linked with such libtool
*** libraries will work regardless of this problem. Nevertheless, you
*** may want to report the problem to your system manager and/or to
*** bug-libtool@gnu.org
EOF
fi ;;
esac
fi
break
fi
done
IFS="$ac_save_ifs"
MAGIC_CMD="$ac_save_MAGIC_CMD"
;;
esac])
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
AC_MSG_RESULT($MAGIC_CMD)
else
AC_MSG_RESULT(no)
fi
])
# AC_PATH_MAGIC - find a file program which can recognise a shared library
AC_DEFUN([AC_PATH_MAGIC],
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
else
MAGIC_CMD=:
fi
fi
])
# AC_PROG_LD - find the path to the GNU or non-GNU linker
AC_DEFUN([AC_PROG_LD],
[AC_ARG_WITH(gnu-ld,
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
AC_MSG_CHECKING([for ld used by GCC])
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
esac
case $ac_prog in
# Accept absolute paths.
[[\\/]* | [A-Za-z]:[\\/]*)]
re_direlt=['/[^/][^/]*/\.\./']
# Canonicalize the path of ld
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
done
test -z "$LD" && LD="$ac_prog"
;;
"")
# If it fails, then pretend we aren't using GCC.
ac_prog=ld
;;
*)
# If it is relative, then search for the first ld in PATH.
with_gnu_ld=unknown
;;
esac
elif test "$with_gnu_ld" = yes; then
AC_MSG_CHECKING([for GNU ld])
else
AC_MSG_CHECKING([for non-GNU ld])
fi
AC_CACHE_VAL(lt_cv_path_LD,
[if test -z "$LD"; then
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
lt_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
test "$with_gnu_ld" != no && break
else
test "$with_gnu_ld" != yes && break
fi
fi
done
IFS="$ac_save_ifs"
else
lt_cv_path_LD="$LD" # Let the user override the test with a path.
fi])
LD="$lt_cv_path_LD"
if test -n "$LD"; then
AC_MSG_RESULT($LD)
else
AC_MSG_RESULT(no)
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
AC_PROG_LD_GNU
])
AC_DEFUN([AC_PROG_LD_GNU],
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 &5; then
lt_cv_prog_gnu_ld=yes
else
lt_cv_prog_gnu_ld=no
fi])
with_gnu_ld=$lt_cv_prog_gnu_ld
])
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
# -- PORTME Some linkers may need a different reload flag.
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
[lt_cv_ld_reload_flag='-r'])
reload_flag=$lt_cv_ld_reload_flag
test -n "$reload_flag" && reload_flag=" $reload_flag"
])
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
# -- PORTME fill in with the dynamic library characteristics
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
[AC_CACHE_CHECK([how to recognise dependant libraries],
lt_cv_deplibs_check_method,
[lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
lt_cv_deplibs_check_method='unknown'
# Need to set the preceding variable on all platforms that support
# interlibrary dependencies.
# 'none' -- dependencies not supported.
# `unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
# 'test_compile' -- check by making test program.
# 'file_magic [regex]' -- check by looking for files in library path
# which responds to the $file_magic_cmd with a given egrep regex.
# If you have `file' or equivalent on your system and you're not sure
# whether `pass_all' will *always* work, you probably want this one.
case $host_os in
aix*)
lt_cv_deplibs_check_method=pass_all
;;
beos*)
lt_cv_deplibs_check_method=pass_all
;;
bsdi4*)
lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
lt_cv_file_magic_cmd='/usr/bin/file -L'
lt_cv_file_magic_test_file=/shlib/libc.so
;;
cygwin* | mingw* |pw32*)
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
lt_cv_file_magic_cmd='$OBJDUMP -f'
;;
darwin* | rhapsody*)
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
lt_cv_file_magic_cmd='/usr/bin/file -L'
case "$host_os" in
rhapsody* | darwin1.[012])
lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
;;
*) # Darwin 1.3 on
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
;;
esac
;;
freebsd* )
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up.
lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;;
esac
else
lt_cv_deplibs_check_method=pass_all
fi
;;
gnu*)
lt_cv_deplibs_check_method=pass_all
;;
hpux10.20*|hpux11*)
lt_cv_deplibs_check_method=['file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/libc.sl
;;
irix5* | irix6*)
case $host_os in
irix5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
;;
*)
case $LD in
*-32|*"-32 ") libmagic=32-bit;;
*-n32|*"-n32 ") libmagic=N32;;
*-64|*"-64 ") libmagic=64-bit;;
*) libmagic=never-match;;
esac
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
;;
esac
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
lt_cv_deplibs_check_method=pass_all
;;
# This must be Linux ELF.
linux-gnu*)
case $host_cpu in
alpha* | i*86 | powerpc* | sparc* | ia64* | s390* | m68k* | arm* | mips* | hppa* | sh* )
lt_cv_deplibs_check_method=pass_all ;;
*)
# glibc up to 2.1.1 does not perform some relocations on ARM
lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
esac
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
[lt_cv_deplibs_check_method='file_magic NetBSD/[a-z0-9]* demand paged shared library']
else
[lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object']
fi
lt_cv_file_magic_cmd='/usr/bin/file -L'
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
;;
openbsd* )
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case "$host_cpu" in
i*86 )
changequote(,)dnl
lt_cv_deplibs_check_method='file_magic OpenBSD/i[3-9]86 demand paged shared library'
changequote([, ])dnl
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;;
esac
else
lt_cv_deplibs_check_method=pass_all
fi
;;
newsos6)
[lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/libnls.so
;;
osf3* | osf4* | osf5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
lt_cv_file_magic_test_file=/shlib/libc.so
lt_cv_deplibs_check_method=pass_all
;;
sco3.2v5*)
lt_cv_deplibs_check_method=pass_all
;;
solaris*)
lt_cv_deplibs_check_method=pass_all
lt_cv_file_magic_test_file=/lib/libc.so
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
case $host_vendor in
ncr)
lt_cv_deplibs_check_method=pass_all
;;
motorola)
lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]']
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
;;
esac
;;
esac
])
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
])
# AC_PROG_NM - find the path to a BSD-compatible name lister
AC_DEFUN([AC_PROG_NM],
[AC_MSG_CHECKING([for BSD-compatible nm])
AC_CACHE_VAL(lt_cv_path_NM,
[if test -n "$NM"; then
# Let the user override the test.
lt_cv_path_NM="$NM"
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
test -z "$ac_dir" && ac_dir=.
tmp_nm=$ac_dir/${ac_tool_prefix}nm
if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
# Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
# Tru64's nm complains that /dev/null is an invalid object file
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
lt_cv_path_NM="$tmp_nm -B"
break
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
lt_cv_path_NM="$tmp_nm -p"
break
else
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
continue # so that we can try to find one that supports BSD flags
fi
fi
done
IFS="$ac_save_ifs"
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
fi])
NM="$lt_cv_path_NM"
AC_MSG_RESULT([$NM])
])
# AC_CHECK_LIBM - check for math library
AC_DEFUN([AC_CHECK_LIBM],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
LIBM=
case $host in
*-*-beos* | *-*-cygwin* | *-*-pw32*)
# These system don't have libm
;;
*-ncr-sysv4.3*)
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
;;
*)
AC_CHECK_LIB(m, main, LIBM="-lm")
;;
esac
])
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
# the libltdl convenience library and INCLTDL to the include flags for
# the libltdl header and adds --enable-ltdl-convenience to the
# configure arguments. Note that LIBLTDL and INCLTDL are not
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
# with '${top_builddir}/' and INCLTDL will be prefixed with
# '${top_srcdir}/' (note the single quotes!). If your package is not
# flat and you're not using automake, define top_builddir and
# top_srcdir appropriately in the Makefiles.
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
case $enable_ltdl_convenience in
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
"") enable_ltdl_convenience=yes
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
esac
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
])
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
# the libltdl installable library and INCLTDL to the include flags for
# the libltdl header and adds --enable-ltdl-install to the configure
# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
# with '${top_srcdir}/' (note the single quotes!). If your package is
# not flat and you're not using automake, define top_builddir and
# top_srcdir appropriately in the Makefiles.
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_CHECK_LIB(ltdl, main,
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
[if test x"$enable_ltdl_install" = xno; then
AC_MSG_WARN([libltdl not installed, but installation disabled])
else
enable_ltdl_install=yes
fi
])
if test x"$enable_ltdl_install" = x"yes"; then
ac_configure_args="$ac_configure_args --enable-ltdl-install"
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
else
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
LIBLTDL="-lltdl"
INCLTDL=
fi
])
# If this macro is not defined by Autoconf, define it here.
ifdef([AC_PROVIDE_IFELSE],
[],
[define([AC_PROVIDE_IFELSE],
[ifdef([AC_PROVIDE_$1],
[$2], [$3])])])
# AC_LIBTOOL_CXX - enable support for C++ libraries
AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
AC_DEFUN([_AC_LIBTOOL_CXX],
[AC_REQUIRE([AC_PROG_CXX])
AC_REQUIRE([AC_PROG_CXXCPP])
LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
lt_save_CC="$CC"
lt_save_CFLAGS="$CFLAGS"
dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
dnl is set to the C++ compiler.
AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
deplibs_check_method="$deplibs_check_method" \
file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
--build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
|| AC_MSG_ERROR([libtool tag configuration failed])
CC="$lt_save_CC"
CFLAGS="$lt_save_CFLAGS"
# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log
])
# AC_LIBTOOL_GCJ - enable support for GCJ libraries
AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
AC_DEFUN([_AC_LIBTOOL_GCJ],
[AC_REQUIRE([AC_PROG_LIBTOOL])
AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
lt_save_CC="$CC"
lt_save_CFLAGS="$CFLAGS"
dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
dnl is set to the C++ compiler.
AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
deplibs_check_method="$deplibs_check_method" \
file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
--build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
|| AC_MSG_ERROR([libtool tag configuration failed])
CC="$lt_save_CC"
CFLAGS="$lt_save_CFLAGS"
# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log
])
dnl old names
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
dnl This is just to silence aclocal about the macro not being used
ifelse([AC_DISABLE_FAST_INSTALL])dnl
AC_DEFUN([LT_AC_PROG_GCJ],
[AC_CHECK_TOOL(GCJ, gcj, no)
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
AC_SUBST(GCJFLAGS)
])
ed2k_hash-0.3.3/INSTALL 0000644 0001750 0001750 00000015472 07535440713 013407 0 ustar tiago tiago Basic Installation
==================
These are generic installation instructions.
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, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
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 at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
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.
Running `configure' takes a while. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Type `make install' to install the programs and any data files and
documentation.
4. You can remove the program binaries and object files from the
source code directory by typing `make clean'.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
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 supports 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=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
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' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
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 host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
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.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made.
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.
ed2k_hash-0.3.3/configure.in.in 0000644 0001750 0001750 00000005677 07611105341 015270 0 ustar tiago tiago dnl This file is part of the KDE libraries/packages
dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
dnl modified by Walter Tasin (tasin@kdevelop.org)
dnl for c++ console applications
dnl This file is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Library General Public
dnl License as published by the Free Software Foundation; either
dnl version 2 of the License, or (at your option) any later version.
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Library General Public License for more details.
dnl You should have received a copy of the GNU Library General Public License
dnl along with this library; see the file COPYING.LIB. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
# Original Author was Kalle@kde.org
# I lifted it in some mater. (Stephan Kulow)
# I used much code from Janos Farkas
dnl Process this file with autoconf to produce a configure script.
AC_INIT(acinclude.m4) dnl a source file from your sub dir
dnl This is so we can use kde-common
AC_CONFIG_AUX_DIR(admin)
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
unset CDPATH
dnl Checking host/target/build systems, for make, install etc.
AC_CANONICAL_SYSTEM
dnl Perform program name transformation
AC_ARG_PROGRAM
dnl Automake doc recommends to do this only here. (Janos)
AM_INIT_AUTOMAKE(ed2k_hash,0.3.3)
dnl almost the same like KDE_SET_PEFIX but the path is /usr/local
dnl
unset CDPATH
dnl make /usr/local the default for the installation
AC_PREFIX_DEFAULT(/usr/local)
if test "x$prefix" = "xNONE"; then
prefix=$ac_default_prefix
ac_configure_args="$ac_configure_args --prefix $prefix"
fi
KDE_FAST_CONFIGURE
KDE_CONF_FILES
dnl without this order in this file, automake will be confused!
dnl
AM_CONFIG_HEADER(config.h)
dnl checks for programs.
dnl first check for c compiler
AC_CHECK_C_COMPILER
dnl CFLAGS="$NOOPT_CFLAGS" dnl __kdevelop[noopt]__
dnl create only shared libtool-libraries
AC_ENABLE_SHARED(yes)
dnl set the following to yes, if you want to create static
dnl libtool-libraries, too.
AC_ENABLE_STATIC(no)
dnl create a working libtool-script
KDEV_PROG_LIBTOOL
dnl activate the next macro call for DLOPEN tests and setting LIBDL
dnl (n.b. KDE_MISC_TESTS does the same to you, so use either this or the next one)
dnl KDE_CHECK_DLOPEN
dnl activate the next macro call for some additional tests
dnl (compat, crypt, socket, nsl, dlopen, ...)
dnl KDE_MISC_TESTS dnl __kdevelop__
dnl KDE_NEED_FLEX dnl __kdevelop__
dnl AC_PROG_YACC dnl __kdevelop__
KDE_CHECK_EXTRA_LIBS
all_libraries="$all_libraries $USER_LDFLAGS"
all_includes="$all_includes $USER_INCLUDES"
AC_SUBST(all_includes)
AC_SUBST(all_libraries)
AC_SUBST(AUTODIRS)
ed2k_hash-0.3.3/aclocal.m4 0000644 0001750 0001750 00000530045 11257516374 014217 0 ustar tiago tiago # aclocal.m4 generated automatically by aclocal 1.5
# Copyright 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
dnl This file is part of the KDE libraries/packages
dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
dnl This file is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Library General Public
dnl License as published by the Free Software Foundation; either
dnl version 2 of the License, or (at your option) any later version.
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Library General Public License for more details.
dnl You should have received a copy of the GNU Library General Public License
dnl along with this library; see the file COPYING.LIB. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
dnl IMPORTANT NOTE:
dnl Please do not modify this file unless you expect your modifications to be
dnl carried into every other module in the repository. If you decide that you
dnl really want to modify it, contact coolo@kde.org mentioning that you have
dnl and that the modified file should be committed to every module.
dnl
dnl Single-module modifications are best placed in configure.in for kdelibs
dnl and kdebase or configure.in.in if present.
dnl ------------------------------------------------------------------------
dnl Forward compatibility macros (make autoconf 2.13 look like 2.50),
dnl thanks to Raja R Harinath.
dnl ------------------------------------------------------------------------
dnl
ifdef([_AC_PATH_X_XMKMF],[],
[AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])])
ifdef([AC_OUTPUT_SUBDIRS],[],
[AC_DEFUN([AC_OUTPUT_SUBDIRS],[subdirs=$1; _AC_OUTPUT_SUBDIRS])])
# KDE_PATH_X_DIRECT
dnl Internal subroutine of AC_PATH_X.
dnl Set ac_x_includes and/or ac_x_libraries.
AC_DEFUN(KDE_PATH_X_DIRECT,
[if test "$ac_x_includes" = NO; then
# Guess where to find include files, by looking for this one X11 .h file.
test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
# First, try using that file with no special directory specified.
AC_TRY_CPP([#include <$x_direct_test_include>],
[# We can compile using X headers with no special include directory.
ac_x_includes=],
[# Look for the header file in a standard set of common directories.
# Check X11 before X11Rn because it is often a symlink to the current release.
for ac_dir in \
/usr/X11/include \
/usr/X11R6/include \
/usr/X11R5/include \
/usr/X11R4/include \
\
/usr/include/X11 \
/usr/include/X11R6 \
/usr/include/X11R5 \
/usr/include/X11R4 \
\
/usr/local/X11/include \
/usr/local/X11R6/include \
/usr/local/X11R5/include \
/usr/local/X11R4/include \
\
/usr/local/include/X11 \
/usr/local/include/X11R6 \
/usr/local/include/X11R5 \
/usr/local/include/X11R4 \
\
/usr/X386/include \
/usr/x386/include \
/usr/XFree86/include/X11 \
\
/usr/include \
/usr/local/include \
/usr/unsupported/include \
/usr/athena/include \
/usr/local/x11r5/include \
/usr/lpp/Xamples/include \
\
/usr/openwin/include \
/usr/openwin/share/include \
; \
do
if test -r "$ac_dir/$x_direct_test_include"; then
ac_x_includes=$ac_dir
break
fi
done])
fi # $ac_x_includes = NO
if test "$ac_x_libraries" = NO; then
# Check for the libraries.
test -z "$x_direct_test_library" && x_direct_test_library=Xt
test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
# See if we find them without any special options.
# Don't add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
AC_TRY_LINK(, [${x_direct_test_function}()],
[LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
ac_x_libraries=],
[LIBS="$ac_save_LIBS"
# First see if replacing the include by lib works.
# Check X11 before X11Rn because it is often a symlink to the current release.
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
/usr/X11/lib \
/usr/X11R6/lib \
/usr/X11R5/lib \
/usr/X11R4/lib \
\
/usr/lib/X11 \
/usr/lib/X11R6 \
/usr/lib/X11R5 \
/usr/lib/X11R4 \
\
/usr/local/X11/lib \
/usr/local/X11R6/lib \
/usr/local/X11R5/lib \
/usr/local/X11R4/lib \
\
/usr/local/lib/X11 \
/usr/local/lib/X11R6 \
/usr/local/lib/X11R5 \
/usr/local/lib/X11R4 \
\
/usr/X386/lib \
/usr/x386/lib \
/usr/XFree86/lib/X11 \
\
/usr/lib \
/usr/local/lib \
/usr/unsupported/lib \
/usr/athena/lib \
/usr/local/x11r5/lib \
/usr/lpp/Xamples/lib \
/lib/usr/lib/X11 \
\
/usr/openwin/lib \
/usr/openwin/share/lib \
; \
do
dnl Don't even attempt the hair of trying to link an X program!
for ac_extension in a so sl; do
if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
ac_x_libraries=$ac_dir
break 2
fi
done
done])
fi # $ac_x_libraries = NO
])
dnl ------------------------------------------------------------------------
dnl Find a file (or one of more files in a list of dirs)
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(AC_FIND_FILE,
[
$3=NO
for i in $2;
do
for j in $1;
do
echo "configure: __oline__: $i/$j" >&AC_FD_CC
if test -r "$i/$j"; then
echo "taking that" >&AC_FD_CC
$3=$i
break 2
fi
done
done
])
dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
dnl if-not-found, test-parameter)
AC_DEFUN(KDE_FIND_PATH,
[
AC_MSG_CHECKING([for $1])
if test -n "$$2"; then
kde_cv_path="$$2";
else
kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
AC_CACHE_VAL(kde_cv_path_$kde_cache,
[
kde_cv_path="NONE"
dirs="$3"
kde_save_IFS=$IFS
IFS=':'
for dir in $PATH; do
dirs="$dirs $dir"
done
IFS=$kde_save_IFS
for dir in $dirs; do
if test -x "$dir/$1"; then
if test -n "$5"
then
evalstr="$dir/$1 $5 2>&1 "
if eval $evalstr; then
kde_cv_path="$dir/$1"
break
fi
else
kde_cv_path="$dir/$1"
break
fi
fi
done
eval "kde_cv_path_$kde_cache=$kde_cv_path"
])
eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
fi
if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
AC_MSG_RESULT(not found)
$4
else
AC_MSG_RESULT($kde_cv_path)
$2=$kde_cv_path
fi
])
AC_DEFUN(KDE_MOC_ERROR_MESSAGE,
[
AC_MSG_ERROR([No Qt meta object compiler (moc) found!
Please check whether you installed Qt correctly.
You need to have a running moc binary.
configure tried to run $ac_cv_path_moc and the test didn't
succeed. If configure shouldn't have tried this one, set
the environment variable MOC to the right one before running
configure.
])
])
AC_DEFUN(KDE_UIC_ERROR_MESSAGE,
[
AC_MSG_WARN([No Qt ui compiler (uic) found!
Please check whether you installed Qt correctly.
You need to have a running uic binary.
configure tried to run $ac_cv_path_uic and the test didn't
succeed. If configure shouldn't have tried this one, set
the environment variable UIC to the right one before running
configure.
])
])
dnl ------------------------------------------------------------------------
dnl Find the meta object compiler and the ui compiler in the PATH,
dnl in $QTDIR/bin, and some more usual places
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(AC_PATH_QT_MOC_UIC,
[
qt_bindirs=""
for dir in $kde_qt_dirs; do
qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
done
qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
if test ! "$ac_qt_bindir" = "NO"; then
qt_bindirs="$ac_qt_bindir $qt_bindirs"
fi
KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
if test -z "$UIC_NOT_NEEDED"; then
KDE_FIND_PATH(uic, UIC, [$qt_bindirs], [UIC=""])
if test -z "$UIC" ; then
KDE_UIC_ERROR_MESSAGE
exit 1
fi
else
UIC="echo uic not available: "
fi
AC_SUBST(MOC)
AC_SUBST(UIC)
UIC_TR="i18n"
if test $kde_qtver = 3; then
UIC_TR="tr2i18n"
fi
AC_SUBST(UIC_TR)
])
AC_DEFUN(KDE_1_CHECK_PATHS,
[
KDE_1_CHECK_PATH_HEADERS
KDE_TEST_RPATH=
if test -n "$USE_RPATH"; then
if test -n "$kde_libraries"; then
KDE_TEST_RPATH="-R $kde_libraries"
fi
if test -n "$qt_libraries"; then
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
fi
if test -n "$x_libraries"; then
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
fi
KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
fi
AC_MSG_CHECKING([for KDE libraries installed])
ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
if AC_TRY_EVAL(ac_link) && test -s conftest; then
AC_MSG_RESULT(yes)
else
AC_MSG_ERROR([your system fails at linking a small KDE application!
Check, if your compiler is installed correctly and if you have used the
same compiler to compile Qt and kdelibs as you did use now.
For more details about this problem, look at the end of config.log.])
fi
if eval `KDEDIR= ./conftest 2>&5`; then
kde_result=done
else
kde_result=problems
fi
KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
kde_have_all_paths=yes
KDE_SET_PATHS($kde_result)
])
AC_DEFUN(KDE_SET_PATHS,
[
kde_cv_all_paths="kde_have_all_paths=\"yes\" \
kde_htmldir=\"$kde_htmldir\" \
kde_appsdir=\"$kde_appsdir\" \
kde_icondir=\"$kde_icondir\" \
kde_sounddir=\"$kde_sounddir\" \
kde_datadir=\"$kde_datadir\" \
kde_locale=\"$kde_locale\" \
kde_cgidir=\"$kde_cgidir\" \
kde_confdir=\"$kde_confdir\" \
kde_mimedir=\"$kde_mimedir\" \
kde_toolbardir=\"$kde_toolbardir\" \
kde_wallpaperdir=\"$kde_wallpaperdir\" \
kde_templatesdir=\"$kde_templatesdir\" \
kde_bindir=\"$kde_bindir\" \
kde_servicesdir=\"$kde_servicesdir\" \
kde_servicetypesdir=\"$kde_servicetypesdir\" \
kde_moduledir=\"$kde_moduledir\" \
kde_styledir=\"$kde_styledir\" \
kde_widgetdir=\"$kde_widgetdir\" \
kde_result=$1"
])
AC_DEFUN(KDE_SET_DEFAULT_PATHS,
[
if test "$1" = "default"; then
if test -z "$kde_htmldir"; then
kde_htmldir='\${prefix}/share/doc/HTML'
fi
if test -z "$kde_appsdir"; then
kde_appsdir='\${prefix}/share/applnk'
fi
if test -z "$kde_icondir"; then
kde_icondir='\${prefix}/share/icons'
fi
if test -z "$kde_sounddir"; then
kde_sounddir='\${prefix}/share/sounds'
fi
if test -z "$kde_datadir"; then
kde_datadir='\${prefix}/share/apps'
fi
if test -z "$kde_locale"; then
kde_locale='\${prefix}/share/locale'
fi
if test -z "$kde_cgidir"; then
kde_cgidir='\${exec_prefix}/cgi-bin'
fi
if test -z "$kde_confdir"; then
kde_confdir='\${prefix}/share/config'
fi
if test -z "$kde_mimedir"; then
kde_mimedir='\${prefix}/share/mimelnk'
fi
if test -z "$kde_toolbardir"; then
kde_toolbardir='\${prefix}/share/toolbar'
fi
if test -z "$kde_wallpaperdir"; then
kde_wallpaperdir='\${prefix}/share/wallpapers'
fi
if test -z "$kde_templatesdir"; then
kde_templatesdir='\${prefix}/share/templates'
fi
if test -z "$kde_bindir"; then
kde_bindir='\${exec_prefix}/bin'
fi
if test -z "$kde_servicesdir"; then
kde_servicesdir='\${prefix}/share/services'
fi
if test -z "$kde_servicetypesdir"; then
kde_servicetypesdir='\${prefix}/share/servicetypes'
fi
if test -z "$kde_moduledir"; then
if test "$kde_qtver" = "2"; then
kde_moduledir='\${exec_prefix}/lib/kde2'
else
kde_moduledir='\${exec_prefix}/lib/kde3'
fi
fi
if test -z "$kde_styledir"; then
kde_styledir='\${exec_prefix}/lib/kde3/plugins/styles'
fi
if test -z "$kde_widgetdir"; then
kde_widgetdir='\${exec_prefix}/lib/kde3/plugins/designer'
fi
KDE_SET_PATHS(defaults)
else
if test $kde_qtver = 1; then
AC_MSG_RESULT([compiling])
KDE_1_CHECK_PATHS
else
AC_MSG_ERROR([path checking not yet supported for KDE 2])
fi
fi
])
AC_DEFUN(KDE_CHECK_PATHS_FOR_COMPLETENESS,
[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
test -z "$kde_icondir" || test -z "$kde_sounddir" ||
test -z "$kde_datadir" || test -z "$kde_locale" ||
test -z "$kde_cgidir" || test -z "$kde_confdir" ||
test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
test -z "$kde_styledir" || test -z "kde_widgetdir"
test "x$kde_have_all_paths" != "xyes"; then
kde_have_all_paths=no
fi
])
AC_DEFUN(KDE_MISSING_PROG_ERROR,
[
AC_MSG_ERROR([The important program $1 was not found!
Please check whether you installed KDE correctly.
])
])
AC_DEFUN(KDE_SUBST_PROGRAMS,
[
kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
if test -n "$KDEDIRS"; then
kde_save_IFS=$IFS
IFS=:
for dir in $KDEDIRS; do
kde_default_bindirs="$dir/bin $kde_default_bindirs "
done
IFS=$kde_save_IFS
fi
kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(mcopidl)])
KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(artsc-config)])
KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then
kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
if test "$KDE_XSL_STYLESHEET" = "NO"; then
KDE_XSL_STYLESHEET=""
else
KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
fi
fi
DCOP_DEPENDENCIES='$(DCOPIDL)'
AC_SUBST(DCOPIDL)
AC_SUBST(DCOPIDL2CPP)
AC_SUBST(DCOP_DEPENDENCIES)
AC_SUBST(MCOPIDL)
AC_SUBST(ARTSCCONFIG)
AC_SUBST(KDECONFIG)
AC_SUBST(MEINPROC)
AC_SUBST(KDE_XSL_STYLESHEET)
if test -x "$KDECONFIG"; then # it can be "compiled"
kde_libs_prefix=`$KDECONFIG --prefix`
if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
This means it has been moved since you installed it.
This won't work. Please recompile kdelibs for the new prefix.
])
fi
kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
else
kde_libs_prefix='$(prefix)'
kde_libs_htmldir='$(kde_htmldir)'
fi
AC_SUBST(kde_libs_prefix)
AC_SUBST(kde_libs_htmldir)
])dnl
AC_DEFUN(AC_CREATE_KFSSTND,
[
AC_REQUIRE([AC_CHECK_RPATH])
AC_MSG_CHECKING([for KDE paths])
kde_result=""
kde_cached_paths=yes
AC_CACHE_VAL(kde_cv_all_paths,
[
KDE_SET_DEFAULT_PATHS($1)
kde_cached_paths=no
])
eval "$kde_cv_all_paths"
KDE_CHECK_PATHS_FOR_COMPLETENESS
if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
# wrong values were cached, may be, we can set better ones
kde_result=
kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
kde_datadir= kde_locale= kde_cgidir= kde_confdir=
kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
kde_have_all_paths=
kde_styledir=
kde_widgetdir=
KDE_SET_DEFAULT_PATHS($1)
eval "$kde_cv_all_paths"
KDE_CHECK_PATHS_FOR_COMPLETENESS
kde_result="$kde_result (cache overridden)"
fi
if test "$kde_have_all_paths" = "no"; then
AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
Since it had compiled and linked before, it must be a strange problem on your system.
Look at config.log for details. If you are not able to fix this, look at
http://www.kde.org/faq/installation.html or any www.kde.org mirror.
(If you're using an egcs version on Linux, you may update binutils!)
])
else
rm -f conftest*
AC_MSG_RESULT($kde_result)
fi
bindir=$kde_bindir
KDE_SUBST_PROGRAMS
])
AC_DEFUN(AC_SUBST_KFSSTND,
[
AC_SUBST(kde_htmldir)
AC_SUBST(kde_appsdir)
AC_SUBST(kde_icondir)
AC_SUBST(kde_sounddir)
AC_SUBST(kde_datadir)
AC_SUBST(kde_locale)
AC_SUBST(kde_confdir)
AC_SUBST(kde_mimedir)
AC_SUBST(kde_wallpaperdir)
AC_SUBST(kde_bindir)
dnl for KDE 2
AC_SUBST(kde_templatesdir)
AC_SUBST(kde_servicesdir)
AC_SUBST(kde_servicetypesdir)
AC_SUBST(kde_moduledir)
AC_SUBST(kde_styledir)
AC_SUBST(kde_widgetdir)
if test "$kde_qtver" = 1; then
kde_minidir="$kde_icondir/mini"
else
# for KDE 1 - this breaks KDE2 apps using minidir, but
# that's the plan ;-/
kde_minidir="/dev/null"
fi
dnl AC_SUBST(kde_minidir)
dnl AC_SUBST(kde_cgidir)
dnl AC_SUBST(kde_toolbardir)
])
AC_DEFUN(KDE_MISC_TESTS,
[
AC_LANG_C
dnl Checks for libraries.
AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD
AC_SUBST(LIBUTIL)
AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
AC_SUBST(LIBCOMPAT)
kde_have_crypt=
AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
AC_MSG_WARN([you have no crypt in either libcrypt or libc.
You should install libcrypt from another source or configure with PAM
support])
kde_have_crypt=no
]))
AC_SUBST(LIBCRYPT)
if test $kde_have_crypt = yes; then
AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
fi
AC_CHECK_SOCKLEN_T
AC_LANG_C
AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
AC_CHECK_LIB(dnet_stub, dnet_ntoa,
[X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
fi
AC_CHECK_FUNC(inet_ntoa)
if test $ac_cv_func_inet_ntoa = no; then
AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
fi
AC_CHECK_FUNC(connect)
if test $ac_cv_func_connect = no; then
AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
$X_EXTRA_LIBS)
fi
AC_CHECK_FUNC(remove)
if test $ac_cv_func_remove = no; then
AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
fi
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
AC_CHECK_FUNC(shmat, ,
AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
# Solaris 2.6 and others need -lresolv for res_init
AC_CHECK_FUNCS(res_init, , [
kde_libs_safe="$LIBS"
LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
AC_TRY_LINK(
[
#include
],
[
res_init();
],
LIBRESOLV="-lresolv"
X_EXTRA_LIBS="$X_EXTRA_LIBS $LIBRESOLV"
AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
)
LIBS=$kde_libs_safe
])
LIBSOCKET="$X_EXTRA_LIBS"
AC_SUBST(LIBSOCKET)
AC_SUBST(LIBRESOLV)
AC_SUBST(X_EXTRA_LIBS)
AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
AC_SUBST(LIBUCB)
case $host in dnl this *is* LynxOS specific
*-*-lynxos* )
AC_MSG_CHECKING([LynxOS header file wrappers])
[CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
AC_MSG_RESULT(disabled)
AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
;;
esac
KDE_CHECK_TYPES
KDE_CHECK_LIBDL
])
dnl ------------------------------------------------------------------------
dnl Find the header files and libraries for X-Windows. Extended the
dnl macro AC_PATH_X
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(K_PATH_X,
[
AC_REQUIRE([KDE_MISC_TESTS])dnl
AC_ARG_ENABLE(
embedded,
[ --enable-embedded link to Qt-embedded, don't use X],
kde_use_qt_emb=$enableval,
kde_use_qt_emb=no
)
AC_ARG_ENABLE(
qtopia,
[ --enable-qtopia link to Qt-embedded, link to the Qtopia Environment],
kde_use_qt_emb_palm=$enableval,
kde_use_qt_emb_palm=no
)
if test "$kde_use_qt_emb" = "no"; then
AC_MSG_CHECKING(for X)
AC_LANG_SAVE
AC_LANG_C
AC_CACHE_VAL(kde_cv_have_x,
[# One or both of the vars are not set, and there is no cached value.
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
kde_x_includes=NO
else
kde_x_includes=$x_includes
fi
if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
kde_x_libraries=NO
else
kde_x_libraries=$x_libraries
fi
# below we use the standard autoconf calls
ac_x_libraries=$kde_x_libraries
ac_x_includes=$kde_x_includes
KDE_PATH_X_DIRECT
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
dnl location. The correct location is /usr/lib32 or an undefined value
dnl (the linker is smart enough to pick the correct default library).
dnl Things work just fine if you use just AC_PATH_X_DIRECT.
dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
dnl x_includes should be left alone.
case "$host" in
mips-sgi-irix6*)
;;
*-*-solaris*)
;;
*)
_AC_PATH_X_XMKMF
if test -z "$ac_x_includes"; then
ac_x_includes="."
fi
if test -z "$ac_x_libraries"; then
ac_x_libraries="/usr/lib"
fi
esac
#from now on we use our own again
# when the user already gave --x-includes, we ignore
# what the standard autoconf macros told us.
if test "$kde_x_includes" = NO; then
kde_x_includes=$ac_x_includes
fi
# for --x-libraries too
if test "$kde_x_libraries" = NO; then
kde_x_libraries=$ac_x_libraries
fi
if test "$kde_x_includes" = NO; then
AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
fi
if test "$kde_x_libraries" = NO; then
AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
fi
# Record where we found X for the cache.
kde_cv_have_x="have_x=yes \
kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
])dnl
eval "$kde_cv_have_x"
if test "$have_x" != yes; then
AC_MSG_RESULT($have_x)
no_x=yes
else
AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
fi
if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
X_INCLUDES=""
x_includes="."; dnl better than nothing :-
else
x_includes=$kde_x_includes
X_INCLUDES="-I$x_includes"
fi
if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
X_LDFLAGS=""
x_libraries="/usr/lib"; dnl better than nothing :-
else
x_libraries=$kde_x_libraries
X_LDFLAGS="-L$x_libraries"
fi
all_includes="$X_INCLUDES"
all_libraries="$X_LDFLAGS"
AC_SUBST(X_INCLUDES)
AC_SUBST(X_LDFLAGS)
AC_SUBST(x_libraries)
AC_SUBST(x_includes)
# Check for libraries that X11R6 Xt/Xaw programs need.
ac_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $X_LDFLAGS"
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
# check for ICE first), but we must link in the order -lSM -lICE or
# we get undefined symbols. So assume we have SM if we have ICE.
# These have to be linked with before -lX11, unlike the other
# libraries we check for below, so use a different variable.
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
AC_CHECK_LIB(ICE, IceConnectionNumber,
[LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
AC_SUBST(LIBSM)
LDFLAGS="$ac_save_LDFLAGS"
AC_SUBST(X_PRE_LIBS)
LIB_X11='-lX11 $(LIBSOCKET)'
AC_SUBST(LIB_X11)
AC_MSG_CHECKING(for libXext)
AC_CACHE_VAL(kde_cv_have_libXext,
[
kde_ldflags_safe="$LDFLAGS"
kde_libs_safe="$LIBS"
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
LIBS="-lXext -lX11 $LIBSOCKET"
AC_TRY_LINK([
#include
#ifdef STDC_HEADERS
# include
#endif
],
[
printf("hello Xext\n");
],
kde_cv_have_libXext=yes,
kde_cv_have_libXext=no
)
LDFLAGS=$kde_ldflags_safe
LIBS=$kde_libs_safe
])
AC_MSG_RESULT($kde_cv_have_libXext)
if test "$kde_cv_have_libXext" = "no"; then
AC_MSG_ERROR([We need a working libXext to proceed. Since configure
can't find it itself, we stop here assuming that make wouldn't find
them either.])
fi
AC_MSG_CHECKING(for Xinerama)
AC_ARG_WITH(xinerama,
[ --with-xinerama enable support for Xinerama ],
[
no_xinerama=no
], [
no_xinerama=yes
]
)
kde_save_LDFLAGS="$LDFLAGS"
kde_save_CFLAGS="$CFLAGS"
kde_save_LIBS="$LIBS"
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
CFLAGS="$CFLAGS -I$x_includes"
LIBS="-lXinerama -lXext"
if test "x$no_xinerama" = "xno"; then
AC_CACHE_VAL(ac_cv_have_xinerama,
[
AC_TRY_LINK([#include
#include ],
[XineramaIsActive(NULL);],
[ac_cv_have_xinerama="yes"],
[ac_cv_have_xinerama="no"])
])
else
ac_cv_have_xinerama=no;
fi
AC_MSG_RESULT($ac_cv_have_xinerama)
LIBXINERAMA=""
if test "$ac_cv_have_xinerama" = "yes"; then
AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support])
LIBXINERAMA="-lXinerama"
fi
AC_SUBST(LIBXINERAMA)
LDFLAGS="$kde_save_LDFLAGS"
CFLAGS="$kde_save_CFLAGS"
LIBS="$kde_save_LIBS"
LIB_XEXT="-lXext"
QTE_NORTTI=""
else
dnl We're using QT Embedded
CXXFLAGS="$CXXFLAGS -fno-rtti -DQWS"
CFLAGS="$CFLAGS -DQWS"
LDFLAGS="$LDFLAGS -DQWS"
QTE_NORTTI="-fno-rtti -DQWS"
X_PRE_LIBS=""
LIB_X11=""
LIB_XEXT=""
LIBSM=""
X_INCLUDES=""
X_LDFLAGS=""
x_includes=""
x_libraries=""
AC_SUBST(X_PRE_LIBS)
AC_SUBST(LIB_X11)
AC_SUBST(LIBSM)
AC_SUBST(X_INCLUDES)
AC_SUBST(X_LDFLAGS)
AC_SUBST(x_includes)
AC_SUBST(x_libraries)
fi
AC_SUBST(QTE_NORTTI)
AC_SUBST(LIB_XEXT)
AC_LANG_RESTORE
])
AC_DEFUN(KDE_PRINT_QT_PROGRAM,
[
AC_REQUIRE([KDE_USE_QT])
cat > conftest.$ac_ext <
#include
EOF
if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <
#include
#include
EOF
if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <
EOF
fi
fi
if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <
#include
#include
EOF
fi
echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
cat >> conftest.$ac_ext <> conftest.$ac_ext <> conftest.$ac_ext <> conftest.$ac_ext <> conftest.$ac_ext <&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
fi
rm -f conftest*
CXXFLAGS="$ac_cxxflags_safe"
LDFLAGS="$ac_ldflags_safe"
LIBS="$ac_libs_safe"
LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
export LD_LIBRARY_PATH
LIBRARY_PATH="$ac_LIBRARY_PATH"
export LIBRARY_PATH
AC_LANG_RESTORE
])
if test "$kde_cv_qt_direct" = "yes"; then
AC_MSG_RESULT(yes)
$1
else
AC_MSG_RESULT(no)
$2
fi
])
dnl ------------------------------------------------------------------------
dnl Try to find the Qt headers and libraries.
dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(AC_PATH_QT_1_3,
[
AC_REQUIRE([K_PATH_X])
AC_REQUIRE([KDE_USE_QT])
dnl ------------------------------------------------------------------------
dnl Add configure flag to enable linking to MT version of Qt library.
dnl ------------------------------------------------------------------------
AC_ARG_ENABLE(
mt,
[ --disable-mt link to non-threaded Qt (deprecated)],
kde_use_qt_mt=$enableval,
[
if test $kde_qtver = 3; then
kde_use_qt_mt=yes
else
kde_use_qt_mt=no
fi
]
)
USING_QT_MT=""
dnl ------------------------------------------------------------------------
dnl If we not get --disable-qt-mt then adjust some vars for the host.
dnl ------------------------------------------------------------------------
KDE_MT_LDFLAGS=
KDE_MT_LIBS=
if test "x$kde_use_qt_mt" = "xyes"; then
KDE_CHECK_THREADING
if test "x$kde_use_threading" = "xyes"; then
CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
KDE_MT_LDFLAGS="$USE_THREADS"
KDE_MT_LIBS="$LIBPTHREAD"
else
kde_use_qt_mt=no
fi
fi
AC_SUBST(KDE_MT_LDFLAGS)
AC_SUBST(KDE_MT_LIBS)
kde_qt_was_given=yes
dnl ------------------------------------------------------------------------
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
dnl ------------------------------------------------------------------------
if test -z "$LIBQT_GLOB"; then
if test "x$kde_use_qt_emb" = "xyes"; then
LIBQT_GLOB="libqte.*"
else
LIBQT_GLOB="libqt.*"
fi
fi
if test -z "$LIBQT"; then
dnl ------------------------------------------------------------
dnl If we got --enable-embedded then adjust the Qt library name.
dnl ------------------------------------------------------------
if test "x$kde_use_qt_emb" = "xyes"; then
qtlib="qte"
else
qtlib="qt"
fi
kde_int_qt="-l$qtlib"
else
kde_int_qt="$LIBQT"
kde_lib_qt_set=yes
fi
if test -z "$LIBQPE"; then
dnl ------------------------------------------------------------
dnl If we got --enable-palmtop then add -lqpe to the link line
dnl ------------------------------------------------------------
if test "x$kde_use_qt_emb" = "xyes"; then
if test "x$kde_use_qt_emb_palm" = "xyes"; then
LIB_QPE="-lqpe"
else
LIB_QPE=""
fi
else
LIB_QPE=""
fi
fi
dnl ------------------------------------------------------------------------
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
dnl ------------------------------------------------------------------------
if test "x$kde_use_qt_mt" = "xyes"; then
if test -z "$LIBQT"; then
LIBQT="-l$qtlib-mt"
kde_int_qt="-l$qtlib-mt"
else
LIBQT="$qtlib-mt"
kde_int_qt="$qtlib-mt"
fi
LIBQT_GLOB="lib$qtlib-mt.*"
USING_QT_MT="using -mt"
else
LIBQT="-l$qtlib"
fi
if test $kde_qtver != 1; then
AC_REQUIRE([AC_FIND_PNG])
AC_REQUIRE([AC_FIND_JPEG])
LIBQT="$LIBQT $LIBPNG $LIBJPEG"
fi
if test $kde_qtver = 3; then
AC_REQUIRE([KDE_CHECK_LIBDL])
LIBQT="$LIBQT $LIBDL"
fi
AC_MSG_CHECKING([for Qt])
if test "x$kde_use_qt_emb" != "xyes"; then
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
fi
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
qt_libraries=""
qt_includes=""
AC_ARG_WITH(qt-dir,
[ --with-qt-dir=DIR where the root of Qt is installed ],
[ ac_qt_includes="$withval"/include
ac_qt_libraries="$withval"/lib
ac_qt_bindir="$withval"/bin
])
AC_ARG_WITH(qt-includes,
[ --with-qt-includes=DIR where the Qt includes are. ],
[
ac_qt_includes="$withval"
])
kde_qt_libs_given=no
AC_ARG_WITH(qt-libraries,
[ --with-qt-libraries=DIR where the Qt library is installed.],
[ ac_qt_libraries="$withval"
kde_qt_libs_given=yes
])
AC_CACHE_VAL(ac_cv_have_qt,
[#try to guess Qt locations
qt_incdirs=""
for dir in $kde_qt_dirs; do
qt_incdirs="$qt_incdirs $dir/include $dir"
done
qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 $x_includes"
if test ! "$ac_qt_includes" = "NO"; then
qt_incdirs="$ac_qt_includes $qt_incdirs"
fi
if test "$kde_qtver" != "1"; then
kde_qt_header=qstyle.h
else
kde_qt_header=qglobal.h
fi
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
ac_qt_includes="$qt_incdir"
qt_libdirs=""
for dir in $kde_qt_dirs; do
qt_libdirs="$qt_libdirs $dir/lib $dir"
done
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
if test ! "$ac_qt_libraries" = "NO"; then
qt_libdir=$ac_qt_libraries
else
qt_libdirs="$ac_qt_libraries $qt_libdirs"
# if the Qt was given, the chance is too big that libqt.* doesn't exist
qt_libdir=NONE
for dir in $qt_libdirs; do
try="ls -1 $dir/${LIBQT_GLOB}"
if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
done
fi
ac_qt_libraries="$qt_libdir"
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_cxxflags_safe="$CXXFLAGS"
ac_ldflags_safe="$LDFLAGS"
ac_libs_safe="$LIBS"
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
KDE_PRINT_QT_PROGRAM
if AC_TRY_EVAL(ac_link) && test -s conftest; then
rm -f conftest*
else
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
ac_qt_libraries="NO"
fi
rm -f conftest*
CXXFLAGS="$ac_cxxflags_safe"
LDFLAGS="$ac_ldflags_safe"
LIBS="$ac_libs_safe"
AC_LANG_RESTORE
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
ac_cv_have_qt="have_qt=no"
ac_qt_notfound=""
missing_qt_mt=""
if test "$ac_qt_includes" = NO; then
if test "$ac_qt_libraries" = NO; then
ac_qt_notfound="(headers and libraries)";
else
ac_qt_notfound="(headers)";
fi
else
if test "x$kde_use_qt_mt" = "xyes"; then
missing_qt_mt="
Make sure that you have compiled Qt with thread support!"
ac_qt_notfound="(library $qtlib-mt)";
else
ac_qt_notfound="(library $qtlib)";
fi
fi
AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
For more details about this problem, look at the end of config.log.$missing_qt_mt])
else
have_qt="yes"
fi
])
eval "$ac_cv_have_qt"
if test "$have_qt" != yes; then
AC_MSG_RESULT([$have_qt]);
else
ac_cv_have_qt="have_qt=yes \
ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
qt_libraries="$ac_qt_libraries"
qt_includes="$ac_qt_includes"
fi
if test ! "$kde_qt_libs_given" = "yes"; then
KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
fi
AC_SUBST(qt_libraries)
AC_SUBST(qt_includes)
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
QT_INCLUDES=""
else
QT_INCLUDES="-I$qt_includes"
all_includes="$QT_INCLUDES $all_includes"
fi
if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
QT_LDFLAGS=""
else
QT_LDFLAGS="-L$qt_libraries"
all_libraries="$all_libraries $QT_LDFLAGS"
fi
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
AC_SUBST(QT_INCLUDES)
AC_SUBST(QT_LDFLAGS)
AC_PATH_QT_MOC_UIC
if test "x$kde_use_qt_emb" != "xyes"; then
LIB_QT="$kde_int_qt "'$(LIBPNG) $(LIBJPEG) -lXext $(LIB_X11) $(LIBSM)'
else
LIB_QT="$kde_int_qt "'$(LIBPNG) $(LIBJPEG)'
fi
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
AC_SUBST(LIB_QT)
AC_SUBST(LIB_QPE)
AC_SUBST(kde_qtver)
])
AC_DEFUN(AC_PATH_QT,
[
AC_PATH_QT_1_3
])
AC_DEFUN(KDE_CHECK_FINAL,
[
AC_ARG_ENABLE(final, [ --enable-final build size optimized apps (experimental - needs lots of memory)],
kde_use_final=$enableval, kde_use_final=no)
KDE_COMPILER_REPO
if test "x$kde_use_final" = "xyes"; then
KDE_USE_FINAL_TRUE=""
KDE_USE_FINAL_FALSE="#"
else
KDE_USE_FINAL_TRUE="#"
KDE_USE_FINAL_FALSE=""
fi
AC_SUBST(KDE_USE_FINAL_TRUE)
AC_SUBST(KDE_USE_FINAL_FALSE)
AC_ARG_ENABLE(closure, [ --disable-closure don't delay template instantiation],
kde_use_closure=$enableval, kde_use_closure=yes)
if test "x$kde_use_closure" = "xyes"; then
KDE_USE_CLOSURE_TRUE=""
KDE_USE_CLOSURE_FALSE="#"
# CXXFLAGS="$CXXFLAGS $REPO"
else
KDE_USE_CLOSURE_TRUE="#"
KDE_USE_CLOSURE_FALSE=""
fi
AC_SUBST(KDE_USE_CLOSURE_TRUE)
AC_SUBST(KDE_USE_CLOSURE_FALSE)
])
dnl ------------------------------------------------------------------------
dnl Now, the same with KDE
dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(AC_BASE_PATH_KDE,
[
AC_PREREQ([2.13])
AC_REQUIRE([AC_PATH_QT])dnl
AC_CHECK_RPATH
AC_MSG_CHECKING([for KDE])
if test "${prefix}" != NONE; then
kde_includes=${prefix}/include
ac_kde_includes=$prefix/include
if test "${exec_prefix}" != NONE; then
kde_libraries=${exec_prefix}/lib
ac_kde_libraries=$exec_prefix/lib
else
kde_libraries=${prefix}/lib
ac_kde_libraries=$prefix/lib
fi
else
ac_kde_includes=
ac_kde_libraries=
kde_libraries=""
kde_includes=""
fi
AC_CACHE_VAL(ac_cv_have_kde,
[#try to guess kde locations
if test "$kde_qtver" = 1; then
kde_check_header="ksock.h"
kde_check_lib="libkdecore.la"
else
kde_check_header="ksharedptr.h"
kde_check_lib="libkio.la"
fi
if test -z "$1"; then
kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
kde_incdirs="$ac_kde_includes $kde_incdirs"
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
ac_kde_includes="$kde_incdir"
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
AC_MSG_ERROR([
in the prefix, you've chosen, are no KDE headers installed. This will fail.
So, check this please and use another prefix!])
fi
kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib/kde3 /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib"
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib $KDEDIR $kde_libdirs"
kde_libdirs="$ac_kde_libraries $kde_libdirs"
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
ac_kde_libraries="$kde_libdir"
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
AC_MSG_ERROR([
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
So, check this please and use another prefix!])
fi
ac_kde_libraries="$kde_libdir"
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO; then
ac_cv_have_kde="have_kde=no"
else
ac_cv_have_kde="have_kde=yes \
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
fi
else dnl test -z $1
ac_cv_have_kde="have_kde=no"
fi
])dnl
eval "$ac_cv_have_kde"
if test "$have_kde" != "yes"; then
if test "${prefix}" = NONE; then
ac_kde_prefix="$ac_default_prefix"
else
ac_kde_prefix="$prefix"
fi
if test "$exec_prefix" = NONE; then
ac_kde_exec_prefix="$ac_kde_prefix"
AC_MSG_RESULT([will be installed in $ac_kde_prefix])
else
ac_kde_exec_prefix="$exec_prefix"
AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
fi
kde_libraries="${ac_kde_exec_prefix}/lib"
kde_includes=${ac_kde_prefix}/include
else
ac_cv_have_kde="have_kde=yes \
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
kde_libraries="$ac_kde_libraries"
kde_includes="$ac_kde_includes"
fi
AC_SUBST(kde_libraries)
AC_SUBST(kde_includes)
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then
KDE_INCLUDES=""
else
KDE_INCLUDES="-I$kde_includes"
all_includes="$KDE_INCLUDES $all_includes"
fi
KDE_LDFLAGS="-L$kde_libraries"
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
all_libraries="$all_libraries $KDE_LDFLAGS"
fi
AC_SUBST(KDE_LDFLAGS)
AC_SUBST(KDE_INCLUDES)
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
all_libraries="$all_libraries $USER_LDFLAGS"
all_includes="$all_includes $USER_INCLUDES"
AC_SUBST(all_includes)
AC_SUBST(all_libraries)
AC_SUBST(AUTODIRS)
])
AC_DEFUN(KDE_CHECK_EXTRA_LIBS,
[
AC_MSG_CHECKING(for extra includes)
AC_ARG_WITH(extra-includes, [ --with-extra-includes=DIR
adds non standard include paths],
kde_use_extra_includes="$withval",
kde_use_extra_includes=NONE
)
kde_extra_includes=
if test -n "$kde_use_extra_includes" && \
test "$kde_use_extra_includes" != "NONE"; then
ac_save_ifs=$IFS
IFS=':'
for dir in $kde_use_extra_includes; do
kde_extra_includes="$kde_extra_includes $dir"
USER_INCLUDES="$USER_INCLUDES -I$dir"
done
IFS=$ac_save_ifs
kde_use_extra_includes="added"
else
kde_use_extra_includes="no"
fi
AC_SUBST(USER_INCLUDES)
AC_MSG_RESULT($kde_use_extra_includes)
kde_extra_libs=
AC_MSG_CHECKING(for extra libs)
AC_ARG_WITH(extra-libs, [ --with-extra-libs=DIR adds non standard library paths],
kde_use_extra_libs=$withval,
kde_use_extra_libs=NONE
)
if test -n "$kde_use_extra_libs" && \
test "$kde_use_extra_libs" != "NONE"; then
ac_save_ifs=$IFS
IFS=':'
for dir in $kde_use_extra_libs; do
kde_extra_libs="$kde_extra_libs $dir"
KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
USER_LDFLAGS="$USER_LDFLAGS -L$dir"
done
IFS=$ac_save_ifs
kde_use_extra_libs="added"
else
kde_use_extra_libs="no"
fi
AC_SUBST(USER_LDFLAGS)
AC_MSG_RESULT($kde_use_extra_libs)
])
AC_DEFUN(KDE_1_CHECK_PATH_HEADERS,
[
AC_MSG_CHECKING([for KDE headers installed])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
cat > conftest.$ac_ext <
#endif
#include
#include "confdefs.h"
#include
int main() {
printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
printf("kde_wallpaperdir=\\"%s\\"\n",
KApplication::kde_wallpaperdir().data());
printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
printf("kde_moduledir=\\"/tmp/dummy\\"\n");
printf("kde_styledir=\\"/tmp/dummy\\"\n");
printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
return 0;
}
EOF
ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
if AC_TRY_EVAL(ac_compile); then
AC_MSG_RESULT(yes)
else
AC_MSG_ERROR([your system is not able to compile a small KDE application!
Check, if you installed the KDE header files correctly.
For more details about this problem, look at the end of config.log.])
fi
AC_LANG_RESTORE
])
AC_DEFUN(KDE_CHECK_KDEQTADDON,
[
AC_MSG_CHECKING(for kde-qt-addon)
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
[
kde_ldflags_safe="$LDFLAGS"
kde_libs_safe="$LIBS"
kde_cxxflags_safe="$CXXFLAGS"
LIBS="-lkde-qt-addon $LIBQT $LIBS"
CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
AC_TRY_LINK([
#include
],
[
QDomDocument doc;
],
kde_cv_have_kdeqtaddon=yes,
kde_cv_have_kdeqtaddon=no
)
LDFLAGS=$kde_ldflags_safe
LIBS=$kde_libs_safe
kde_cxxflags_safe="$CXXFLAGS"
])
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
if test "$kde_cv_have_kdeqtaddon" = "no"; then
AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
It is a separate package (and CVS module) named kde-qt-addon.])
fi
])
AC_DEFUN(KDE_CHECK_KIMGIO,
[
AC_REQUIRE([AC_BASE_PATH_KDE])
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
AC_REQUIRE([AC_FIND_TIFF])
AC_REQUIRE([AC_FIND_JPEG])
AC_REQUIRE([AC_FIND_PNG])
AC_REQUIRE([KDE_CREATE_LIBS_ALIASES])
if test "$1" = "existance"; then
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
kde_save_LIBS="$LIBS"
LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
AC_CHECK_LIB(kimgio, kimgioRegister, [
LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
LIBS="$kde_save_LIBS"
AC_LANG_RESTORE
else
LIBKIMGIO_EXISTS=yes
fi
if test "$LIBKIMGIO_EXISTS" = "yes"; then
LIB_KIMGIO='-lkimgio'
else
LIB_KIMGIO=''
fi
AC_SUBST(LIB_KIMGIO)
])
AC_DEFUN(KDE_CREATE_LIBS_ALIASES,
[
AC_REQUIRE([KDE_MISC_TESTS])
AC_REQUIRE([KDE_CHECK_LIBDL])
AC_REQUIRE([K_PATH_X])
if test $kde_qtver = 3; then
LIB_KDECORE='-lkdecore'
AC_SUBST(LIB_KDECORE)
LIB_KDEUI='-lkdeui'
AC_SUBST(LIB_KDEUI)
LIB_KIO='-lkio'
AC_SUBST(LIB_KIO)
LIB_SMB='-lsmb'
AC_SUBST(LIB_SMB)
LIB_KAB='-lkab'
AC_SUBST(LIB_KAB)
LIB_KHTML='-lkhtml'
AC_SUBST(LIB_KHTML)
LIB_KSPELL='-lkspell'
AC_SUBST(LIB_KSPELL)
LIB_KPARTS='-lkparts'
AC_SUBST(LIB_KPARTS)
LIB_KDEPRINT='-lkdeprint'
AC_SUBST(LIB_KDEPRINT)
# these are for backward compatibility
LIB_KSYCOCA='-lkio'
AC_SUBST(LIB_KSYCOCA)
LIB_KFILE='-lkio'
AC_SUBST(LIB_KFILE)
elif test $kde_qtver = 2; then
LIB_KDECORE='-lkdecore'
AC_SUBST(LIB_KDECORE)
LIB_KDEUI='-lkdeui'
AC_SUBST(LIB_KDEUI)
LIB_KIO='-lkio'
AC_SUBST(LIB_KIO)
LIB_KSYCOCA='-lksycoca'
AC_SUBST(LIB_KSYCOCA)
LIB_SMB='-lsmb'
AC_SUBST(LIB_SMB)
LIB_KFILE='-lkfile'
AC_SUBST(LIB_KFILE)
LIB_KAB='-lkab'
AC_SUBST(LIB_KAB)
LIB_KHTML='-lkhtml'
AC_SUBST(LIB_KHTML)
LIB_KSPELL='-lkspell'
AC_SUBST(LIB_KSPELL)
LIB_KPARTS='-lkparts'
AC_SUBST(LIB_KPARTS)
LIB_KDEPRINT='-lkdeprint'
AC_SUBST(LIB_KDEPRINT)
else
LIB_KDECORE='-lkdecore -lXext $(LIB_QT)'
AC_SUBST(LIB_KDECORE)
LIB_KDEUI='-lkdeui $(LIB_KDECORE)'
AC_SUBST(LIB_KDEUI)
LIB_KFM='-lkfm $(LIB_KDECORE)'
AC_SUBST(LIB_KFM)
LIB_KFILE='-lkfile $(LIB_KFM) $(LIB_KDEUI)'
AC_SUBST(LIB_KFILE)
LIB_KAB='-lkab $(LIB_KIMGIO) $(LIB_KDECORE)'
AC_SUBST(LIB_KAB)
fi
])
AC_DEFUN(AC_PATH_KDE,
[
AC_BASE_PATH_KDE
AC_ARG_ENABLE(path-check, [ --disable-path-check don't try to find out, where to install],
[
if test "$enableval" = "no";
then ac_use_path_checking="default"
else ac_use_path_checking=""
fi
],
[
if test "$kde_qtver" = 1;
then ac_use_path_checking=""
else ac_use_path_checking="default"
fi
]
)
AC_CREATE_KFSSTND($ac_use_path_checking)
AC_SUBST_KFSSTND
KDE_CREATE_LIBS_ALIASES
])
dnl obsolete
AC_DEFUN(AC_CHECK_SETENV,
[
AC_OBSOLETE([$0], [; instead use AC_CHECK_FUNCS([setenv unsetenv])])dnl
AC_CHECK_FUNCS([setenv unsetenv])
])
AC_DEFUN(AC_CHECK_GETDOMAINNAME,
[
AC_MSG_CHECKING(for getdomainname)
AC_CACHE_VAL(ac_cv_func_getdomainname,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
save_CXXFLAGS="$CXXFLAGS"
kde_safe_LIBS="$LIBS"
LIBS="$LIBS $X_EXTRA_LIBS"
if test "$GCC" = "yes"; then
CXXFLAGS="$CXXFLAGS -pedantic-errors"
fi
AC_TRY_COMPILE([
#include
#include
],
[
char buffer[200];
getdomainname(buffer, 200);
],
ac_cv_func_getdomainname=yes,
ac_cv_func_getdomainname=no)
CXXFLAGS="$save_CXXFLAGS"
LIBS=$kde_safe_LIBS
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_func_getdomainname)
AC_MSG_CHECKING([if getdomainname needs custom prototype])
AC_CACHE_VAL(ac_cv_proto_getdomainname,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
if eval "test \"`echo $ac_cv_func_getdomainname`\" = yes"; then
ac_cv_proto_getdomainname=no
else
kde_safe_libs=$LIBS
LIBS="$LIBS $X_EXTRA_LIBS"
AC_TRY_LINK([
#include
#include
extern "C" int getdomainname (char *, int);
],
[
char buffer[200];
getdomainname(buffer, 200);
],
ac_cv_func_getdomainname=yes
ac_cv_proto_getdomainname=yes,
AC_MSG_RESULT([fatal error])
AC_MSG_ERROR([getdomainname unavailable]))
fi
LIBS=$kde_safe_libs
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_proto_getdomainname)
if eval "test \"`echo $ac_cv_func_getdomainname`\" = yes"; then
AC_DEFINE(HAVE_GETDOMAINNAME, 1, [Define if you have getdomainname])
fi
if eval "test \"`echo $ac_cv_proto_getdomainname`\" = no"; then
AC_DEFINE(HAVE_GETDOMAINNAME_PROTO, 1,
[Define if you have getdomainname prototype])
fi
])
AC_DEFUN(AC_CHECK_GETHOSTNAME,
[
AC_MSG_CHECKING([for gethostname])
AC_CACHE_VAL(ac_cv_func_gethostname,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
save_CXXFLAGS="$CXXFLAGS"
if test "$GCC" = "yes"; then
CXXFLAGS="$CXXFLAGS -pedantic-errors"
fi
AC_TRY_LINK([
#include
#include
],
[
char buffer[200];
gethostname(buffer, 200);
],
ac_cv_func_gethostname=yes,
ac_cv_func_gethostname=no)
CXXFLAGS="$save_CXXFLAGS"
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_func_gethostname)
AC_MSG_CHECKING([if gethostname needs custom prototype])
AC_CACHE_VAL(ac_cv_proto_gethostname,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
ac_cv_proto_gethostname=no
else
AC_TRY_LINK([
#include
#include
extern "C" int gethostname (char *, int);
],
[
char buffer[200];
gethostname(buffer, 200);
],
ac_cv_func_gethostname=yes
ac_cv_proto_gethostname=yes,
AC_MSG_RESULT([fatal error])
AC_MSG_ERROR(gethostname unavailable))
fi
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_proto_gethostname)
if eval "test \"`echo $ac_cv_proto_gethostname`\" = no"; then
AC_DEFINE(HAVE_GETHOSTNAME_PROTO, 1,
[Define if you have gethostname prototype])
fi
if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
AC_DEFINE(HAVE_GETHOSTNAME, 1, [Define if you have gethostname])
fi
])
AC_DEFUN(AC_CHECK_USLEEP,
[
AC_MSG_CHECKING([for usleep])
AC_CACHE_VAL(ac_cv_func_usleep,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_libs_safe="$LIBS"
LIBS="$LIBS $LIBUCB"
AC_TRY_LINK([
#include
#include
],
[
usleep(200);
],
ac_cv_func_usleep=yes,
ac_cv_func_usleep=no)
LIBS="$ac_libs_safe"
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_func_usleep)
if eval "test \"`echo $ac_cv_func_usleep`\" = yes"; then
AC_DEFINE(HAVE_USLEEP, 1, [Define if you have the usleep function])
fi
])
AC_DEFUN(AC_CHECK_RANDOM,
[
AC_MSG_CHECKING([for random])
AC_CACHE_VAL(ac_cv_func_random,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_libs_safe="$LIBS"
LIBS="$LIBS $LIBUCB"
AC_TRY_LINK([
#include
],
[
random();
],
ac_cv_func_random=yes,
ac_cv_func_random=no)
LIBS="$ac_libs_safe"
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_func_random)
if eval "test \"`echo $ac_cv_func_random`\" = yes"; then
AC_DEFINE(HAVE_RANDOM, 1, [Define if you have random])
fi
])
AC_DEFUN(AC_FIND_GIF,
[AC_MSG_CHECKING([for giflib])
AC_CACHE_VAL(ac_cv_lib_gif,
[ac_save_LIBS="$LIBS"
if test "x$kde_use_qt_emb" != "xyes"; then
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
else
LIBS="$all_libraries -lgif"
fi
AC_TRY_LINK(dnl
[
#ifdef __cplusplus
extern "C" {
#endif
int GifLastError(void);
#ifdef __cplusplus
}
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
],
[return GifLastError();],
eval "ac_cv_lib_gif=yes",
eval "ac_cv_lib_gif=no")
LIBS="$ac_save_LIBS"
])dnl
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
else
AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
fi
])
AC_DEFUN(KDE_FIND_JPEG_HELPER,
[
AC_MSG_CHECKING([for libjpeg$2])
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
[
AC_LANG_C
ac_save_LIBS="$LIBS"
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK(
[/* Override any gcc2 internal prototype to avoid an error. */
struct jpeg_decompress_struct;
typedef struct jpeg_decompress_struct * j_decompress_ptr;
typedef int size_t;
#ifdef __cplusplus
extern "C" {
#endif
void jpeg_CreateDecompress(j_decompress_ptr cinfo,
int version, size_t structsize);
#ifdef __cplusplus
}
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
],
[jpeg_CreateDecompress(0L, 0, 0);],
eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
eval "ac_cv_lib_jpeg_$1=no")
LIBS="$ac_save_LIBS"
CFLAGS="$ac_save_CFLAGS"
])
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
LIBJPEG="$ac_cv_lib_jpeg_$1"
AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
else
AC_MSG_RESULT(no)
$3
fi
])
AC_DEFUN(AC_FIND_JPEG,
[
dnl first look for libraries
KDE_FIND_JPEG_HELPER(6b, 6b,
KDE_FIND_JPEG_HELPER(normal, [],
[
LIBJPEG=
]
)
)
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
dnl requires system dependent includes loaded before it)
jpeg_incdirs="/usr/include /usr/local/include $kde_extra_includes"
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
test "x$jpeg_incdir" = xNO && jpeg_incdir=
dnl if headers _and_ libraries are missing, this is no error, and we
dnl continue with a warning (the user will get no jpeg support in khtml)
dnl if only one is missing, it means a configuration error, but we still
dnl only warn
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
else
if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
AC_MSG_WARN([
There is an installation error in jpeg support. You seem to have only one
of either the headers _or_ the libraries installed. You may need to either
provide correct --with-extra-... options, or the development package of
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
Disabling JPEG support.
])
else
AC_MSG_WARN([libjpeg not found. disable JPEG support.])
fi
jpeg_incdir=
LIBJPEG=
fi
AC_SUBST(LIBJPEG)
])
AC_DEFUN(AC_FIND_ZLIB,
[
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
AC_MSG_CHECKING([for libz])
AC_CACHE_VAL(ac_cv_lib_z,
[
AC_LANG_C
kde_save_LIBS="$LIBS"
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
kde_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK(dnl
[
#include
],
[return (zlibVersion() == ZLIB_VERSION); ],
eval "ac_cv_lib_z='-lz'",
eval "ac_cv_lib_z=no")
LIBS="$kde_save_LIBS"
CFLAGS="$kde_save_CFLAGS"
])dnl
if test ! "$ac_cv_lib_z" = no; then
AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
LIBZ="$ac_cv_lib_z"
AC_SUBST(LIBZ)
AC_MSG_RESULT($ac_cv_lib_z)
else
AC_MSG_ERROR(not found. Check your installation and look into config.log)
LIBZ=""
AC_SUBST(LIBZ)
fi
])
AC_DEFUN(KDE_TRY_TIFFLIB,
[
AC_MSG_CHECKING([for libtiff $1])
AC_CACHE_VAL(kde_cv_libtiff_$1,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
kde_save_LIBS="$LIBS"
if test "x$kde_use_qt_emb" != "xyes"; then
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
else
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
fi
kde_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK(dnl
[
#include
],
[return (TIFFOpen( "", "r") == 0); ],
[
kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
], [
kde_cv_libtiff_$1=no
])
LIBS="$kde_save_LIBS"
CXXFLAGS="$kde_save_CXXFLAGS"
AC_LANG_RESTORE
])
if test "$kde_cv_libtiff_$1" = "no"; then
AC_MSG_RESULT(no)
LIBTIFF=""
$3
else
LIBTIFF="$kde_cv_libtiff_$1"
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
$2
fi
])
AC_DEFUN(AC_FIND_TIFF,
[
AC_REQUIRE([K_PATH_X])
AC_REQUIRE([AC_FIND_ZLIB])
AC_REQUIRE([AC_FIND_JPEG])
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
KDE_TRY_TIFFLIB(tiff, [],
KDE_TRY_TIFFLIB(tiff34))
AC_SUBST(LIBTIFF)
])
AC_DEFUN(AC_FIND_PNG,
[
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
AC_REQUIRE([AC_FIND_ZLIB])
AC_MSG_CHECKING([for libpng])
AC_CACHE_VAL(ac_cv_lib_png,
[
kde_save_LIBS="$LIBS"
if test "x$kde_use_qt_emb" != "xyes"; then
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
else
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
fi
kde_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
AC_LANG_C
AC_TRY_LINK(dnl
[
#include
],
[
png_structp png_ptr = png_create_read_struct( /* image ptr */
PNG_LIBPNG_VER_STRING, 0, 0, 0 );
return( png_ptr != 0 );
],
eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
eval "ac_cv_lib_png=no"
)
LIBS="$kde_save_LIBS"
CFLAGS="$kde_save_CFLAGS"
])dnl
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
LIBPNG="$ac_cv_lib_png"
AC_SUBST(LIBPNG)
AC_MSG_RESULT($ac_cv_lib_png)
else
AC_MSG_RESULT(no)
LIBPNG=""
AC_SUBST(LIBPNG)
fi
])
AC_DEFUN(AC_CHECK_BOOL,
[
AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
])
AC_DEFUN(AC_CHECK_GNU_EXTENSIONS,
[
AC_MSG_CHECKING(if you need GNU extensions)
AC_CACHE_VAL(ac_cv_gnu_extensions,
[
cat > conftest.c << EOF
#include
#ifdef __GNU_LIBRARY__
yes
#endif
EOF
if (eval "$ac_cpp conftest.c") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_gnu_extensions=yes
else
ac_cv_gnu_extensions=no
fi
])
AC_MSG_RESULT($ac_cv_gnu_extensions)
if test "$ac_cv_gnu_extensions" = "yes"; then
AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
fi
])
AC_DEFUN(KDE_CHECK_COMPILER_FLAG,
[
AC_MSG_CHECKING(whether $CXX supports -$1)
kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -$1"
AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
CXXFLAGS="$save_CXXFLAGS"
AC_LANG_RESTORE
])
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
AC_MSG_RESULT(yes)
:
$2
else
AC_MSG_RESULT(no)
:
$3
fi
])
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
dnl it's all white-space separated
AC_DEFUN(AC_REMOVE_FORBIDDEN,
[ __val=$$1
__forbid=" $2 "
if test -n "$__val"; then
__new=""
ac_save_IFS=$IFS
IFS=" "
for i in $__val; do
case "$__forbid" in
*" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
*) # Careful to not add spaces, where there were none, because otherwise
# libtool gets confused, if we change e.g. CXX
if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
esac
done
IFS=$ac_save_IFS
$1=$__new
fi
])
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
AC_DEFUN(AC_VALIDIFY_CXXFLAGS,
[dnl
if test "x$kde_use_qt_emb" != "xyes"; then
AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
else
AC_REMOVE_FORBIDDEN(CXX, [-rpath])
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
fi
])
AC_DEFUN(AC_CHECK_COMPILERS,
[
AC_ARG_ENABLE(debug,[ --enable-debug[=ARG] enables debug symbols (yes|no|full) [default=no]],
[
case $enableval in
yes)
kde_use_debug_code="yes"
kde_use_debug_define=no
;;
full)
kde_use_debug_code="full"
kde_use_debug_define=no
;;
*)
kde_use_debug_code="no"
kde_use_debug_define=yes
;;
esac
],
[kde_use_debug_code="no"
kde_use_debug_define=no
])
dnl Just for configure --help
AC_ARG_ENABLE(dummyoption,[ --disable-debug disables debug output and debug symbols [default=no]],[],[])
AC_ARG_ENABLE(strict,[ --enable-strict compiles with strict compiler options (may not work!)],
[
if test $enableval = "no"; then
kde_use_strict_options="no"
else
kde_use_strict_options="yes"
fi
], [kde_use_strict_options="no"])
AC_ARG_ENABLE(warnings,[ --enable-warnings compiles with -Wall and similiar],
[
if test $enableval = "no"; then
kde_use_warnings="no"
else
kde_use_warnings="yes"
fi
], [kde_use_warnings="no"])
dnl enable warnings for debug build
if test "$kde_use_debug_code" != "no"; then
kde_use_warnings=yes
fi
AC_ARG_ENABLE(profile,[ --enable-profile creates profiling infos [default=no]],
[kde_use_profiling=$enableval],
[kde_use_profiling="no"]
)
dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
CFLAGS=" $CFLAGS"
AC_PROG_CC
AC_PROG_CPP
if test "$GCC" = "yes"; then
if test "$kde_use_debug_code" != "no"; then
if test $kde_use_debug_code = "full"; then
CFLAGS="-g3 $CFLAGS"
else
CFLAGS="-g -O2 $CFLAGS"
fi
else
CFLAGS="-O2 $CFLAGS"
fi
fi
if test "$kde_use_debug_define" = "yes"; then
CFLAGS="-DNDEBUG $CFLAGS"
fi
case "$host" in
*-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
*-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
esac
if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
LDFLAGS=""
fi
CXXFLAGS=" $CXXFLAGS"
AC_PROG_CXX
if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
if test "$kde_use_debug_code" != "no"; then
if test "$CXX" = "KCC"; then
CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
else
if test "$kde_use_debug_code" = "full"; then
CXXFLAGS="-g3 $CXXFLAGS"
else
CXXFLAGS="-g -O2 $CXXFLAGS"
fi
fi
KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
dnl convenience compiler flags
KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
AC_SUBST(WOVERLOADED_VIRTUAL)
else
if test "$CXX" = "KCC"; then
CXXFLAGS="+K3 $CXXFLAGS"
else
CXXFLAGS="-O2 $CXXFLAGS"
fi
fi
fi
if test "$kde_use_debug_define" = "yes"; then
CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
fi
if test "$kde_use_profiling" = "yes"; then
KDE_CHECK_COMPILER_FLAG(pg,
[
CFLAGS="-pg $CFLAGS"
CXXFLAGS="-pg $CXXFLAGS"
])
fi
if test "$kde_use_warnings" = "yes"; then
if test "$GCC" = "yes"; then
case $host in
*-*-linux-gnu)
CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion $CXXFLAGS"
;;
esac
CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
KDE_CHECK_COMPILER_FLAG(Wbad-function-cast,[CXXFLAGS="-Wbad-function-cast $CXXFLAGS"])
KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
fi
fi
if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then
CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
fi
if test "$GXX" = "yes"; then
KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
fi
if test "$CXX" = "KCC"; then
dnl unfortunately we currently cannot disable exception support in KCC
dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= )
AC_ARG_ENABLE(pch,[ --enable-pch enables precompiled header support (currently only KCC) [default=no]],
[
kde_use_pch=$enableval
],[kde_use_pch=no])
if test "$kde_use_pch" = "yes"; then
dnl TODO: support --pch-dir!
KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
dnl the below works (but the dir must exist), but it's
dnl useless for a whole package.
dnl The are precompiled headers for each source file, so when compiling
dnl from scratch, it doesn't make a difference, and they take up
dnl around ~5Mb _per_ sourcefile.
dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
fi
dnl this flag controls inlining. by default KCC inlines in optimisation mode
dnl all implementations that are defined inside the class {} declaration.
dnl because of templates-compatibility with broken gcc compilers, this
dnl can cause excessive inlining. This flag limits it to a sane level
KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
dnl Some source files are shared between multiple executables
dnl (or libraries) and some of those need template instantiations.
dnl In that case KCC needs to compile those sources with
dnl --one_instantiation_per_object. To make it easy for us we compile
dnl _all_ objects with that flag (--one_per is a shorthand).
KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
fi
AC_SUBST(USE_EXCEPTIONS)
dnl obsolete macro - provided to keep things going
USE_RTTI=
AC_SUBST(USE_RTTI)
case "$host" in
*-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
*-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
*-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
*-*-solaris*)
if test "$GXX" = yes; then
libstdcpp=`$CXX -print-file-name=libstdc++.so`
if test ! -f $libstdcpp; then
AC_MSG_ERROR([You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so])
fi
fi
;;
esac
AC_VALIDIFY_CXXFLAGS
AC_PROG_CXXCPP
# the following is to allow programs, that are known to
# have problems when compiled with -O2
if test -n "$CXXFLAGS"; then
kde_safe_IFS=$IFS
IFS=" "
NOOPT_CXXFLAGS=""
for i in $CXXFLAGS; do
case $i in
-O*)
;;
*)
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS $i"
;;
esac
done
IFS=$kde_safe_IFS
fi
if test -n "$CFLAGS"; then
kde_safe_IFS=$IFS
IFS=" "
NOOPT_CFLAGS=""
for i in $CFLAGS; do
case $i in
-O*)
;;
*)
NOOPT_CFLAGS="$NOOPT_CFLAGS $i"
;;
esac
done
IFS=$kde_safe_IFS
fi
if test "x$kde_use_qt_emb" = "xyes"; then
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS -fno-rtti -DQWS"
fi
AC_SUBST(NOOPT_CXXFLAGS)
AC_SUBST(NOOPT_CFLAGS)
KDE_CHECK_FINAL
ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
KDE_CXXFLAGS=
AC_SUBST(KDE_CXXFLAGS)
])
AC_DEFUN(KDE_ADD_DEPENDENCIES,
[
[A]M_DEPENDENCIES(CC)
[A]M_DEPENDENCIES(CXX)
])
dnl just a wrapper to clean up configure.in
AC_DEFUN(KDE_PROG_LIBTOOL,
[
AC_REQUIRE([AC_CHECK_COMPILERS])
AC_REQUIRE([AC_ENABLE_SHARED])
AC_REQUIRE([AC_ENABLE_STATIC])
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
AC_LANG_SAVE
AC_LANG_C
AC_OBJEXT
AC_EXEEXT
AC_LANG_RESTORE
AM_PROG_LIBTOOL
AC_LIBTOOL_CXX
LIBTOOL_SHELL="/bin/sh ./libtool"
# LIBTOOL="$LIBTOOL --silent"
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
AC_SUBST(KDE_PLUGIN)
])
AC_DEFUN(KDE_CHECK_TYPES,
[ AC_CHECK_SIZEOF(int, 4)dnl
AC_CHECK_SIZEOF(long, 4)dnl
AC_CHECK_SIZEOF(char *, 4)dnl
AC_CHECK_SIZEOF(char, 1)dnl
])dnl
AC_DEFUN(KDE_DO_IT_ALL,
[
AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM
AM_INIT_AUTOMAKE($1, $2)
AM_DISABLE_LIBRARIES
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
AC_CHECK_COMPILERS
KDE_PROG_LIBTOOL
AM_KDE_WITH_NLS
AC_PATH_KDE
])
AC_DEFUN(AC_CHECK_RPATH,
[
AC_MSG_CHECKING(for rpath)
AC_ARG_ENABLE(rpath,
[ --disable-rpath do not use the rpath feature of ld],
USE_RPATH=$enableval, USE_RPATH=yes)
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
KDE_RPATH="-R \$(kde_libraries)"
if test -n "$qt_libraries"; then
KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
fi
dnl $x_libraries is set to /usr/lib in case
if test -n "$X_LDFLAGS"; then
KDE_RPATH="$KDE_RPATH -R \$(x_libraries)"
fi
if test -n "$KDE_EXTRA_RPATH"; then
KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
fi
fi
AC_SUBST(KDE_EXTRA_RPATH)
AC_SUBST(KDE_RPATH)
AC_MSG_RESULT($USE_RPATH)
])
dnl Check for the type of the third argument of getsockname
AC_DEFUN(AC_CHECK_SOCKLEN_T, [
AC_MSG_CHECKING(for socklen_t)
AC_CACHE_VAL(ac_cv_socklen_t, [
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([
#include
#include
],[
socklen_t a=0;
getsockname(0,(struct sockaddr*)0, &a);
],
ac_cv_socklen_t=socklen_t,
AC_TRY_COMPILE([
#include
#include
],[
int a=0;
getsockname(0,(struct sockaddr*)0, &a);
],
ac_cv_socklen_t=int,
ac_cv_socklen_t=size_t
)
)
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_socklen_t)
if test "$ac_cv_socklen_t" != "socklen_t"; then
AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
[Define the real type of socklen_t])
fi
AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
])
dnl This is a merge of some macros out of the gettext aclocal.m4
dnl since we don't need anything, I took the things we need
dnl the copyright for them is:
dnl >
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
dnl This Makefile.in is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE.
dnl >
dnl for this file it is relicensed under LGPL
AC_DEFUN(AM_KDE_WITH_NLS,
[
dnl If we use NLS figure out what method
AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
[test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
GMSGFMT=":"
fi
MSGFMT=$GMSGFMT
AC_SUBST(GMSGFMT)
AC_SUBST(MSGFMT)
AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
dnl Test whether we really found GNU xgettext.
if test "$XGETTEXT" != ":"; then
dnl If it is no GNU xgettext we define it as : so that the
dnl Makefiles still can work.
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
: ;
else
AC_MSG_RESULT(
[found xgettext programs is not GNU xgettext; ignore it])
XGETTEXT=":"
fi
fi
AC_SUBST(XGETTEXT)
])
# Search path for a program which passes the given test.
# Ulrich Drepper , 1996.
# serial 1
# Stephan Kulow: I appended a _KDE against name conflicts
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
AC_DEFUN(AM_PATH_PROG_WITH_TEST_KDE,
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
AC_MSG_CHECKING([for $ac_word])
AC_CACHE_VAL(ac_cv_path_$1,
[case "[$]$1" in
/*)
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in ifelse([$5], , $PATH, [$5]); do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if [$3]; then
ac_cv_path_$1="$ac_dir/$ac_word"
break
fi
fi
done
IFS="$ac_save_ifs"
dnl If no 4th arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
])dnl
;;
esac])dnl
$1="$ac_cv_path_$1"
if test -n "[$]$1"; then
AC_MSG_RESULT([$]$1)
else
AC_MSG_RESULT(no)
fi
AC_SUBST($1)dnl
])
# Check whether LC_MESSAGES is available in .
# Ulrich Drepper , 1995.
# serial 1
AC_DEFUN(AM_LC_MESSAGES,
[if test $ac_cv_header_locale_h = yes; then
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include ], [return LC_MESSAGES],
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
if test $am_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
fi
fi])
dnl From Jim Meyering.
dnl FIXME: migrate into libit.
AC_DEFUN([AM_FUNC_OBSTACK],
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
[AC_TRY_LINK([#include "obstack.h"],
[struct obstack *mem;obstack_free(mem,(char *) 0)],
am_cv_func_obstack=yes,
am_cv_func_obstack=no)])
if test $am_cv_func_obstack = yes; then
AC_DEFINE(HAVE_OBSTACK)
else
LIBOBJS="$LIBOBJS obstack.o"
fi
])
dnl From Jim Meyering. Use this if you use the GNU error.[ch].
dnl FIXME: Migrate into libit
AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
[AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
am_cv_lib_error_at_line=yes,
am_cv_lib_error_at_line=no)])
if test $am_cv_lib_error_at_line = no; then
LIBOBJS="$LIBOBJS error.o"
fi
AC_SUBST(LIBOBJS)dnl
])
# Macro to add for using GNU gettext.
# Ulrich Drepper , 1995.
# serial 1
# Stephan Kulow: I put a KDE in it to avoid name conflicts
AC_DEFUN(AM_KDE_GNU_GETTEXT,
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
AC_REQUIRE([AC_TYPE_OFF_T])dnl
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
AC_REQUIRE([AC_FUNC_MMAP])dnl
AC_REQUIRE([AM_KDE_WITH_NLS])dnl
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h string.h values.h alloca.h])
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
__argz_count __argz_stringify __argz_next])
AC_MSG_CHECKING(for stpcpy)
AC_CACHE_VAL(kde_cv_func_stpcpy,
[
kde_safe_cxxflags=$CXXFLAGS
CXXFLAGS="-Wmissing-prototypes -Werror"
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([
#include
],
[
char buffer[200];
stpcpy(buffer, buffer);
],
kde_cv_func_stpcpy=yes,
kde_cv_func_stpcpy=no)
AC_LANG_RESTORE
CXXFLAGS=$kde_safe_cxxflags
])
AC_MSG_RESULT($kde_cv_func_stpcpy)
if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
fi
AM_LC_MESSAGES
if test "x$CATOBJEXT" != "x"; then
if test "x$ALL_LINGUAS" = "x"; then
LINGUAS=
else
AC_MSG_CHECKING(for catalogs to be installed)
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
esac
done
LINGUAS=$NEW_LINGUAS
AC_MSG_RESULT($LINGUAS)
fi
dnl Construct list of names of catalog files to be constructed.
if test -n "$LINGUAS"; then
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
fi
fi
])
AC_DEFUN(AC_HAVE_XPM,
[AC_REQUIRE_CPP()dnl
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
test -z "$XPM_INCLUDE" && XPM_INCLUDE=
AC_ARG_WITH(xpm, [ --without-xpm disable color pixmap XPM tests],
xpm_test=$withval, xpm_test="yes")
if test "x$xpm_test" = xno; then
ac_cv_have_xpm=no
else
AC_MSG_CHECKING(for XPM)
AC_CACHE_VAL(ac_cv_have_xpm,
[
AC_LANG_C
ac_save_ldflags="$LDFLAGS"
ac_save_cflags="$CFLAGS"
if test "x$kde_use_qt_emb" != "xyes"; then
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
else
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
fi
CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
AC_TRY_LINK([#include ],[],
ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
LDFLAGS="$ac_save_ldflags"
CFLAGS="$ac_save_cflags"
])dnl
if test "$ac_cv_have_xpm" = no; then
AC_MSG_RESULT(no)
XPM_LDFLAGS=""
XPMINC=""
$2
else
AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
if test "$XPM_LDFLAGS" = ""; then
XPMLIB='-lXpm $(LIB_X11)'
else
XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
fi
if test "$XPM_INCLUDE" = ""; then
XPMINC=""
else
XPMINC="-I$XPM_INCLUDE"
fi
AC_MSG_RESULT(yes)
$1
fi
fi
AC_SUBST(XPMINC)
AC_SUBST(XPMLIB)
])
AC_DEFUN(AC_HAVE_DPMS,
[AC_REQUIRE_CPP()dnl
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
DPMS_LIB=
AC_ARG_WITH(dpms, [ --without-dpms disable DPMS power saving],
dpms_test=$withval, dpms_test="yes")
if test "x$dpms_test" = xno; then
ac_cv_have_dpms=no
else
AC_MSG_CHECKING(for DPMS)
dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
AC_CACHE_VAL(ac_cv_have_dpms,
[
if test "x$kde_use_qt_emb" = "xyes"; then
AC_MSG_RESULT(no)
ac_cv_have_dpms="no"
else
AC_LANG_C
ac_save_ldflags="$LDFLAGS"
ac_save_cflags="$CFLAGS"
ac_save_libs="$LIBS"
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
CFLAGS="$CFLAGS $X_INCLUDES"
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
AC_TRY_LINK([
#include
#include
#include
#include
int foo_test_dpms()
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
ac_cv_have_dpms="yes", [
LDFLAGS="$ac_save_ldflags"
CFLAGS="$ac_save_cflags"
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
LIBS="$LIBS -lXdpms"
CFLAGS="$CFLAGS $X_INCLUDES"
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
AC_TRY_LINK([
#include
#include
#include
#include
int foo_test_dpms()
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
[
ac_cv_have_dpms="-lXdpms"
],ac_cv_have_dpms="no")
])
LDFLAGS="$ac_save_ldflags"
CFLAGS="$ac_save_cflags"
LIBS="$ac_save_libs"
fi
])dnl
if test "$ac_cv_have_dpms" = no; then
AC_MSG_RESULT(no)
DPMS_LDFLAGS=""
DPMSINC=""
$2
else
AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
if test "$ac_cv_have_dpms" = "-lXdpms"; then
DPMS_LIB="-lXdpms"
fi
if test "$DPMS_LDFLAGS" = ""; then
DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
else
DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
fi
if test "$DPMS_INCLUDE" = ""; then
DPMSINC=""
else
DPMSINC="-I$DPMS_INCLUDE"
fi
AC_MSG_RESULT(yes)
$1
fi
fi
AC_SUBST(DPMSINC)
AC_SUBST(DPMSLIB)
])
AC_DEFUN(AC_HAVE_GL,
[AC_REQUIRE_CPP()dnl
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
test -z "$GL_LDFLAGS" && GL_LDFLAGS=
test -z "$GL_INCLUDE" && GL_INCLUDE=
AC_ARG_WITH(gl, [ --without-gl disable 3D GL modes],
gl_test=$withval, gl_test="yes")
if test "x$kde_use_qt_emb" = "xyes"; then
# GL and Qt Embedded is a no-go for now.
ac_cv_have_gl=no
elif test "x$gl_test" = xno; then
ac_cv_have_gl=no
else
AC_MSG_CHECKING(for GL)
AC_CACHE_VAL(ac_cv_have_gl,
[
AC_LANG_C
ac_save_ldflags="$LDFLAGS"
ac_save_cflags="$CFLAGS"
LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
CFLAGS="$CFLAGS $X_INCLUDES"
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
AC_TRY_LINK([#include
#include
], [],
ac_cv_have_gl="mesa", ac_cv_have_gl="no")
if test "x$ac_cv_have_gl" = "xno"; then
LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGL -lGLU"
test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
CFLAGS="$ac_save_cflags $X_INCLUDES"
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
AC_TRY_LINK([#include
#include
], [],
ac_cv_have_gl="yes", ac_cv_have_gl="no")
fi
LDFLAGS="$ac_save_ldflags"
CFLAGS="$ac_save_cflags"
])dnl
if test "$ac_cv_have_gl" = "no"; then
AC_MSG_RESULT(no)
GL_LDFLAGS=""
GLINC=""
$2
else
AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
if test "$GL_LDFLAGS" = ""; then
if test "$ac_cv_have_gl" = "mesa"; then
GLLIB='-lMesaGL -lMesaGLU $(LIB_X11)'
else
GLLIB='-lGL -lGLU $(LIB_X11)'
fi
else
if test "$ac_cv_have_gl" = "mesa"; then
GLLIB="$GL_LDFLAGS -lMesaGL -lMesaGLU "'$(LIB_X11)'
else
GLLIB="$GL_LDFLAGS -lGL -lGLU "'$(LIB_X11)'
fi
fi
if test "$GL_INCLUDE" = ""; then
GLINC=""
else
GLINC="-I$GL_INCLUDE"
fi
AC_MSG_RESULT($ac_cv_have_gl)
$1
fi
fi
AC_SUBST(GLINC)
AC_SUBST(GLLIB)
])
dnl shadow password and PAM magic - maintained by ossi@kde.org
AC_DEFUN(KDE_PAM, [
AC_REQUIRE([KDE_CHECK_LIBDL])
AC_ARG_WITH(pam,
[ --with-pam[=ARG] enable support for PAM: ARG=[yes|no|service name]],
[ if test "x$withval" = "xyes"; then
use_pam=yes
pam_service=kde
elif test "x$withval" = "xno"; then
use_pam=no
else
use_pam=yes
pam_service=$withval
fi
ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
], [
AC_CACHE_VAL(ac_cv_path_pam,
[ use_pam=no
AC_CHECK_LIB(pam, pam_start,
[ AC_CHECK_HEADER(security/pam_appl.h,
[ use_pam=yes
pam_service=kde ])
], , $LIBDL)
ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
])
])
eval "$ac_cv_path_pam"
AC_MSG_CHECKING(for PAM)
if test "x$use_pam" = xno; then
AC_MSG_RESULT(no)
PAMLIBS=""
else
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
dnl test whether struct pam_message is const (Linux) or not (Sun)
AC_MSG_CHECKING(for const pam_message)
AC_EGREP_HEADER([struct pam_message], security/pam_appl.h,
[ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h,
[AC_MSG_RESULT([const: Linux-type PAM])],
[AC_MSG_RESULT([nonconst: Sun-type PAM])
AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
)],
[AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
fi
AC_SUBST(PAMLIBS)
])
dnl DEF_PAM_SERVICE(arg name, full name, define name)
AC_DEFUN(DEF_PAM_SERVICE, [
AC_ARG_WITH($1-pam,
[ --with-$1-pam=[val] override PAM service from --with-pam for $2],
[ if test "x$use_pam" = xyes; then
$3_PAM_SERVICE="$withval"
else
AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
You may want to enforce it by using --with-pam.])
fi
],
[ if test "x$use_pam" = xyes; then
$3_PAM_SERVICE="$pam_service"
fi
])
if test -n "$$3_PAM_SERVICE"; then
AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
fi
AC_SUBST($3_PAM_SERVICE)
])
AC_DEFUN(KDE_SHADOWPASSWD, [
AC_REQUIRE([KDE_PAM])
AC_CHECK_LIB(shadow, getspent,
[ LIBSHADOW="-lshadow"
ac_use_shadow=yes
],
[ dnl for UnixWare
AC_CHECK_LIB(gen, getspent,
[ LIBGEN="-lgen"
ac_use_shadow=yes
],
[ AC_CHECK_FUNC(getspent,
[ ac_use_shadow=yes ],
[ ac_use_shadow=no ])
])
])
AC_SUBST(LIBSHADOW)
AC_SUBST(LIBGEN)
AC_MSG_CHECKING([for shadow passwords])
AC_ARG_WITH(shadow,
[ --with-shadow If you want shadow password support ],
[ if test "x$withval" != "xno"; then
use_shadow=yes
else
use_shadow=no
fi
], [
use_shadow="$ac_use_shadow"
])
if test "x$use_shadow" = xyes; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
else
AC_MSG_RESULT(no)
LIBSHADOW=
LIBGEN=
fi
dnl finally make the relevant binaries setuid root, if we have shadow passwds.
dnl this still applies, if we could use it indirectly through pam.
if test "x$use_shadow" = xyes ||
( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
case $host in
*-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
SETUIDFLAGS="-m 4755 -o root";;
*)
SETUIDFLAGS="-m 4755";;
esac
fi
AC_SUBST(SETUIDFLAGS)
])
AC_DEFUN(KDE_PASSWDLIBS, [
AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
AC_REQUIRE([KDE_PAM])
AC_REQUIRE([KDE_SHADOWPASSWD])
if test "x$use_pam" = "xyes"; then
PASSWDLIBS="$PAMLIBS"
else
PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
fi
dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires
dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
dnl may need to read /etc/master.passwd).
case $host in
*-*-freebsd*)
SETUIDFLAGS="-m 4755 -o root"
;;
*)
;;
esac
AC_SUBST(PASSWDLIBS)
])
AC_DEFUN(KDE_CHECK_LIBDL,
[
AC_CHECK_LIB(dl, dlopen, [
LIBDL="-ldl"
ac_cv_have_dlfcn=yes
])
AC_CHECK_LIB(dld, shl_unload, [
LIBDL="-ldld"
ac_cv_have_shload=yes
])
AC_SUBST(LIBDL)
])
AC_DEFUN(KDE_CHECK_DLOPEN,
[
KDE_CHECK_LIBDL
AC_CHECK_HEADERS(dlfcn.h dl.h)
if test "$ac_cv_header_dlfcn_h" = "no"; then
ac_cv_have_dlfcn=no
fi
if test "$ac_cv_header_dl_h" = "no"; then
ac_cv_have_shload=no
fi
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
dnl (MM)
AC_ARG_ENABLE(dlopen,
[ --disable-dlopen link statically [default=no]] ,
enable_dlopen=$enableval,
enable_dlopen=yes)
# override the user's opinion, if we know it better ;)
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
enable_dlopen=no
fi
if test "$ac_cv_have_dlfcn" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
fi
if test "$ac_cv_have_shload" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
fi
if test "$enable_dlopen" = no ; then
test -n "$1" && eval $1
else
test -n "$2" && eval $2
fi
])
AC_DEFUN(KDE_CHECK_DYNAMIC_LOADING,
[
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
KDE_PROG_LIBTOOL
AC_MSG_CHECKING([dynamic loading])
eval "`egrep '^build_libtool_libs=' libtool`"
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
dynamic_loading=yes
AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
else
dynamic_loading=no
fi
AC_MSG_RESULT($dynamic_loading)
if test "$dynamic_loading" = "yes"; then
$1
else
$2
fi
])
AC_DEFUN(KDE_ADD_INCLUDES,
[
if test -z "$1"; then
test_include="Pix.h"
else
test_include="$1"
fi
AC_MSG_CHECKING([for libg++ ($test_include)])
AC_CACHE_VAL(kde_cv_libgpp_includes,
[
kde_cv_libgpp_includes=no
for ac_dir in \
\
/usr/include/g++ \
/usr/include \
/usr/unsupported/include \
/opt/include \
$extra_include \
; \
do
if test -r "$ac_dir/$test_include"; then
kde_cv_libgpp_includes=$ac_dir
break
fi
done
])
AC_MSG_RESULT($kde_cv_libgpp_includes)
if test "$kde_cv_libgpp_includes" != "no"; then
all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
fi
])
])
AC_DEFUN(KDE_CHECK_MICO,
[
AC_REQUIRE([KDE_CHECK_LIBDL])
AC_REQUIRE([KDE_MISC_TESTS])
AC_MSG_CHECKING(for MICO)
if test -z "$MICODIR"; then
kde_micodir=/usr/local
else
kde_micodir="$MICODIR"
fi
AC_ARG_WITH(micodir,
[ --with-micodir=micodir where mico is installed ],
kde_micodir=$withval,
kde_micodir=$kde_micodir
)
AC_CACHE_VAL(kde_cv_mico_incdir,
[
mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
])
kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
if test ! -r $kde_micodir/include/CORBA.h; then
AC_MSG_ERROR([No CORBA.h found, specify another micodir])
fi
AC_MSG_RESULT($kde_micodir)
MICO_INCLUDES=-I$kde_micodir/include
AC_SUBST(MICO_INCLUDES)
MICO_LDFLAGS=-L$kde_micodir/lib
AC_SUBST(MICO_LDFLAGS)
micodir=$kde_micodir
AC_SUBST(micodir)
AC_MSG_CHECKING([for MICO version])
AC_CACHE_VAL(kde_cv_mico_version,
[
AC_LANG_C
cat >conftest.$ac_ext <
#include
int main() {
printf("MICO_VERSION=%s\n",MICO_VERSION);
return (0);
}
EOF
ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
if AC_TRY_EVAL(ac_compile); then
if eval `./conftest 2>&5`; then
kde_cv_mico_version=$MICO_VERSION
else
AC_MSG_ERROR([your system is not able to execute a small application to
find MICO version! Check $kde_micodir/include/mico/version.h])
fi
else
AC_MSG_ERROR([your system is not able to compile a small application to
find MICO version! Check $kde_micodir/include/mico/version.h])
fi
])
dnl installed MICO version
mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
if test "x$1" = "x"; then
req_version="2.3.0"
else
req_version=$1
fi
dnl required MICO version
req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
if test "$mico_v_maj" -lt "$req_v_maj" || \
( test "$mico_v_maj" -eq "$req_v_maj" && \
test "$mico_v_mid" -lt "$req_v_mid" ) || \
( test "$mico_v_mid" -eq "$req_v_mid" && \
test "$mico_v_min" -lt "$req_v_min" )
then
AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
at least is required. You should upgrade MICO.])
else
AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
fi
LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
AC_SUBST(LIBMICO)
if test -z "$IDL"; then
IDL='$(kde_bindir)/cuteidl'
fi
AC_SUBST(IDL)
IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
AC_SUBST(IDL_DEPENDENCIES)
idldir="\$(includedir)/idl"
AC_SUBST(idldir)
])
AC_DEFUN(KDE_CHECK_MINI_STL,
[
AC_REQUIRE([KDE_CHECK_MICO])
AC_MSG_CHECKING(if we use mico's mini-STL)
AC_CACHE_VAL(kde_cv_have_mini_stl,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
kde_save_cxxflags="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
AC_TRY_COMPILE(
[
#include
],
[
#ifdef HAVE_MINI_STL
#error "nothing"
#endif
],
kde_cv_have_mini_stl=no,
kde_cv_have_mini_stl=yes)
CXXFLAGS="$kde_save_cxxflags"
AC_LANG_RESTORE
])
if test "x$kde_cv_have_mini_stl" = "xyes"; then
AC_MSG_RESULT(yes)
$1
else
AC_MSG_RESULT(no)
$2
fi
])
])
AC_DEFUN(KDE_CHECK_LIBPTHREAD,
[
AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
AC_SUBST(LIBPTHREAD)
])
AC_DEFUN(KDE_CHECK_PTHREAD_OPTION,
[
AC_ARG_ENABLE(kernel-threads, [ --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.],
kde_use_kernthreads=$enableval, kde_use_kernthreads=no)
if test "$kde_use_kernthreads" = "yes"; then
ac_save_CXXFLAGS="$CXXFLAGS"
ac_save_CFLAGS="$CXXFLAGS"
CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h)
CXXFLAGS="$ac_save_CXXFLAGS"
CFLAGS="$ac_save_CFLAGS"
if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
kde_use_kernthreads=no
else
dnl Add proper -I and -l statements
AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD
if test "x$LIBPTHREAD" = "x"; then
kde_use_kernthreads=no
else
USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
fi
fi
else
USE_THREADS=""
if test -z "$LIBPTHREAD"; then
KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] )
fi
fi
case $host_os in
solaris*)
KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
;;
freebsd*)
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
;;
aix*)
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
LIBPTHREAD="$LIBPTHREAD -lc_r"
;;
linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
if test "$CXX" = "KCC"; then
CXXFLAGS="$CXXFLAGS --thread_safe"
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
fi
;;
*)
;;
esac
AC_SUBST(USE_THREADS)
AC_SUBST(LIBPTHREAD)
])
AC_DEFUN(KDE_CHECK_THREADING,
[
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
dnl default is yes if libpthread is found and no if no libpthread is available
if test -z "$LIBPTHREAD"; then
if test -z "$USE_THREADS"; then
kde_check_threading_default=no
else
kde_check_threading_default=yes
fi
else
kde_check_threading_default=yes
fi
AC_ARG_ENABLE(threading, [ --disable-threading disables threading even if libpthread found ],
kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
if test "x$kde_use_threading" = "xyes"; then
AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
fi
])
AC_DEFUN(KDE_TRY_LINK_PYTHON,
[
if test "$kde_python_link_found" = no; then
if test "$1" = normal; then
AC_MSG_CHECKING(if a Python application links)
else
AC_MSG_CHECKING(if Python depends on $2)
fi
AC_CACHE_VAL(kde_cv_try_link_python_$1,
[
AC_LANG_SAVE
AC_LANG_C
kde_save_cflags="$CFLAGS"
CFLAGS="$CFLAGS $PYTHONINC"
kde_save_libs="$LIBS"
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
kde_save_ldflags="$LDFLAGS"
LDFLAGS="$LDFLAGS $PYTHONLIB"
AC_TRY_LINK(
[
#include
],[
PySys_SetArgv(1, 0);
],
[kde_cv_try_link_python_$1=yes],
[kde_cv_try_link_python_$1=no]
)
CFLAGS="$kde_save_cflags"
LIBS="$kde_save_libs"
LDFLAGS="$kde_save_ldflags"
])
if test "$kde_cv_try_link_python_$1" = "yes"; then
AC_MSG_RESULT(yes)
kde_python_link_found=yes
if test ! "$1" = normal; then
LIBPYTHON="$LIBPYTHON $2"
fi
$3
else
AC_MSG_RESULT(no)
$4
fi
AC_LANG_RESTORE
fi
])
AC_DEFUN(KDE_CHECK_PYTHON_DIR,
[
AC_MSG_CHECKING([for Python directory])
AC_CACHE_VAL(kde_cv_pythondir,
[
if test -z "$PYTHONDIR"; then
kde_cv_pythondir=/usr/local
else
kde_cv_pythondir="$PYTHONDIR"
fi
])
AC_ARG_WITH(pythondir,
[ --with-pythondir=pythondir use python installed in pythondir ],
[
ac_python_dir=$withval
], ac_python_dir=$kde_cv_pythondir
)
AC_MSG_RESULT($ac_python_dir)
])
AC_DEFUN(KDE_CHECK_PYTHON_INTERN,
[
AC_REQUIRE([KDE_CHECK_LIBDL])
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
if test -z "$1"; then
version="1.5"
else
version="$1"
fi
AC_MSG_CHECKING([for Python$version])
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
if test ! -r $python_incdir/Python.h; then
AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
python_incdir=$python_incdir/python$version
if test ! -r $python_incdir/Python.h; then
python_incdir=no
fi
fi
PYTHONINC=-I$python_incdir
python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
if test ! -r $python_libdir/libpython$version.a; then
AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
python_libdir=$python_libdir/python$version/config
if test ! -r $python_libdir/libpython$version.a; then
python_libdir=no
fi
fi
PYTHONLIB=-L$python_libdir
kde_orig_LIBPYTHON=$LIBPYTHON
if test -z "$LIBPYTHON"; then
LIBPYTHON=-lpython$version
fi
python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
python_moddir=$python_moddir/python$version
if test ! -r $python_moddir/copy.py; then
python_moddir=no
fi
PYTHONMODDIR=$python_moddir
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then
LIBPYTHON=$kde_orig_LIBPYTHON
test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
$2
else
dnl Note: this test is very weak
kde_python_link_found=no
KDE_TRY_LINK_PYTHON(normal)
KDE_TRY_LINK_PYTHON(m, -lm)
KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
KDE_TRY_LINK_PYTHON(tcl, -ltcl)
KDE_TRY_LINK_PYTHON(db2, -ldb2)
KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
[AC_MSG_WARN([it seems, Python depends on another library.
Pleae set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
and contact the authors to let them know about this problem])
])
LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
AC_SUBST(PYTHONINC)
AC_SUBST(PYTHONLIB)
AC_SUBST(LIBPYTHON)
AC_SUBST(PYTHONMODDIR)
AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
fi
])
AC_DEFUN(KDE_CHECK_PYTHON,
[
KDE_CHECK_PYTHON_INTERN("2.1", [KDE_CHECK_PYTHON_INTERN("2.0",
[ KDE_CHECK_PYTHON_INTERN($1, $2) ])
])
])
AC_DEFUN(KDE_CHECK_STL_SGI,
[
AC_MSG_CHECKING([if STL implementation is SGI like])
AC_CACHE_VAL(kde_cv_stl_type_sgi,
[
AC_TRY_COMPILE([
#include
using namespace std;
],[
string astring="Hallo Welt.";
astring.erase(0, 6); // now astring is "Welt"
return 0;
], kde_cv_stl_type_sgi=yes,
kde_cv_stl_type_sgi=no)
])
AC_MSG_RESULT($kde_cv_stl_type_sgi)
if test "$kde_cv_stl_type_sgi" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
fi
])
AC_DEFUN(KDE_CHECK_STL_HP,
[
AC_MSG_CHECKING([if STL implementation is HP like])
AC_CACHE_VAL(kde_cv_stl_type_hp,
[
AC_TRY_COMPILE([
#include
using namespace std;
],[
string astring="Hello World";
astring.remove(0, 6); // now astring is "World"
return 0;
], kde_cv_stl_type_hp=yes,
kde_cv_stl_type_hp=no)
])
AC_MSG_RESULT($kde_cv_stl_type_hp)
if test "$kde_cv_stl_type_hp" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
fi
])
AC_DEFUN(KDE_CHECK_STL,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
KDE_CHECK_STL_SGI
if test "$kde_cv_stl_type_sgi" = "no"; then
KDE_CHECK_STL_HP
if test "$kde_cv_stl_type_hp" = "no"; then
AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?")
fi
fi
CXXFLAGS="$ac_save_CXXFLAGS"
AC_LANG_RESTORE
])
AC_DEFUN(AC_FIND_QIMGIO,
[AC_REQUIRE([AC_FIND_JPEG])
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
AC_MSG_CHECKING([for qimgio])
AC_CACHE_VAL(ac_cv_lib_qimgio,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_save_LIBS="$LIBS"
ac_save_CXXFLAGS="$CXXFLAGS"
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
AC_TRY_RUN(dnl
[
#include
#include
int main() {
QString t = "hallo";
t.fill('t');
qInitImageIO();
}
],
ac_cv_lib_qimgio=yes,
ac_cv_lib_qimgio=no,
ac_cv_lib_qimgio=no)
LIBS="$ac_save_LIBS"
CXXFLAGS="$ac_save_CXXFLAGS"
AC_LANG_RESTORE
])dnl
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
AC_SUBST(LIBQIMGIO)
else
AC_MSG_RESULT(not found)
fi
])
AC_DEFUN(KDE_CHECK_ANSI,
[
])
AC_DEFUN(KDE_CHECK_INSURE,
[
AC_ARG_ENABLE(insure, [ --enable-insure use insure++ for debugging [default=no]],
[
if test $enableval = "no"; dnl
then ac_use_insure="no"
else ac_use_insure="yes"
fi
], [ac_use_insure="no"])
AC_MSG_CHECKING(if we will use Insure++ to debug)
AC_MSG_RESULT($ac_use_insure)
if test "$ac_use_insure" = "yes"; dnl
then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
fi
])
AC_DEFUN(AM_DISABLE_LIBRARIES,
[
AC_PROVIDE([AM_ENABLE_STATIC])
AC_PROVIDE([AM_ENABLE_SHARED])
enable_static=no
enable_shared=yes
])
AC_DEFUN(AC_CHECK_UTMP_FILE,
[
AC_MSG_CHECKING([for utmp file])
AC_CACHE_VAL(kde_cv_utmp_file,
[
kde_cv_utmp_file=no
for ac_file in \
\
/var/run/utmp \
/var/adm/utmp \
/etc/utmp \
; \
do
if test -r "$ac_file"; then
kde_cv_utmp_file=$ac_file
break
fi
done
])
if test "$kde_cv_utmp_file" != "no"; then
AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
$1
AC_MSG_RESULT($kde_cv_utmp_file)
else
$2
AC_MSG_RESULT([non found])
fi
])
AC_DEFUN(KDE_CREATE_SUBDIRSLIST,
[
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
if test ! -s $srcdir/subdirs; then
dnl Note: Makefile.common creates subdirs, so this is just a fallback
TOPSUBDIRS=""
files=`cd $srcdir && ls -1`
dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
for i in $dirs; do
echo $i >> $srcdir/subdirs
done
fi
if test -s $srcdir/inst-apps; then
ac_topsubdirs="`cat $srcdir/inst-apps`"
else
ac_topsubdirs="`cat $srcdir/subdirs`"
fi
for i in $ac_topsubdirs; do
AC_MSG_CHECKING([if $i should be compiled])
if test -d $srcdir/$i; then
install_it="yes"
for j in $DO_NOT_COMPILE; do
if test $i = $j; then
install_it="no"
fi
done
else
install_it="no"
fi
AC_MSG_RESULT($install_it)
if test $install_it = "yes"; then
TOPSUBDIRS="$TOPSUBDIRS $i"
fi
done
AC_SUBST(TOPSUBDIRS)
])
AC_DEFUN(KDE_CHECK_NAMESPACES,
[
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([
],
[
namespace Foo {
extern int i;
namespace Bar {
extern int i;
}
}
int Foo::i = 0;
int Foo::Bar::i = 1;
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_NAMESPACES)
], [
AC_MSG_RESULT(no)
])
AC_LANG_RESTORE
])
AC_DEFUN(KDE_CHECK_NEWLIBS,
[
])
dnl ------------------------------------------------------------------------
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(AC_CHECK_S_ISSOCK,
[
AC_MSG_CHECKING(for S_ISSOCK)
AC_CACHE_VAL(ac_cv_have_s_issock,
[
AC_LANG_SAVE
AC_LANG_C
AC_TRY_LINK(
[
#include
],
[
struct stat buff;
int b = S_ISSOCK( buff.st_mode );
],
ac_cv_have_s_issock=yes,
ac_cv_have_s_issock=no)
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_have_s_issock)
if test "$ac_cv_have_s_issock" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
fi
])
dnl ------------------------------------------------------------------------
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(AC_CHECK_KDEMAXPATHLEN,
[
AC_MSG_CHECKING(for MAXPATHLEN)
AC_CACHE_VAL(ac_cv_maxpathlen,
[
AC_LANG_C
cat > conftest.$ac_ext <
#endif
#include
#include
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif
KDE_HELLO MAXPATHLEN
EOF
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
else
ac_cv_maxpathlen=1024
fi
rm conftest.*
])
AC_MSG_RESULT($ac_cv_maxpathlen)
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
])
dnl -------------------------------------------------------------------------
dnl See if the compiler supports a template repository bero@redhat.de
dnl -------------------------------------------------------------------------
AC_DEFUN(KDE_COMPILER_REPO,
[
REPO=""
NOREPO=""
KDE_CHECK_COMPILER_FLAG(frepo,
[
REPO="-frepo"
NOREPO="-fno-repo"
])
if test -z "$REPO"; then
KDE_CHECK_COMPILER_FLAG(instances=explicit,
[
REPO="-instances=explicit"
NOREPO="-instances=extern"
])
fi
if test -n "$REPO"; then
AC_DEFINE_UNQUOTED(HAVE_TEMPLATE_REPOSITORY, 1,
[C++ compiler supports template repository])
$1
fi
AC_SUBST(REPO)
AC_SUBST(NOREPO)
])
AC_DEFUN(KDE_CHECK_HEADER,
[
AC_LANG_SAVE
kde_safe_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $all_includes"
AC_LANG_CPLUSPLUS
AC_CHECK_HEADER($1, $2, $3)
CPPFLAGS=$kde_safe_cppflags
AC_LANG_RESTORE
])
AC_DEFUN(KDE_FAST_CONFIGURE,
[
dnl makes configure fast (needs perl)
AC_ARG_ENABLE(fast-perl, [ --disable-fast-perl disable fast Makefile generation (needs perl)],
with_fast_perl=$enableval, with_fast_perl=yes)
])
AC_DEFUN(KDE_CONF_FILES,
[
val=
if test -f $srcdir/configure.files ; then
val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
fi
CONF_FILES=
if test -n "$val" ; then
for i in $val ; do
CONF_FILES="$CONF_FILES $i"
done
fi
AC_SUBST(CONF_FILES)
])dnl
AC_DEFUN(KDE_SET_PREFIX,
[
unset CDPATH
dnl make $KDEDIR the default for the installation
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
if test "x$prefix" = "xNONE"; then
prefix=$ac_default_prefix
ac_configure_args="$ac_configure_args --prefix $prefix"
fi
KDE_FAST_CONFIGURE
KDE_CONF_FILES
])
pushdef([AC_PROG_INSTALL],
[
dnl our own version, testing for a -p flag
popdef([AC_PROG_INSTALL])
dnl as AC_PROG_INSTALL works as it works we first have
dnl to save if the user didn't specify INSTALL, as the
dnl autoconf one overwrites INSTALL and we have no chance to find
dnl out afterwards
test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
AC_PROG_INSTALL
if test -z "$kde_save_INSTALL_given" ; then
# OK, user hasn't given any INSTALL, autoconf found one for us
# now we test, if it supports the -p flag
AC_MSG_CHECKING(for -p flag to install)
rm -f confinst.$$.* > /dev/null 2>&1
echo "Testtest" > confinst.$$.orig
ac_res=no
if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
if test -f confinst.$$.new ; then
# OK, -p seems to do no harm to install
INSTALL="${INSTALL} -p"
ac_res=yes
fi
fi
rm -f confinst.$$.*
AC_MSG_RESULT($ac_res)
fi
dnl the following tries to resolve some signs and wonders coming up
dnl with different autoconf/automake versions
dnl e.g.:
dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
dnl install-@DIR@PROGRAMS targets to explicitly use that flag
dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
dnl INSTALL_SCRIPT, which breaks with automake <= 1.4
dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure
dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from
dnl automake (due to broken Makefile.am or whatever) to install programs,
dnl and so does not see the -s flag in automake > 1.4
dnl to clean up that mess we:
dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
dnl which cleans KDE's program with automake > 1.4;
dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
dnl with automake<=1.4
dnl note that dues to this sometimes two '-s' flags are used (if KDE
dnl properly uses install-@DIR@PROGRAMS, but I don't care
dnl
dnl And to all this comes, that I even can't write in comments variable
dnl names used by automake, because it is so stupid to think I wanted to
dnl _use_ them, therefor I have written A_M_... instead of AM_
dnl hmm, I wanted to say something ... ahh yes: Arghhh.
if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
fi
if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
INSTALL_SCRIPT='${INSTALL}'
fi
])dnl
AC_DEFUN(KDE_LANG_CPLUSPLUS,
[AC_LANG_CPLUSPLUS
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
])
pushdef([AC_LANG_CPLUSPLUS],
[popdef([AC_LANG_CPLUSPLUS])
KDE_LANG_CPLUSPLUS
])
AC_DEFUN(KDE_CHECK_LONG_LONG,
[
AC_MSG_CHECKING(for long long)
AC_CACHE_VAL(kde_cv_c_long_long,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_LINK([], [
long long foo = 0;
foo = foo+1;
],
kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
AC_LANG_RESTORE
])
AC_MSG_RESULT($kde_cv_c_long_long)
if test "$kde_cv_c_long_long" = yes; then
AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
fi
])
AC_DEFUN(KDE_CHECK_LIB,
[
kde_save_LIBS="$LIBS"
LIBS="$LIBS $all_libraries"
case $host_os in
aix*) LIBS="-brtl $LIBS"
test "$GCC" = yes && LIBS="-Wl,$LIBS"
;;
esac
AC_CHECK_LIB($1, $2, $3, $4, $5)
LIBS="$kde_save_LIBS"
])
AC_DEFUN(KDE_CHECK_INITGROUPS,
[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_CHECK_FUNCS(initgroups)
if test "x$ac_cv_func_initgroups" = "xyes"; then
case $host_os in
aix*) AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_MSG_CHECKING([for initgroups prototype])
AC_CACHE_VAL(kde_cv_check_initgroups_proto,
[ AC_TRY_COMPILE(
[ #include
],
[ char buffer[10];
gid_t id;
int x = initgroups(buffer,id);
],
kde_cv_check_initgroups_proto=yes,
kde_cv_check_initgroups_proto=no)
])
AC_MSG_RESULT($kde_cv_check_initgroups_proto)
AC_LANG_RESTORE
;;
*)
kde_cv_check_initgroups_proto=yes
;;
esac
else
kde_cv_check_initgroups_proto=no
fi
if test "x$kde_cv_check_initgroups_proto" = "xyes"; then
kde_check_initgroups_proto=1
else
kde_check_initgroups_proto=0
fi
AC_DEFINE_UNQUOTED(HAVE_INITGROUPS_PROTO,$kde_check_initgroups_proto,
[initgroups may exist but not its prototype (e.g. AIX<4.3.3:8)])
])
AC_DEFUN(KDE_CHECK_JAVA_DIR,
[
AC_MSG_CHECKING([for Java directory])
AC_ARG_WITH(java,
[ --with-java=javadir use java installed in javadir, --without-java disables ],
[ ac_java_dir=$withval
], ac_java_dir=""
)
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
if test "x$ac_java_dir" = xno; then
kde_cv_java_bindir=no
kde_cv_java_includedir=no
kde_java_libjvmdir=no
kde_java_libhpidir=no
else
if test "x$ac_java_dir" = x; then
dnl No option set -> look in $PATH
AC_CACHE_VAL(kde_cv_java_bindir,
[
dnl First look for javac in $PATH. If not found we'll look at the option.
KDE_FIND_PATH(javac, JAVAC, [], [])
if test -n "$JAVAC"; then
kde_cv_java_bindir=`echo $JAVAC | sed -e 's,/javac$,/,'`
dnl this substitution might not work - well, we test for jni.h below
kde_cv_java_includedir=`echo $kde_cv_java_bindir | sed -e 's,bin/$,include/,'`
else
kde_cv_java_bindir=no
fi
])
else
dnl config option set
kde_cv_java_bindir=$ac_java_dir/bin
kde_cv_java_includedir=$ac_java_dir/include
fi
fi
dnl At this point kde_cv_java_bindir and kde_cv_java_includedir are either set or "no"
if test ! "x$kde_cv_java_bindir" = xno; then
dnl Look for libjvm.so
kde_java_libjvmdir=`find $kde_cv_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
dnl Look for libhpi.so and avoid green threads
kde_java_libhpidir=`find $kde_cv_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,'`
dnl Now check everything's fine under there
if test ! -x "$kde_cv_java_bindir/javac"; then
AC_MSG_ERROR([javac not found under $kde_cv_java_bindir - it seems you passed a wrong --with-java.])
fi
if test ! -x "$kde_cv_java_bindir/javah"; then
AC_MSG_ERROR([javah not found under $kde_cv_java_bindir. javac was found though! Use --with-java or --without-java.])
fi
if test ! -x "$kde_cv_java_bindir/jar"; then
AC_MSG_ERROR([jar not found under $kde_cv_java_bindir. javac was found though! Use --with-java or --without-java.])
fi
if test ! -r "$kde_cv_java_includedir/jni.h"; then
AC_MSG_ERROR([jni.h not found under $kde_cv_java_includedir. Use --with-java or --without-java.])
fi
if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
fi
if test ! -r "$kde_java_libhpidir/libhpi.so"; then
AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
fi
jni_includes="-I$kde_cv_java_includedir"
dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
dnl and under linux here..
test -d "$kde_cv_java_includedir/linux" && jni_includes="$jni_includes -I$kde_cv_java_includedir/linux"
test -d "$kde_cv_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_cv_java_includedir/genunix"
dnl Check for JNI version
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_cxxflags_safe="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
AC_TRY_COMPILE([
#include
],
[
#ifndef JNI_VERSION_1_2
Syntax Error
#endif
],[ kde_jni_works=yes ],
[ kde_jni_works=no ])
if test $kde_jni_works = no; then
AC_MSG_ERROR([Incorrect version of $kde_cv_java_includedir/jni.h.
You need to have Java Development Kit (JDK) version 1.2.
Use --with-java to specify another location.
Use --without-java to configure without java support.
Or download a newer JDK and try again.
See e.g. http://java.sun.com/products/jdk/1.2 ])
fi
CXXFLAGS="$ac_cxxflags_safe"
AC_LANG_RESTORE
dnl All tests ok, inform and subst the variables
AC_MSG_RESULT([javac/javah/jar in $kde_cv_java_bindir, jni.h in $kde_cv_java_includedir])
JAVAC=$kde_cv_java_bindir/javac
AC_SUBST(JAVAC)
JAVAH=$kde_cv_java_bindir/javah
AC_SUBST(JAVAH)
JAR=$kde_cv_java_bindir/jar
AC_SUBST(JAR)
AC_SUBST(jni_includes)
JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_cv_java_libhpidir -lhpi"
AC_SUBST(JVMLIBS)
fi
])
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
dnl big packages, m4_foreach is dog-slow. So use our own version of
dnl it. (matz@kde.org)
m4_define([mm_foreach],
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
m4_define([mm_car], [[$1]])
m4_define([mm_car2], [[$@]])
m4_define([_mm_foreach],
[m4_if(m4_quote($2), [], [],
[m4_define([$1], [mm_car($2)])$3[]_mm_foreach([$1],
mm_car2(m4_shift($2)),
[$3])])])
m4_define([AC_FOREACH],
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
AC_DEFUN(KDE_NEED_FLEX,
[
AC_REQUIRE([AM_PROG_LEX])
if test -z "$LEXLIB"; then
AC_MSG_ERROR([You need to have flex installed.])
fi
AC_SUBST(LEXLIB)
])
AC_DEFUN(AC_PATH_QTOPIA,
[
dnl TODO: use AC_CACHE_VAL
if test -z "$1"; then
qtopia_minver_maj=1
qtopia_minver_min=5
qtopia_minver_pat=0
else
qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
fi
qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
AC_REQUIRE([AC_PATH_QT])
AC_MSG_CHECKING([for Qtopia])
LIB_QTOPIA="-lqpe"
AC_SUBST(LIB_QTOPIA)
kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
ac_qtopia_incdir=NO
AC_ARG_WITH(qtopia-dir,
[ --with-qtopia-dir=DIR where the root of Qtopia is installed ],
[ ac_qtopia_incdir="$withval"/include] )
qtopia_incdirs=""
for dir in $kde_qtopia_dirs; do
qtopia_incdirs="$qtopia_incdirs $dir/include"
done
if test ! "$ac_qtopia_incdir" = "NO"; then
qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
fi
qtopia_incdir=""
AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
ac_qtopia_incdir="$qtopia_incdir"
if test -z "$qtopia_incdir"; then
AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
fi
qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
if test "$qtopia_ver" -lt "$qtopia_minver"; then
AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
is required.])
fi
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_cxxflags_safe="$CXXFLAGS"
ac_ldflags_safe="$LDFLAGS"
ac_libs_safe="$LIBS"
CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
LIBS="$LIBS $LIB_QTOPIA $LIBQT"
cat > conftest.$ac_ext <
#include
int main( int argc, char **argv )
{
QPEApplication app( argc, argv );
return 0;
}
EOF
if AC_TRY_EVAL(ac_link) && test -s conftest; then
rm -f conftest*
else
rm -f conftest*
AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
the end of config.log])
fi
CXXFLAGS="$ac_cxxflags_safe"
LDFLAGS="$ac_ldflags_safe"
LIBS="$ac_libs_safe"
AC_LANG_RESTORE
QTOPIA_INCLUDES="-I$qtopia_incdir"
AC_SUBST(QTOPIA_INCLUDES)
AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
])
AC_DEFUN(AC_CHECK_C_COMPILER,
[
AC_ARG_ENABLE(debug,[ --enable-debug enables debug symbols [default=no]],
[
if test $enableval = "no"; dnl
then
kde_use_debug_code="no"
kde_use_debug_define=yes
else
kde_use_debug_code="yes"
kde_use_debug_define=no
fi
],
[kde_use_debug_code="no"
kde_use_debug_define=no
])
dnl Just for configure --help
AC_ARG_ENABLE(dummyoption,[ --disable-debug disables debug output and debug symbols [default=no]],[],[])
AC_ARG_ENABLE(strict,[ --enable-strict compiles with strict compiler options (may not work!)],
[
if test $enableval = "no"; then
kde_use_strict_options="no"
else
kde_use_strict_options="yes"
fi
], [kde_use_strict_options="no"])
AC_ARG_ENABLE(profile,[ --enable-profile creates profiling infos [default=no]],
[kde_use_profiling=$enableval],
[kde_use_profiling="no"]
)
dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
CFLAGS=" $CFLAGS"
AC_PROG_CC
if test "$GCC" = "yes"; then
if test "$kde_use_debug_code" = "yes"; then
CFLAGS="-g -O2 $CFLAGS"
case $host in
*-*-linux-gnu)
CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
;;
esac
else
CFLAGS="-O2 $CFLAGS"
fi
fi
if test "$kde_use_debug_define" = "yes"; then
CFLAGS="-DNDEBUG $CFLAGS"
fi
case "$host" in
*-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
*-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
esac
if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
LDFLAGS=""
fi
if test "$kde_use_profiling" = "yes"; then
KDE_CHECK_COMPILER_FLAG(pg,
[
CFLAGS="-pg $CFLAGS"
])
fi
USE_EXCEPTIONS=
AC_SUBST(USE_EXCEPTIONS)
dnl obsolete macro - provided to keep things going
USE_RTTI=
AC_SUBST(USE_RTTI)
AC_PROG_CPP
# the following is to allow programs, that are known to
# have problems when compiled with -O2
if test -n "$CFLAGS"; then
kde_safe_IFS=$IFS
IFS=" "
NOOPT_CFLAGS=""
for i in $CFLAGS; do
case $i in
-O*)
;;
*)
NOOPT_CFLAGS="$NOOPT_CFLAGS $i"
;;
esac
done
IFS=$kde_safe_IFS
fi
AC_SUBST(NOOPT_CFLAGS)
KDE_CHECK_FINAL
ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDEV_ADD_DEPENDENCIES]), [])
KDE_CXXFLAGS=
AC_SUBST(KDE_CXXFLAGS)
])
AC_DEFUN(KDEV_ADD_DEPENDENCIES,
[
[A]M_DEPENDENCIES(CC)
])
dnl just a wrapper to clean up configure.in only for c projects
AC_DEFUN(KDEV_PROG_LIBTOOL,
[
AC_REQUIRE([AC_CHECK_C_COMPILER])
AC_REQUIRE([AC_ENABLE_SHARED])
AC_REQUIRE([AC_ENABLE_STATIC])
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
AC_LANG_SAVE
AC_LANG_C
AC_OBJEXT
AC_EXEEXT
AC_LANG_RESTORE
AM_PROG_LIBTOOL
AC_LIBTOOL_SETUP
LIBTOOL_SHELL="/bin/sh ./libtool"
# LIBTOOL="$LIBTOOL --silent"
])
# serial 46 AC_PROG_LIBTOOL
AC_DEFUN([AC_PROG_LIBTOOL],
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[AC_LIBTOOL_CXX],
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
])])
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
[AC_LIBTOOL_GCJ],
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
[AC_LIBTOOL_GCJ],
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
[AC_LIBTOOL_GCJ],
[ifdef([AC_PROG_GCJ],
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
])])
ifdef([A][M_PROG_GCJ],
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
])])
ifdef([LT_AC_PROG_GCJ],
[define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
])])])])])])
AC_DEFUN([_AC_PROG_LIBTOOL],
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
# Save cache, so that ltconfig can load it
AC_CACHE_SAVE
# Actually configure libtool. ac_aux_dir is where install-sh is found.
AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
|| AC_MSG_ERROR([libtool configure failed])
# Reload cache, that may have been modified by ltconfig
AC_CACHE_LOAD
# This can be used to rebuild libtool when needed
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
AC_SUBST(LIBTOOL)dnl
# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log
])
AC_DEFUN([AC_LIBTOOL_SETUP],
[AC_PREREQ(2.13)dnl
AC_REQUIRE([AC_ENABLE_SHARED])dnl
AC_REQUIRE([AC_ENABLE_STATIC])dnl
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_LD])dnl
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
AC_REQUIRE([AC_PROG_NM])dnl
AC_REQUIRE([AC_PROG_LN_S])dnl
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
AC_REQUIRE([AC_OBJEXT])dnl
AC_REQUIRE([AC_EXEEXT])dnl
dnl
# Only perform the check for file, if the check method requires it
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
AC_PATH_MAGIC
fi
;;
esac
AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_CHECK_TOOL(STRIP, strip, :)
# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
[libtool_flags="$libtool_flags --enable-dlopen"])
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
[libtool_flags="$libtool_flags --enable-win32-dll"])
AC_ARG_ENABLE(libtool-lock,
[ --disable-libtool-lock avoid locking (might break parallel builds)])
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
AC_ARG_WITH(pic,
[ --with-pic try to use only PIC/non-PIC objects [default=use both]],
pic_mode="$withval", pic_mode=default)
test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case $host in
*-*-irix6*)
# Find out which ABI we are using.
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
;;
*N32*)
LD="${LD-ld} -n32"
;;
*64-bit*)
LD="${LD-ld} -64"
;;
esac
fi
rm -rf conftest*
;;
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
[AC_LANG_SAVE
AC_LANG_C
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
AC_LANG_RESTORE])
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
CFLAGS="$SAVE_CFLAGS"
fi
;;
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
# recent cygwin and mingw systems supply a stub DllMain which the user
# can override, but on older systems we have to supply one
AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
[AC_TRY_LINK([],
[extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
DllMain (0, 0, 0);],
[lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
case $host/$CC in
*-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
# old mingw systems require "-dll" to link a DLL, while more recent ones
# require "-mdll"
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -mdll"
AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
[AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
CFLAGS="$SAVE_CFLAGS" ;;
*-*-cygwin* | *-*-pw32*)
# cygwin systems need to pass --dll to the linker, and not link
# crt.o which will require a WinMain@16 definition.
lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
esac
;;
])
esac
])
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
# AC_ENABLE_SHARED - implement the --enable-shared flag
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
AC_DEFUN([AC_ENABLE_SHARED],
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(shared,
changequote(<<, >>)dnl
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
case $enableval in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
for pkg in $enableval; do
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
IFS="$ac_save_ifs"
;;
esac],
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
])
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_SHARED(no)])
# AC_ENABLE_STATIC - implement the --enable-static flag
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
AC_DEFUN([AC_ENABLE_STATIC],
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(static,
changequote(<<, >>)dnl
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
case $enableval in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
for pkg in $enableval; do
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
IFS="$ac_save_ifs"
;;
esac],
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
])
# AC_DISABLE_STATIC - set the default static flag to --disable-static
AC_DEFUN([AC_DISABLE_STATIC],
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_STATIC(no)])
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(fast-install,
changequote(<<, >>)dnl
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
case $enableval in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
for pkg in $enableval; do
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
IFS="$ac_save_ifs"
;;
esac],
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
])
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_FAST_INSTALL(no)])
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
# Where MODE is either `yes' or `no'. If omitted, it defaults to
# `both'.
AC_DEFUN([AC_LIBTOOL_PICMODE],
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
pic_mode=ifelse($#,1,$1,default)])
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
AC_DEFUN([AC_PATH_TOOL_PREFIX],
[AC_MSG_CHECKING([for $1])
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
[case $MAGIC_CMD in
/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
?:/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
;;
*)
ac_save_MAGIC_CMD="$MAGIC_CMD"
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
dnl $ac_dummy forces splitting on constant user-supplied paths.
dnl POSIX.2 word splitting is done only on the output of word expansions,
dnl not every word. This closes a longstanding sh security hole.
ac_dummy="ifelse([$2], , $PATH, [$2])"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$1; then
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
egrep "$file_magic_regex" > /dev/null; then
:
else
cat <&2
*** Warning: the command libtool uses to detect shared libraries,
*** $file_magic_cmd, produces output that libtool cannot recognize.
*** The result is that libtool may fail to recognize shared libraries
*** as such. This will affect the creation of libtool libraries that
*** depend on shared libraries, but programs linked with such libtool
*** libraries will work regardless of this problem. Nevertheless, you
*** may want to report the problem to your system manager and/or to
*** bug-libtool@gnu.org
EOF
fi ;;
esac
fi
break
fi
done
IFS="$ac_save_ifs"
MAGIC_CMD="$ac_save_MAGIC_CMD"
;;
esac])
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
AC_MSG_RESULT($MAGIC_CMD)
else
AC_MSG_RESULT(no)
fi
])
# AC_PATH_MAGIC - find a file program which can recognise a shared library
AC_DEFUN([AC_PATH_MAGIC],
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
else
MAGIC_CMD=:
fi
fi
])
# AC_PROG_LD - find the path to the GNU or non-GNU linker
AC_DEFUN([AC_PROG_LD],
[AC_ARG_WITH(gnu-ld,
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
AC_MSG_CHECKING([for ld used by GCC])
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
esac
case $ac_prog in
# Accept absolute paths.
[[\\/]* | [A-Za-z]:[\\/]*)]
re_direlt=['/[^/][^/]*/\.\./']
# Canonicalize the path of ld
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
done
test -z "$LD" && LD="$ac_prog"
;;
"")
# If it fails, then pretend we aren't using GCC.
ac_prog=ld
;;
*)
# If it is relative, then search for the first ld in PATH.
with_gnu_ld=unknown
;;
esac
elif test "$with_gnu_ld" = yes; then
AC_MSG_CHECKING([for GNU ld])
else
AC_MSG_CHECKING([for non-GNU ld])
fi
AC_CACHE_VAL(lt_cv_path_LD,
[if test -z "$LD"; then
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
lt_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
test "$with_gnu_ld" != no && break
else
test "$with_gnu_ld" != yes && break
fi
fi
done
IFS="$ac_save_ifs"
else
lt_cv_path_LD="$LD" # Let the user override the test with a path.
fi])
LD="$lt_cv_path_LD"
if test -n "$LD"; then
AC_MSG_RESULT($LD)
else
AC_MSG_RESULT(no)
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
AC_PROG_LD_GNU
])
AC_DEFUN([AC_PROG_LD_GNU],
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 &5; then
lt_cv_prog_gnu_ld=yes
else
lt_cv_prog_gnu_ld=no
fi])
with_gnu_ld=$lt_cv_prog_gnu_ld
])
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
# -- PORTME Some linkers may need a different reload flag.
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
[lt_cv_ld_reload_flag='-r'])
reload_flag=$lt_cv_ld_reload_flag
test -n "$reload_flag" && reload_flag=" $reload_flag"
])
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
# -- PORTME fill in with the dynamic library characteristics
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
[AC_CACHE_CHECK([how to recognise dependant libraries],
lt_cv_deplibs_check_method,
[lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
lt_cv_deplibs_check_method='unknown'
# Need to set the preceding variable on all platforms that support
# interlibrary dependencies.
# 'none' -- dependencies not supported.
# `unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
# 'test_compile' -- check by making test program.
# 'file_magic [regex]' -- check by looking for files in library path
# which responds to the $file_magic_cmd with a given egrep regex.
# If you have `file' or equivalent on your system and you're not sure
# whether `pass_all' will *always* work, you probably want this one.
case $host_os in
aix*)
lt_cv_deplibs_check_method=pass_all
;;
beos*)
lt_cv_deplibs_check_method=pass_all
;;
bsdi4*)
lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
lt_cv_file_magic_cmd='/usr/bin/file -L'
lt_cv_file_magic_test_file=/shlib/libc.so
;;
cygwin* | mingw* |pw32*)
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
lt_cv_file_magic_cmd='$OBJDUMP -f'
;;
darwin* | rhapsody*)
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
lt_cv_file_magic_cmd='/usr/bin/file -L'
case "$host_os" in
rhapsody* | darwin1.[012])
lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
;;
*) # Darwin 1.3 on
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
;;
esac
;;
freebsd* )
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up.
lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;;
esac
else
lt_cv_deplibs_check_method=pass_all
fi
;;
gnu*)
lt_cv_deplibs_check_method=pass_all
;;
hpux10.20*|hpux11*)
lt_cv_deplibs_check_method=['file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/libc.sl
;;
irix5* | irix6*)
case $host_os in
irix5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
;;
*)
case $LD in
*-32|*"-32 ") libmagic=32-bit;;
*-n32|*"-n32 ") libmagic=N32;;
*-64|*"-64 ") libmagic=64-bit;;
*) libmagic=never-match;;
esac
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
;;
esac
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
lt_cv_deplibs_check_method=pass_all
;;
# This must be Linux ELF.
linux-gnu*)
case $host_cpu in
alpha* | i*86 | powerpc* | sparc* | ia64* | s390* | m68k* | arm* | mips* | hppa* | sh* )
lt_cv_deplibs_check_method=pass_all ;;
*)
# glibc up to 2.1.1 does not perform some relocations on ARM
lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
esac
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
[lt_cv_deplibs_check_method='file_magic NetBSD/[a-z0-9]* demand paged shared library']
else
[lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object']
fi
lt_cv_file_magic_cmd='/usr/bin/file -L'
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
;;
openbsd* )
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case "$host_cpu" in
i*86 )
changequote(,)dnl
lt_cv_deplibs_check_method='file_magic OpenBSD/i[3-9]86 demand paged shared library'
changequote([, ])dnl
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;;
esac
else
lt_cv_deplibs_check_method=pass_all
fi
;;
newsos6)
[lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/libnls.so
;;
osf3* | osf4* | osf5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
lt_cv_file_magic_test_file=/shlib/libc.so
lt_cv_deplibs_check_method=pass_all
;;
sco3.2v5*)
lt_cv_deplibs_check_method=pass_all
;;
solaris*)
lt_cv_deplibs_check_method=pass_all
lt_cv_file_magic_test_file=/lib/libc.so
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
case $host_vendor in
ncr)
lt_cv_deplibs_check_method=pass_all
;;
motorola)
lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]']
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
;;
esac
;;
esac
])
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
])
# AC_PROG_NM - find the path to a BSD-compatible name lister
AC_DEFUN([AC_PROG_NM],
[AC_MSG_CHECKING([for BSD-compatible nm])
AC_CACHE_VAL(lt_cv_path_NM,
[if test -n "$NM"; then
# Let the user override the test.
lt_cv_path_NM="$NM"
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
test -z "$ac_dir" && ac_dir=.
tmp_nm=$ac_dir/${ac_tool_prefix}nm
if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
# Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
# Tru64's nm complains that /dev/null is an invalid object file
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
lt_cv_path_NM="$tmp_nm -B"
break
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
lt_cv_path_NM="$tmp_nm -p"
break
else
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
continue # so that we can try to find one that supports BSD flags
fi
fi
done
IFS="$ac_save_ifs"
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
fi])
NM="$lt_cv_path_NM"
AC_MSG_RESULT([$NM])
])
# AC_CHECK_LIBM - check for math library
AC_DEFUN([AC_CHECK_LIBM],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
LIBM=
case $host in
*-*-beos* | *-*-cygwin* | *-*-pw32*)
# These system don't have libm
;;
*-ncr-sysv4.3*)
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
;;
*)
AC_CHECK_LIB(m, main, LIBM="-lm")
;;
esac
])
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
# the libltdl convenience library and INCLTDL to the include flags for
# the libltdl header and adds --enable-ltdl-convenience to the
# configure arguments. Note that LIBLTDL and INCLTDL are not
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
# with '${top_builddir}/' and INCLTDL will be prefixed with
# '${top_srcdir}/' (note the single quotes!). If your package is not
# flat and you're not using automake, define top_builddir and
# top_srcdir appropriately in the Makefiles.
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
case $enable_ltdl_convenience in
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
"") enable_ltdl_convenience=yes
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
esac
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
])
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
# the libltdl installable library and INCLTDL to the include flags for
# the libltdl header and adds --enable-ltdl-install to the configure
# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
# with '${top_srcdir}/' (note the single quotes!). If your package is
# not flat and you're not using automake, define top_builddir and
# top_srcdir appropriately in the Makefiles.
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_CHECK_LIB(ltdl, main,
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
[if test x"$enable_ltdl_install" = xno; then
AC_MSG_WARN([libltdl not installed, but installation disabled])
else
enable_ltdl_install=yes
fi
])
if test x"$enable_ltdl_install" = x"yes"; then
ac_configure_args="$ac_configure_args --enable-ltdl-install"
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
else
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
LIBLTDL="-lltdl"
INCLTDL=
fi
])
# If this macro is not defined by Autoconf, define it here.
ifdef([AC_PROVIDE_IFELSE],
[],
[define([AC_PROVIDE_IFELSE],
[ifdef([AC_PROVIDE_$1],
[$2], [$3])])])
# AC_LIBTOOL_CXX - enable support for C++ libraries
AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
AC_DEFUN([_AC_LIBTOOL_CXX],
[AC_REQUIRE([AC_PROG_CXX])
AC_REQUIRE([AC_PROG_CXXCPP])
LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
lt_save_CC="$CC"
lt_save_CFLAGS="$CFLAGS"
dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
dnl is set to the C++ compiler.
AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
deplibs_check_method="$deplibs_check_method" \
file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
--build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
|| AC_MSG_ERROR([libtool tag configuration failed])
CC="$lt_save_CC"
CFLAGS="$lt_save_CFLAGS"
# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log
])
# AC_LIBTOOL_GCJ - enable support for GCJ libraries
AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
AC_DEFUN([_AC_LIBTOOL_GCJ],
[AC_REQUIRE([AC_PROG_LIBTOOL])
AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
lt_save_CC="$CC"
lt_save_CFLAGS="$CFLAGS"
dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
dnl is set to the C++ compiler.
AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
deplibs_check_method="$deplibs_check_method" \
file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
--build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
|| AC_MSG_ERROR([libtool tag configuration failed])
CC="$lt_save_CC"
CFLAGS="$lt_save_CFLAGS"
# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log
])
dnl old names
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
dnl This is just to silence aclocal about the macro not being used
ifelse([AC_DISABLE_FAST_INSTALL])dnl
AC_DEFUN([LT_AC_PROG_GCJ],
[AC_CHECK_TOOL(GCJ, gcj, no)
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
AC_SUBST(GCJFLAGS)
])
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.
# serial 5
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
# We require 2.13 because we rely on SHELL being computed by configure.
AC_PREREQ([2.13])
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
# -----------------------------------------------------------
# If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
# The purpose of this macro is to provide the user with a means to
# check macros which are provided without letting her know how the
# information is coded.
# If this macro is not defined by Autoconf, define it here.
ifdef([AC_PROVIDE_IFELSE],
[],
[define([AC_PROVIDE_IFELSE],
[ifdef([AC_PROVIDE_$1],
[$2], [$3])])])
# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
# ----------------------------------------------
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_REQUIRE([AC_PROG_INSTALL])dnl
# test to see if srcdir already configured
if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
fi
# Define the identity of the package.
PACKAGE=$1
AC_SUBST(PACKAGE)dnl
VERSION=$2
AC_SUBST(VERSION)dnl
ifelse([$3],,
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
# the ones we care about.
ifdef([m4_pattern_allow],
[m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
# Autoconf 2.50 always computes EXEEXT. However we need to be
# compatible with 2.13, for now. So we always define EXEEXT, but we
# don't compute it.
AC_SUBST(EXEEXT)
# Similar for OBJEXT -- only we only use OBJEXT if the user actually
# requests that it be used. This is a bit dumb.
: ${OBJEXT=o}
AC_SUBST(OBJEXT)
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
AM_MISSING_PROG(ACLOCAL, aclocal)
AM_MISSING_PROG(AUTOCONF, autoconf)
AM_MISSING_PROG(AUTOMAKE, automake)
AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo)
AM_MISSING_PROG(AMTAR, tar)
AM_PROG_INSTALL_SH
AM_PROG_INSTALL_STRIP
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
AC_REQUIRE([AM_SET_DEPDIR])dnl
AC_PROVIDE_IFELSE([AC_PROG_][CC],
[_AM_DEPENDENCIES(CC)],
[define([AC_PROG_][CC],
defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_][CXX],
[_AM_DEPENDENCIES(CXX)],
[define([AC_PROG_][CXX],
defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
])
#
# Check to make sure that the build environment is sane.
#
# serial 3
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
if test "$[*]" = "X"; then
# -L didn't work.
set X `ls -t $srcdir/configure conftest.file`
fi
rm -f conftest.file
if test "$[*]" != "X $srcdir/configure conftest.file" \
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
alias in your environment])
fi
test "$[2]" = conftest.file
)
then
# Ok.
:
else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
AC_MSG_RESULT(yes)])
# serial 2
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
[AC_REQUIRE([AM_MISSING_HAS_RUN])
$1=${$1-"${am_missing_run}$2"}
AC_SUBST($1)])
# AM_MISSING_HAS_RUN
# ------------------
# Define MISSING if not defined so far and test if it supports --run.
# If it does, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
am_backtick='`'
AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
fi
])
# AM_AUX_DIR_EXPAND
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
#
# Of course, Automake must honor this variable whenever it calls a
# tool from the auxiliary directory. The problem is that $srcdir (and
# therefore $ac_aux_dir as well) can be either absolute or relative,
# depending on how configure is run. This is pretty annoying, since
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
# source directory, any form will work fine, but in subdirectories a
# relative path needs to be adjusted first.
#
# $ac_aux_dir/missing
# fails when called from a subdirectory if $ac_aux_dir is relative
# $top_srcdir/$ac_aux_dir/missing
# fails if $ac_aux_dir is absolute,
# fails when called from a subdirectory in a VPATH build with
# a relative $ac_aux_dir
#
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
# are both prefixed by $srcdir. In an in-source build this is usually
# harmless because $srcdir is `.', but things will broke when you
# start a VPATH build or use an absolute $srcdir.
#
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
# and then we would define $MISSING as
# MISSING="\${SHELL} $am_aux_dir/missing"
# This will work as long as MISSING is not called from configure, because
# unfortunately $(top_srcdir) has no meaning in configure.
# However there are other variables, like CC, which are often used in
# configure, and could therefore not use this "fixed" $ac_aux_dir.
#
# Another solution, used here, is to always expand $ac_aux_dir to an
# absolute PATH. The drawback is that using absolute paths prevent a
# configured tree to be moved without reconfiguration.
AC_DEFUN([AM_AUX_DIR_EXPAND], [
# expand $ac_aux_dir to an absolute path
am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
])
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
# One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
# is unlikely to handle the host's binaries.
# Fortunately install-sh will honor a STRIPPROG variable, so we
# always use install-sh in `make install-strip', and initialize
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# serial 4 -*- Autoconf -*-
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
# _AM_DEPENDENCIES(NAME)
# ---------------------
# See how the compiler implements dependency checking.
# NAME is "CC", "CXX" or "OBJC".
# We try a few techniques and use that to set a single cache variable.
#
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
# dependency, and given that the user is not expected to run this macro,
# just rely on AC_PROG_CC.
AC_DEFUN([_AM_DEPENDENCIES],
[AC_REQUIRE([AM_SET_DEPDIR])dnl
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
[$1], CXX, [depcc="$CXX" am_compiler_list=],
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
[depcc="$$1" am_compiler_list=])
AC_CACHE_CHECK([dependency style of $depcc],
[am_cv_$1_dependencies_compiler_type],
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
am_cv_$1_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
for depmode in $am_compiler_list; do
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
echo '#include "conftest.h"' > conftest.c
echo 'int i;' > conftest.h
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
none) break ;;
esac
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=conftest.c object=conftest.o \
depfile=conftest.Po tmpdepfile=conftest.TPo \
$SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
grep conftest.h conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
am_cv_$1_dependencies_compiler_type=$depmode
break
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_$1_dependencies_compiler_type=none
fi
])
$1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
AC_SUBST([$1DEPMODE])
])
# AM_SET_DEPDIR
# -------------
# Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
AC_DEFUN([AM_SET_DEPDIR],
[rm -f .deps 2>/dev/null
mkdir .deps 2>/dev/null
if test -d .deps; then
DEPDIR=.deps
else
# MS-DOS does not allow filenames that begin with a dot.
DEPDIR=_deps
fi
rmdir .deps 2>/dev/null
AC_SUBST(DEPDIR)
])
# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
[AC_ARG_ENABLE(dependency-tracking,
[ --disable-dependency-tracking Speeds up one-time builds
--enable-dependency-tracking Do not reject slow dependency extractors])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
pushdef([subst], defn([AC_SUBST]))
subst(AMDEPBACKSLASH)
popdef([subst])
])
# Generate code to set up dependency tracking.
# This macro should only be invoked once -- use via AC_REQUIRE.
# Usage:
# AM_OUTPUT_DEPENDENCY_COMMANDS
#
# This code is only required when automatic dependency tracking
# is enabled. FIXME. This creates each `.P' file that we will
# need in order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
AC_OUTPUT_COMMANDS([
test x"$AMDEP_TRUE" != x"" ||
for mf in $CONFIG_FILES; do
case "$mf" in
Makefile) dirpart=.;;
*/Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
*) continue;;
esac
grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
# Extract the definition of DEP_FILES from the Makefile without
# running `make'.
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
test -z "$DEPDIR" && continue
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n -e '/^U = / s///p' < "$mf"`
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
# We invoke sed twice because it is the simplest approach to
# changing $(DEPDIR) to its actual value in the expansion.
for file in `sed -n -e '
/^DEP_FILES = .*\\\\$/ {
s/^DEP_FILES = //
:loop
s/\\\\$//
p
n
/\\\\$/ b loop
p
}
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
$ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
], [AMDEP_TRUE="$AMDEP_TRUE"
ac_aux_dir="$ac_aux_dir"])])
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
doit:
@echo done
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
am__include='#'
am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# We grep out `Entering directory' and `Leaving directory'
# messages which can occur if `w' ends up in MAKEFLAGS.
# In particular we don't look at `^make:' because GNU make might
# be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'.
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
am__include=include
am__quote=
_am_result=GNU
fi
# Now try BSD make style include.
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
am__include=.include
am__quote='"'
_am_result=BSD
fi
fi
AC_SUBST(am__include)
AC_SUBST(am__quote)
AC_MSG_RESULT($_am_result)
rm -f confinc confmf
])
# serial 3
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
#
# FIXME: Once using 2.50, use this:
# m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_DEFUN([AM_CONDITIONAL],
[ifelse([$1], [TRUE],
[errprint(__file__:__line__: [$0: invalid condition: $1
])dnl
m4exit(1)])dnl
ifelse([$1], [FALSE],
[errprint(__file__:__line__: [$0: invalid condition: $1
])dnl
m4exit(1)])dnl
AC_SUBST([$1_TRUE])
AC_SUBST([$1_FALSE])
if $2; then
$1_TRUE=
$1_FALSE='#'
else
$1_TRUE='#'
$1_FALSE=
fi])
# AM_PROG_LEX
# Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
AC_DEFUN([AM_PROG_LEX],
[AC_REQUIRE([AM_MISSING_HAS_RUN])
AC_CHECK_PROGS(LEX, flex lex, [${am_missing_run}flex])
AC_PROG_LEX
AC_DECL_YYTEXT])
# Like AC_CONFIG_HEADER, but automatically create stamp file.
# serial 3
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. We must strip everything past the first ":",
# and everything past the last "/".
AC_PREREQ([2.12])
AC_DEFUN([AM_CONFIG_HEADER],
[ifdef([AC_FOREACH],dnl
[dnl init our file count if it isn't already
m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
dnl prepare to store our destination file list for use in config.status
AC_FOREACH([_AM_File], [$1],
[m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
dnl and add it to the list of files AC keeps track of, along
dnl with our hook
AC_CONFIG_HEADERS(_AM_File,
dnl COMMANDS, [, INIT-CMDS]
[# update the timestamp
echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
m4_popdef([_AM_Dest])])],dnl
[AC_CONFIG_HEADER([$1])
AC_OUTPUT_COMMANDS(
ifelse(patsubst([$1], [[^ ]], []),
[],
[test -z "$CONFIG_HEADERS" || echo timestamp >dnl
patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
[am_indx=1
for am_file in $1; do
case " \$CONFIG_HEADERS " in
*" \$am_file "*)
am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
if test -n "\$am_dir"; then
am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
am_tmpdir=\$am_tmpdir\$am_subdir/
if test ! -d \$am_tmpdir; then
mkdir \$am_tmpdir
fi
done
fi
echo timestamp > "\$am_dir"stamp-h\$am_indx
;;
esac
am_indx=\`expr \$am_indx + 1\`
done])
])]) # AM_CONFIG_HEADER
# _AM_DIRNAME(PATH)
# -----------------
# Like AS_DIRNAME, only do it during macro expansion
AC_DEFUN([_AM_DIRNAME],
[m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
m4_if(m4_regexp([$1], [^/.*]), -1,
[.],
m4_patsubst([$1], [^\(/\).*], [\1])),
m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
]) # _AM_DIRNAME
ed2k_hash-0.3.3/special.m4.in 0000644 0001750 0001750 00000005747 07535440712 014650 0 ustar tiago tiago AC_DEFUN(AC_CHECK_C_COMPILER,
[
AC_ARG_ENABLE(debug,[ --enable-debug enables debug symbols [default=no]],
[
if test $enableval = "no"; dnl
then
kde_use_debug_code="no"
kde_use_debug_define=yes
else
kde_use_debug_code="yes"
kde_use_debug_define=no
fi
],
[kde_use_debug_code="no"
kde_use_debug_define=no
])
dnl Just for configure --help
AC_ARG_ENABLE(dummyoption,[ --disable-debug disables debug output and debug symbols [default=no]],[],[])
AC_ARG_ENABLE(strict,[ --enable-strict compiles with strict compiler options (may not work!)],
[
if test $enableval = "no"; then
kde_use_strict_options="no"
else
kde_use_strict_options="yes"
fi
], [kde_use_strict_options="no"])
AC_ARG_ENABLE(profile,[ --enable-profile creates profiling infos [default=no]],
[kde_use_profiling=$enableval],
[kde_use_profiling="no"]
)
dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
CFLAGS=" $CFLAGS"
AC_PROG_CC
if test "$GCC" = "yes"; then
if test "$kde_use_debug_code" = "yes"; then
CFLAGS="-g -O2 $CFLAGS"
case $host in
*-*-linux-gnu)
CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
;;
esac
else
CFLAGS="-O2 $CFLAGS"
fi
fi
if test "$kde_use_debug_define" = "yes"; then
CFLAGS="-DNDEBUG $CFLAGS"
fi
case "$host" in
*-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
*-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
esac
if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
LDFLAGS=""
fi
if test "$kde_use_profiling" = "yes"; then
KDE_CHECK_COMPILER_FLAG(pg,
[
CFLAGS="-pg $CFLAGS"
])
fi
USE_EXCEPTIONS=
AC_SUBST(USE_EXCEPTIONS)
dnl obsolete macro - provided to keep things going
USE_RTTI=
AC_SUBST(USE_RTTI)
AC_PROG_CPP
# the following is to allow programs, that are known to
# have problems when compiled with -O2
if test -n "$CFLAGS"; then
kde_safe_IFS=$IFS
IFS=" "
NOOPT_CFLAGS=""
for i in $CFLAGS; do
case $i in
-O*)
;;
*)
NOOPT_CFLAGS="$NOOPT_CFLAGS $i"
;;
esac
done
IFS=$kde_safe_IFS
fi
AC_SUBST(NOOPT_CFLAGS)
KDE_CHECK_FINAL
ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDEV_ADD_DEPENDENCIES]), [])
KDE_CXXFLAGS=
AC_SUBST(KDE_CXXFLAGS)
])
AC_DEFUN(KDEV_ADD_DEPENDENCIES,
[
[A]M_DEPENDENCIES(CC)
])
dnl just a wrapper to clean up configure.in only for c projects
AC_DEFUN(KDEV_PROG_LIBTOOL,
[
AC_REQUIRE([AC_CHECK_C_COMPILER])
AC_REQUIRE([AC_ENABLE_SHARED])
AC_REQUIRE([AC_ENABLE_STATIC])
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
AC_LANG_SAVE
AC_LANG_C
AC_OBJEXT
AC_EXEEXT
AC_LANG_RESTORE
AM_PROG_LIBTOOL
AC_LIBTOOL_SETUP
LIBTOOL_SHELL="/bin/sh ./libtool"
# LIBTOOL="$LIBTOOL --silent"
])
ed2k_hash-0.3.3/ed2k_hash/ 0000755 0001750 0001750 00000000000 11257540433 014171 5 ustar tiago tiago ed2k_hash-0.3.3/ed2k_hash/main.c 0000644 0001750 0001750 00000017302 07610333276 015267 0 ustar tiago tiago /***************************************************************************
main.c - description
-------------------
begin : Mon Sep 2 19:30:41 BST 2002
copyright : (C) 2002 by Tim-Philipp Müller
email : t.i.m@orange.net
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
/* ed2k_hash
*
* This program is a tool for the eDonkey2000 and overnet file sharing
* programs and a complete rewrite of the original tool (v0.1/v0.2).
*
* It produces the 'ed2k-hash' and 'ed2k-link' of a file or a number of
* files.
*
* Adding different input/output contexts ([G]UIs) shouldn't be too hard.
*
*/
#ifdef HAVE_CONFIG_H
# include
#endif
#include "global.h"
#if (defined(__linux__) || defined(__MAC_OS_X__) || defined(__FreeBSD__))
# include
# include
# include
# include
#endif
#ifdef __WIN32
# include
#endif
#include
#include
#include
#include
#include "global.h"
#include "linkedlist.h"
#include "options.h"
#include "ui.h" /* user interface */
/* functions */
static int expand_if_directory (char *fn, SList **p_list);
static int is_directory (char *fn);
static int read_directory (char *fn, SList **p_list);
/* main
*
*/
int
#if defined(__WIN32) && defined(_GUI)
/* 12/01/2003 JL: this causes problem with the GUI... */
main_entry_point(int argc, char *argv[])
#else
main (int argc, char *argv[])
#endif
{
int exit_value = EXIT_FAILURE;
if (ui_init())
{
/* ui_setoptions() returns the argument number that is the first file/directory
* specified
*/
int argfiles = ui_setoptions(argc,argv);
if (argfiles)
{
SList *files = NULL;
SList *node = NULL;
while (argfilesdata)
free(node->data);
node = node->next;
}
}
}
if (!ui_cleanup())
exit_value = EXIT_FAILURE;
return exit_value;
}
/* expand_if_directory
*
* Takes a filename and the adress of a linked list pointer.
* If the filename is a directory, it will read the directory and
* append all the files in it to the linked list.
* If option_recursive is set, sub-directories will be searched
* as well.
*
* returns 0 if the filename is not a directory,
* returns 1 if it is a directory
* returns -1 in case of error
*
*/
static int
expand_if_directory (char *fn, SList **p_list)
{
int ret;
if ((!fn)||(!p_list))
return -1;
ret = is_directory(fn);
if (ret<0) /* error - neiher file nor directory */
return -1;
if (ret==0) /* not a directory */
return 0;
if (option_excludedirs)
return 1;
/* it is a directory => read in entries (unless option_excludedirs is set)*/
return read_directory (fn, p_list);
}
/* is_directory
*
* checks whether the filename specified is a directory or not
*
* returns 0 if the filename is not a directory,
* returns 1 if it is a directory
* returns -1 in case of error
*
*/
#if (defined(__linux__) || defined(__MAC_OS_X__) || defined(__FreeBSD__))
static int
is_directory (char *fn)
{
struct stat filestat;
if (!fn)
return -1;
if (stat (fn, &filestat)<0)
{
ui_printerr ("stat(%s) failed - %s\n\n", fn, strerror(errno));
return -1;
}
/* is it a directory? */
if (S_ISDIR(filestat.st_mode))
return 1;
/* is it a regular file or a symbolic link? */
if ((S_ISREG(filestat.st_mode)) || (S_ISLNK(filestat.st_mode)))
return 0;
return -1;
}
#elif defined(__WIN32)
static int
is_directory (char *fn)
{
WIN32_FIND_DATA data;
HANDLE hFile = FindFirstFile(fn, &data);
if (hFile != INVALID_HANDLE_VALUE)
{
int ret = 0;
if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
ret = 1;
}
CloseHandle(hFile);
return ret;
}
return -1;
}
#else
static int
is_directory (char *fn)
{
struct stat filestat;
if (!fn)
return -1;
ui_print ("IMPLEMENT ME FOR THIS OPERATING SYSTEM/PLATFORM: %s\n", __FUNCTION__);
return 0;
}
#endif
/* read_directory
*
* reads in the files from the specified directory and appends them to the list given
*
*/
#if (defined(__linux__) || defined(__MAC_OS_X__) || defined(__FreeBSD__))
static int
read_directory (char *fn, SList **p_list)
{
struct dirent *entry;
DIR *d;
if ((!fn)||(!p_list))
return -1;
d = opendir (fn);
if (!d)
{
ui_printerr ("opendir() failed - %s\n", strerror(errno));
return -1;
}
while ((entry=readdir(d)))
{
if ((entry->d_name) && entry->d_name[0]!='.') /* skip hidden files and dirs */
{
int pathfnlen = strlen(fn)+1+strlen(entry->d_name)+2;
char *pathfn = (char*) malloc(pathfnlen);
if (pathfn)
{
int isdir;
snprintf (pathfn, pathfnlen, "%s%s%s", fn, (fn[strlen(fn)-1]=='/') ? "" : "/", entry->d_name);
isdir = is_directory (pathfn);
if (isdir==0)
{
*p_list = slist_append (*p_list, (void*) pathfn);
} else {
if ((isdir==1) && (option_recursive))
expand_if_directory (pathfn, p_list);
free(pathfn); /* don't need to save this in the file list => free it */
}
}
}
}
closedir(d);
return 1;
}
#elif defined(__WIN32)
static int
read_directory (char *fn, SList **p_list)
{
char *pat = (char*)malloc(strlen(fn) + 5);
strcpy(pat, fn);
int fullpathlen = strlen(pat);
if (pat[strlen(pat) - 1] != '\\')
{
strcat(pat, "\\");
++fullpathlen;
}
strcat(pat, "*.*");
WIN32_FIND_DATA data;
HANDLE hFile = FindFirstFile(pat, &data);
if (hFile != INVALID_HANDLE_VALUE)
{
do
{
if ((data.cFileName[0] != '.')) /* don't even know if it's meaningful under Windows :) */
{
char *fullname = (char*)malloc(fullpathlen + strlen(data.cFileName) + 1);
sprintf(fullname, "%.*s%s", fullpathlen, pat, data.cFileName);
/* could use is_directory, but it's more efficient this way */
if ((data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
{
*p_list = slist_append (*p_list, (void*)fullname);
}
else
{
if (option_recursive)
{
expand_if_directory(fullname, p_list);
}
free(fullname); /* don't need to save directory name in file list => free it */
}
}
}
while (FindNextFile(hFile, &data));
CloseHandle(hFile);
}
free(pat);
/* no error case, as far as I know */
return 1;
}
#else
static int
read_directory (char *fn, SList **p_list)
{
ui_print ("IMPLEMENT ME FOR THIS OPERATING SYSTEM/PLATFORM: %s\n", __FUNCTION__);
return 0;
}
#endif
ed2k_hash-0.3.3/ed2k_hash/md4.h 0000644 0001750 0001750 00000007223 11316154710 015025 0 ustar tiago tiago /***************************************************************************
md4.h - description
-------------------
begin : Tue Sep 3 2002
copyright : (C) 2002 by Tim-Philipp Müller
email : t.i.m@orange.net
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
#ifndef _ed2k_hash_md4_h_included_
#define _ed2k_hash_md4_h_included_
/* we could use the openssl md4 hashing routines instead of our own.
Anyone care to add the configure skript check for openssl and the MD4 routines?
*/
#ifdef HAVE_OPENSSL
# include
#else
/* MD4.H - header file for MD4C.C
*/
/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
rights reserved.
License to copy and use this software is granted provided that it
is identified as the "RSA Data Security, Inc. MD4 Message-Digest
Algorithm" in all material mentioning or referencing this software
or this function.
License is also granted to make and use derivative works provided
that such works are identified as "derived from the RSA Data
Security, Inc. MD4 Message-Digest Algorithm" in all material
mentioning or referencing the derived work.
RSA Data Security, Inc. makes no representations concerning either
the merchantability of this software or the suitability of this
software for any particular purpose. It is provided "as is"
without express or implied warranty of any kind.
These notices must be retained in any copies of any part of this
documentation and/or software.
*/
/* PROTOTYPES should be set to one if and only if the compiler supports
function argument prototyping.
The following makes PROTOTYPES default to 0 if it has not already
been defined with C compiler flags.
*/
#ifndef PROTOTYPES
#define PROTOTYPES 0
#endif
/* POINTER defines a generic pointer type */
typedef unsigned char *POINTER;
/* UINT2 defines a two byte word */
typedef unsigned short int UINT2;
/* UINT4 defines a four byte word */
/* unsigned long int on 64bit is 8 bits */
typedef unsigned int UINT4;
/* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
returns an empty list.
*/
#if PROTOTYPES
#define PROTO_LIST(list) list
#else
#define PROTO_LIST(list) ()
#endif
/* MD4 context. */
#define MD4_Init MD4Init
#define MD4_Update MD4Update
#define MD4_Final MD4Final
typedef struct
{
UINT4 state[4]; /* state (ABCD) */
UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
unsigned char buffer[64]; /* input buffer */
} MD4_CTX;
void MD4Init PROTO_LIST ((MD4_CTX *));
void MD4Update PROTO_LIST
((MD4_CTX *, unsigned char *, unsigned int));
void MD4Final PROTO_LIST ((unsigned char [16], MD4_CTX *));
/*unsigned char *MD4 (unsigned char *data, unsigned int len, unsigned char *md);*/
#endif /* ifdef HAVE_OPENSSL */
#endif /* ifndef _ed2k_hash_md4_h_included_ */
ed2k_hash-0.3.3/ed2k_hash/linkedlist.h 0000644 0001750 0001750 00000002535 07535440725 016520 0 ustar tiago tiago /***************************************************************************
linkedlist.h - description
-------------------
begin : Mon Sep 2 2002
copyright : (C) 2002 by Tim-Philipp Müller
email : t.i.m@orange.net
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
#ifndef _ed2k_hash_linkedlist_h_included_
#define _ed2k_hash_linkedlist_h_included_
/* a single linked list */
struct _SList
{
void *next;
void *data;
void *last;
} ;
typedef struct _SList SList;
SList *slist_append (SList *list, void *data);
unsigned int slist_length (SList *list);
#endif /* ifndef _ed2k_hash_linkedlist_h_included_ */
ed2k_hash-0.3.3/ed2k_hash/cl_ui.c 0000644 0001750 0001750 00000011431 07610007023 015417 0 ustar tiago tiago /***************************************************************************
cl_ui.c - description
-------------------
begin : Mon Sep 2 2002
copyright : (C) 2002 by Tim-Philipp Müller
email : t.i.m@orange.net
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
#include
#include
#include
#include "global.h"
#include "cl_ui.h"
#include "options.h"
#include "processfile.h"
/* ui_init
*
*/
int
ui_init (void)
{
return 1; /* nothing to do here for the command line client version */
}
/* ui_cleanup
*
*/
int
ui_cleanup (void)
{
if (option_waitwhenfinito)
{
fprintf (stderr, "\n");
(void) fgetc(stdin);
}
return 1; /* nothing else to do here for the command line client version */
}
/* ui_print
*
* displays a normal message to the user, takes arguments like printf()
*
*/
int
ui_print (const char *format, ...)
{
int ret = 0;
va_list args;
if (!option_quiet)
{
va_start(args,format);
ret = vprintf(format,args);
va_end(args);
}
return ret;
}
/* ui_printerr
*
* displays an error message to the user, takes arguments like printf()
*
*/
int
ui_printerr (const char *format, ...)
{
va_list args;
char *errformat;
int ret;
if (option_silent)
return 0;
if (!format)
return -1;
errformat = alloca(strlen(PRINTERR_PREFIX)+strlen(format)+2);
if (!errformat)
return -1;
snprintf (errformat, strlen(PRINTERR_PREFIX)+strlen(format)+1, "%s%s",
PRINTERR_PREFIX, format);
va_start(args,format);
ret = vfprintf(stderr,errformat,args);
va_end(args);
return ret;
}
/* ui_setoptions
*
* parses the options given on the command line
*
* returns 0 on failure
* returns the first argument number that is presumably a filename or directory name
*
*/
int
ui_setoptions (int argc, char *argv[])
{
int i=0;
if ((argc>1) && (argv))
{
i = 1; /* the first argument is by convention the program name - skip that */
while ((idata)
{
fileinfo info;
if ((option_debug)||(option_verbose))
ui_print ("hashing file : %s\n", (char*)node->data);
/* note: if process_file() returns 0, that might mean that an error
has occured (e.g. filesize==0 or I/O error), _OR_ that ui_update()
has requested us to stop processing. You will need to deal with
that via some global variabel or something here in order to
distinguish those two events for a GUI
*/
memset (&info, 0x00, sizeof(info));
if (process_file ((char*)node->data, &info))
{
if (!option_htmllink)
{
ui_print ("ed2k://|file|%s|%u|%s|\n",
info.basename,
info.size,
info.ed2k_hash_str);
} else {
ui_print ("%s\n",
info.basename,
info.size,
info.ed2k_hash_str,
(option_htmlfull) ? info.filepath : info.basename);
}
} else ui_printerr ("while processing file '%s'\n", (char*)node->data);
process_file_free_info_structure_content(&info);
}
node = node->next;
}
return 1;
}
/* ui_update
*
* called regularly during hashing (so GUI clients can update the window and process
* messages etc.).
*
* returns 0 if hashing should stop, otherwise 1 (implement this in ui_run() via a global variable)
*
*/
int
ui_update (char *filepath, unsigned int size, unsigned int done)
{
return 1; /* nothing to do for us here */
}
ed2k_hash-0.3.3/ed2k_hash/processfile.h 0000644 0001750 0001750 00000003526 07610007023 016655 0 ustar tiago tiago /***************************************************************************
processfile.h - description
-------------------
begin : Tue Sep 3 2002
copyright : (C) 2002 by Tim-Philipp Müller
email : t.i.m@orange.net
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
#ifndef _ed2k_hash_processfile_h_included_
#define _ed2k_hash_processfile_h_included_
#define BLOCKSIZE (9500*1024)
#ifdef __WIN32
# define SLASH_CHAR '\\'
#else
# define SLASH_CHAR '/'
#endif /* ifdef __WIN32 */
struct _fileinfo
{
char *filepath;
char *basename; /* the filename w/o path component */
unsigned int blocks;
unsigned char *parthashes; /* the partial hashes in a row */
unsigned char *ed2k_hash; /* the ed2k_hash in binary form */
char *ed2k_hash_str; /* the ed2k_hash in ASCII form */
void *user_data; /* extra data GUIs might set */
unsigned int size; /* the filesize in bytes */
} ;
typedef struct _fileinfo fileinfo;
int process_file (const char *fn, fileinfo *info);
void process_file_free_info_structure_content(fileinfo *info);
#endif /* ifndef _ed2k_hash_processfile_h_included_ */
ed2k_hash-0.3.3/ed2k_hash/Makefile.mingw32 0000644 0001750 0001750 00000000764 07610333276 017130 0 ustar tiago tiago
#
# primitive makefile to build ed2k_hash with
# Mingw32
#
CC=gcc
CFLAGS=-O2 -march=i486
#CFLAGS=-g -Wall
CPPFLAGS=-D__WIN32
OBJS=linkedlist.o main.o md4.o processfile.o
ifdef _GUI
# Windows GUI
TARGET=ed2k_hash-gui.exe
CPPFLAGS+=-D_GUI
$(TARGET): $(OBJS) libGUI
$(CC) -o $(TARGET) $(OBJS) win32\\*.o -lcomctl32 -mwindows
libGUI:
cd win32 && make -f Makefile.mingw32
else
# command-line
TARGET=ed2k_hash.exe
OBJS+=cl_ui.o options.o
$(TARGET): $(OBJS)
$(CC) -o $(TARGET) $(OBJS)
endif
ed2k_hash-0.3.3/ed2k_hash/options.h 0000644 0001750 0001750 00000003772 07535440725 016055 0 ustar tiago tiago /***************************************************************************
options.h - description
-------------------
begin : Mon Sep 2 2002
copyright : (C) 2002 by Tim-Philipp Müller
email : t.i.m@orange.net
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
#ifndef _ed2k_hash_options_h_included_
#define _ed2k_hash_options_h_included_
#ifndef HAVE_CONFIG_H /* e.g. on windows plaform */
# define PACKAGE "ed2k_hash"
# define VERSION "0.3"
#else
# include
#endif /* ifndef HAVE_CONFIG_H */
extern int option_htmllink; /* wrap html link around ed2k-link */
extern int option_htmlfull; /* print path component as well in html link */
extern int option_verbose; /* be verbose */
extern int option_quiet; /* only output error messages */
extern int option_silent; /* do not even show error messages! */
extern int option_debug; /* show debug messages */
extern int option_recursive; /* process all subdirectories of directories as well */
extern int option_excludedirs; /* exclude directories */
extern int option_waitwhenfinito; /* wait for keystroke when finished */
/* functions */
int options_process_cl_argument (char *argv[], int *i);
void options_print_help_screen_and_exit (void);
#endif /* ifndef _ed2k_hash_options_h_included_ */
ed2k_hash-0.3.3/ed2k_hash/templates/ 0000755 0001750 0001750 00000000000 11252637646 016177 5 ustar tiago tiago ed2k_hash-0.3.3/ed2k_hash/templates/header_template 0000644 0001750 0001750 00000001742 07535440726 021251 0 ustar tiago tiago /***************************************************************************
|FILENAME| - description
-------------------
begin : |DATE|
copyright : (C) |YEAR| by |AUTHOR|
email : |EMAIL|
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
ed2k_hash-0.3.3/ed2k_hash/templates/cpp_template 0000644 0001750 0001750 00000001742 07535440726 020603 0 ustar tiago tiago /***************************************************************************
|FILENAME| - description
-------------------
begin : |DATE|
copyright : (C) |YEAR| by |AUTHOR|
email : |EMAIL|
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
ed2k_hash-0.3.3/ed2k_hash/linkedlist.c 0000644 0001750 0001750 00000003551 07605450534 016507 0 ustar tiago tiago /***************************************************************************
linkedlist.c - description
-------------------
begin : Mon Sep 2 2002
copyright : (C) 2002 by Tim-Philipp Müller
email : t.i.m@orange.net
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
#include
#include
#include "global.h"
#include "linkedlist.h"
/* slist_append
*
* appends an item to an SList
*
*/
SList *
slist_append (SList *list, void *data)
{
SList *newitem = malloc (sizeof(SList));
SList *last;
if (!newitem) /* best thing to do in this case */
return list;
newitem->next = NULL;
newitem->data = data;
newitem->last = newitem; /* in case this is going to be the first item */
if (!list)
return newitem;
last = list->last;
if (!last) /* Houston, we have a problem */
return list;
last->next = newitem;
list->last = newitem;
return list;
}
/* slist_length
*
* returns the number of items in a SList (and 0 if list==NULL)
*
*/
unsigned int
slist_length (SList *list)
{
SList *item = list;
unsigned int num = 0;
while (item)
{
num++;
item = item->next;
}
return num;
}
ed2k_hash-0.3.3/ed2k_hash/cl_ui.h 0000644 0001750 0001750 00000002722 07535440725 015447 0 ustar tiago tiago /***************************************************************************
cl_ui.h - description
-------------------
begin : Mon Sep 2 2002
copyright : (C) 2002 by Tim-Philipp Müller
email : t.i.m@orange.net
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
#ifndef _ed2k_hash_cl_ui_h_included_
#define _ed2k_hash_cl_ui_h_included_
#define PRINTERR_PREFIX "ERROR:"
#include "linkedlist.h"
int ui_init (void);
int ui_cleanup (void);
int ui_setoptions (int argc, char *argv[]);
int ui_print (const char *format, ...);
int ui_printerr (const char *format, ...);
int ui_run (SList *filelist);
int ui_update (char *filepath, unsigned int size, unsigned int done);
#endif /* ifndef _ed2k_hash_cl_ui_h_included_ */
ed2k_hash-0.3.3/ed2k_hash/docs/ 0000755 0001750 0001750 00000000000 11257540433 015121 5 ustar tiago tiago ed2k_hash-0.3.3/ed2k_hash/docs/en/ 0000755 0001750 0001750 00000000000 11257540433 015523 5 ustar tiago tiago ed2k_hash-0.3.3/ed2k_hash/docs/en/index-3.html 0000644 0001750 0001750 00000001275 07535440725 017674 0 ustar tiago tiago
The Ed2k_hash Handbook: Usage NextPreviousContents
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Next
PreviousContents
ed2k_hash-0.3.3/ed2k_hash/docs/en/index-4.html 0000644 0001750 0001750 00000001176 07535440725 017675 0 ustar tiago tiago
The Ed2k_hash Handbook: Another SectionNextPreviousContents
In order to compile and install Ed2k_hash on your system, type the following in
the base directory of the Ed2k_hash distribution:
% ./configure
% make
% make install
Since Ed2k_hash uses
autoconf
you should have not trouble
compiling it.
Should you run into problems please report them to the the author at
Tim-Philipp MüllerNextPreviousContents
ed2k_hash-0.3.3/ed2k_hash/docs/en/index-5.html 0000644 0001750 0001750 00000001212 07535440725 017665 0 ustar tiago tiago
The Ed2k_hash Handbook: Questions and AnswersNextPreviousContents
In order to compile and install Ed2k_hash on your system, type the following in
the base directory of the Ed2k_hash distribution:
% ./configure
% make
% make install
Since Ed2k_hash uses autoconf you should have not trouble
compiling it.
Should you run into problems please report them to the the author at
Usage
General Usage
Another Section
Questions and Answers
Copyright
Ed2k_hash Copyright 2002 Tim-Philipp Müller , t.i.m@orange.net
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., 675 Mass Ave, Cambridge, MA 02139, USA.
Next
Previous
Contents
ed2k_hash-0.3.3/ed2k_hash/docs/en/Makefile.am 0000644 0001750 0001750 00000000350 07535440725 017564 0 ustar tiago tiago ####### kdevelop will overwrite this part!!! (begin)##########
EXTRA_DIST = index.html index-1.html index-2.html index-3.html index-4.html index-5.html index-6.html
####### kdevelop will overwrite this part!!! (end)############
ed2k_hash-0.3.3/ed2k_hash/docs/Makefile.in 0000644 0001750 0001750 00000032765 11257516375 017213 0 ustar tiago tiago # KDE tags expanded automatically by am_edit - $Revision: 1.1.1.1 $
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# 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@
####### kdevelop will overwrite this part!!! (begin)##########
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_alias = @build_alias@
build_triplet = @build@
host_alias = @host_alias@
host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@
AMTAR = @AMTAR@
ARTSCCONFIG = @ARTSCCONFIG@
AS = @AS@
AUTODIRS = @AUTODIRS@
AWK = @AWK@
CC = @CC@
CONF_FILES = @CONF_FILES@
CPP = @CPP@
CXX = @CXX@
CXXCPP = @CXXCPP@
DCOPIDL = @DCOPIDL@
DCOPIDL2CPP = @DCOPIDL2CPP@
DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DPMSINC = @DPMSINC@
DPMSLIB = @DPMSLIB@
EXEEXT = @EXEEXT@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GLINC = @GLINC@
GLLIB = @GLLIB@
GMSGFMT = @GMSGFMT@
IDL = @IDL@
IDL_DEPENDENCIES = @IDL_DEPENDENCIES@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JAR = @JAR@
JAVAC = @JAVAC@
JAVAH = @JAVAH@
JVMLIBS = @JVMLIBS@
KDECONFIG = @KDECONFIG@
KDE_CXXFLAGS = @KDE_CXXFLAGS@
KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
KDE_INCLUDES = @KDE_INCLUDES@
KDE_LDFLAGS = @KDE_LDFLAGS@
KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
KDE_MT_LIBS = @KDE_MT_LIBS@
KDE_PLUGIN = @KDE_PLUGIN@
KDE_RPATH = @KDE_RPATH@
KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
LEX = @LEX@
LEXLIB = @LEXLIB@
LIBCOMPAT = @LIBCOMPAT@
LIBCRYPT = @LIBCRYPT@
LIBDL = @LIBDL@
LIBGEN = @LIBGEN@
LIBJPEG = @LIBJPEG@
LIBMICO = @LIBMICO@
LIBOBJS = @LIBOBJS@
LIBPNG = @LIBPNG@
LIBPTHREAD = @LIBPTHREAD@
LIBPYTHON = @LIBPYTHON@
LIBQIMGIO = @LIBQIMGIO@
LIBRESOLV = @LIBRESOLV@
LIBSHADOW = @LIBSHADOW@
LIBSM = @LIBSM@
LIBSOCKET = @LIBSOCKET@
LIBTIFF = @LIBTIFF@
LIBTOOL = @LIBTOOL@
LIBUCB = @LIBUCB@
LIBUTIL = @LIBUTIL@
LIBXINERAMA = @LIBXINERAMA@
LIBZ = @LIBZ@
LIB_KAB = @LIB_KAB@
LIB_KDECORE = @LIB_KDECORE@
LIB_KDEPRINT = @LIB_KDEPRINT@
LIB_KDEUI = @LIB_KDEUI@
LIB_KFILE = @LIB_KFILE@
LIB_KFM = @LIB_KFM@
LIB_KHTML = @LIB_KHTML@
LIB_KIMGIO = @LIB_KIMGIO@
LIB_KIO = @LIB_KIO@
LIB_KPARTS = @LIB_KPARTS@
LIB_KSPELL = @LIB_KSPELL@
LIB_KSYCOCA = @LIB_KSYCOCA@
LIB_QPE = @LIB_QPE@
LIB_QT = @LIB_QT@
LIB_QTOPIA = @LIB_QTOPIA@
LIB_SMB = @LIB_SMB@
LIB_X11 = @LIB_X11@
LIB_XEXT = @LIB_XEXT@
LN_S = @LN_S@
MCOPIDL = @MCOPIDL@
MEINPROC = @MEINPROC@
MICO_INCLUDES = @MICO_INCLUDES@
MICO_LDFLAGS = @MICO_LDFLAGS@
MOC = @MOC@
MSGFMT = @MSGFMT@
NOOPT_CFLAGS = @NOOPT_CFLAGS@
NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
NOREPO = @NOREPO@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PAMLIBS = @PAMLIBS@
PASSWDLIBS = @PASSWDLIBS@
PYTHONINC = @PYTHONINC@
PYTHONLIB = @PYTHONLIB@
PYTHONMODDIR = @PYTHONMODDIR@
QTE_NORTTI = @QTE_NORTTI@
QTOPIA_INCLUDES = @QTOPIA_INCLUDES@
QT_INCLUDES = @QT_INCLUDES@
QT_LDFLAGS = @QT_LDFLAGS@
RANLIB = @RANLIB@
REPO = @REPO@
SETUIDFLAGS = @SETUIDFLAGS@
STRIP = @STRIP@
TOPSUBDIRS = @TOPSUBDIRS@
UIC = @UIC@
UIC_TR = @UIC_TR@
USER_INCLUDES = @USER_INCLUDES@
USER_LDFLAGS = @USER_LDFLAGS@
USE_EXCEPTIONS = @USE_EXCEPTIONS@
USE_RTTI = @USE_RTTI@
USE_THREADS = @USE_THREADS@
VERSION = @VERSION@
WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
XGETTEXT = @XGETTEXT@
XPMINC = @XPMINC@
XPMLIB = @XPMLIB@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_INCLUDES = @X_INCLUDES@
X_LDFLAGS = @X_LDFLAGS@
X_PRE_LIBS = @X_PRE_LIBS@
all_includes = @all_includes@
all_libraries = @all_libraries@
am__include = @am__include@
am__quote = @am__quote@
idldir = @idldir@
install_sh = @install_sh@
jni_includes = @jni_includes@
kde_appsdir = @kde_appsdir@
kde_bindir = @kde_bindir@
kde_confdir = @kde_confdir@
kde_datadir = @kde_datadir@
kde_htmldir = @kde_htmldir@
kde_icondir = @kde_icondir@
kde_includes = @kde_includes@
kde_libraries = @kde_libraries@
kde_libs_htmldir = @kde_libs_htmldir@
kde_libs_prefix = @kde_libs_prefix@
kde_locale = @kde_locale@
kde_mimedir = @kde_mimedir@
kde_moduledir = @kde_moduledir@
kde_qtver = @kde_qtver@
kde_servicesdir = @kde_servicesdir@
kde_servicetypesdir = @kde_servicetypesdir@
kde_sounddir = @kde_sounddir@
kde_styledir = @kde_styledir@
kde_templatesdir = @kde_templatesdir@
kde_wallpaperdir = @kde_wallpaperdir@
kde_widgetdir = @kde_widgetdir@
micodir = @micodir@
qt_includes = @qt_includes@
qt_libraries = @qt_libraries@
x_includes = @x_includes@
x_libraries = @x_libraries@
SUBDIRS = en
subdir = ed2k_hash/docs
mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
uninstall-info-recursive all-recursive install-data-recursive \
install-exec-recursive installdirs-recursive install-recursive \
uninstall-recursive check-recursive installcheck-recursive
DIST_COMMON = Makefile.am Makefile.in
DIST_SUBDIRS = $(SUBDIRS)
#>- all: all-recursive
#>+ 1
all: docs-am all-recursive
.SUFFIXES:
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
#>- cd $(top_srcdir) && \
#>- $(AUTOMAKE) --gnu ed2k_hash/docs/Makefile
#>+ 3
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu ed2k_hash/docs/Makefile
cd $(top_srcdir) && perl admin/am_edit ed2k_hash/docs/Makefile.in
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
# 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
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(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 $(LISP)
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(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 "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
GTAGS:
here=`CDPATH=: && cd $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ../..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
for subdir in $(SUBDIRS); do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" \
distdir=../$(distdir)/$$subdir \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
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)" \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
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
#>+ 1
clean: kde-rpo-clean clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
distclean-am: clean-am distclean-generic distclean-libtool \
distclean-tags
dvi: dvi-recursive
dvi-am:
info: info-recursive
info-am:
install-data-am:
install-exec-am:
install-info: install-info-recursive
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
clean-generic clean-libtool clean-recursive distclean \
distclean-generic distclean-libtool distclean-recursive \
distclean-tags distdir dvi dvi-am dvi-recursive info info-am \
info-recursive install install-am install-data install-data-am \
install-data-recursive install-exec install-exec-am \
install-exec-recursive install-info install-info-am \
install-info-recursive install-man install-recursive \
install-strip installcheck installcheck-am installdirs \
installdirs-am installdirs-recursive maintainer-clean \
maintainer-clean-generic maintainer-clean-recursive mostlyclean \
mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
tags tags-recursive uninstall uninstall-am uninstall-info-am \
uninstall-info-recursive uninstall-recursive
####### kdevelop will overwrite this part!!! (end)############
# 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:
#>+ 2
docs-am:
#>+ 6
force-reedit:
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu ed2k_hash/docs/Makefile
cd $(top_srcdir) && perl admin/am_edit ed2k_hash/docs/Makefile.in
#>+ 2
final:
$(MAKE) all-am
#>+ 2
final-install:
$(MAKE) install-am
#>+ 2
no-final:
$(MAKE) all-am
#>+ 2
no-final-install:
$(MAKE) install-am
#>+ 3
cvs-clean:
$(MAKE) -f $(top_srcdir)/admin/Makefile.common cvs-clean
#>+ 3
kde-rpo-clean:
-rm -f *.rpo
ed2k_hash-0.3.3/ed2k_hash/docs/Makefile.am 0000644 0001750 0001750 00000000216 07535440725 017163 0 ustar tiago tiago ####### kdevelop will overwrite this part!!! (begin)##########
SUBDIRS = en
####### kdevelop will overwrite this part!!! (end)############
ed2k_hash-0.3.3/ed2k_hash/Makefile.in 0000644 0001750 0001750 00000044042 11257516374 016251 0 ustar tiago tiago # KDE tags expanded automatically by am_edit - $Revision: 1.1.1.1 $
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# 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@
####### kdevelop will overwrite this part!!! (begin)##########
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_alias = @build_alias@
build_triplet = @build@
host_alias = @host_alias@
host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@
AMTAR = @AMTAR@
ARTSCCONFIG = @ARTSCCONFIG@
AS = @AS@
AUTODIRS = @AUTODIRS@
AWK = @AWK@
CC = @CC@
CONF_FILES = @CONF_FILES@
CPP = @CPP@
CXX = @CXX@
CXXCPP = @CXXCPP@
DCOPIDL = @DCOPIDL@
DCOPIDL2CPP = @DCOPIDL2CPP@
DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DPMSINC = @DPMSINC@
DPMSLIB = @DPMSLIB@
EXEEXT = @EXEEXT@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GLINC = @GLINC@
GLLIB = @GLLIB@
GMSGFMT = @GMSGFMT@
IDL = @IDL@
IDL_DEPENDENCIES = @IDL_DEPENDENCIES@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JAR = @JAR@
JAVAC = @JAVAC@
JAVAH = @JAVAH@
JVMLIBS = @JVMLIBS@
KDECONFIG = @KDECONFIG@
KDE_CXXFLAGS = @KDE_CXXFLAGS@
KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
KDE_INCLUDES = @KDE_INCLUDES@
KDE_LDFLAGS = @KDE_LDFLAGS@
KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
KDE_MT_LIBS = @KDE_MT_LIBS@
KDE_PLUGIN = @KDE_PLUGIN@
KDE_RPATH = @KDE_RPATH@
KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
LEX = @LEX@
LEXLIB = @LEXLIB@
LIBCOMPAT = @LIBCOMPAT@
LIBCRYPT = @LIBCRYPT@
LIBDL = @LIBDL@
LIBGEN = @LIBGEN@
LIBJPEG = @LIBJPEG@
LIBMICO = @LIBMICO@
LIBOBJS = @LIBOBJS@
LIBPNG = @LIBPNG@
LIBPTHREAD = @LIBPTHREAD@
LIBPYTHON = @LIBPYTHON@
LIBQIMGIO = @LIBQIMGIO@
LIBRESOLV = @LIBRESOLV@
LIBSHADOW = @LIBSHADOW@
LIBSM = @LIBSM@
LIBSOCKET = @LIBSOCKET@
LIBTIFF = @LIBTIFF@
LIBTOOL = @LIBTOOL@
LIBUCB = @LIBUCB@
LIBUTIL = @LIBUTIL@
LIBXINERAMA = @LIBXINERAMA@
LIBZ = @LIBZ@
LIB_KAB = @LIB_KAB@
LIB_KDECORE = @LIB_KDECORE@
LIB_KDEPRINT = @LIB_KDEPRINT@
LIB_KDEUI = @LIB_KDEUI@
LIB_KFILE = @LIB_KFILE@
LIB_KFM = @LIB_KFM@
LIB_KHTML = @LIB_KHTML@
LIB_KIMGIO = @LIB_KIMGIO@
LIB_KIO = @LIB_KIO@
LIB_KPARTS = @LIB_KPARTS@
LIB_KSPELL = @LIB_KSPELL@
LIB_KSYCOCA = @LIB_KSYCOCA@
LIB_QPE = @LIB_QPE@
LIB_QT = @LIB_QT@
LIB_QTOPIA = @LIB_QTOPIA@
LIB_SMB = @LIB_SMB@
LIB_X11 = @LIB_X11@
LIB_XEXT = @LIB_XEXT@
LN_S = @LN_S@
MCOPIDL = @MCOPIDL@
MEINPROC = @MEINPROC@
MICO_INCLUDES = @MICO_INCLUDES@
MICO_LDFLAGS = @MICO_LDFLAGS@
MOC = @MOC@
MSGFMT = @MSGFMT@
NOOPT_CFLAGS = @NOOPT_CFLAGS@
NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
NOREPO = @NOREPO@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PAMLIBS = @PAMLIBS@
PASSWDLIBS = @PASSWDLIBS@
PYTHONINC = @PYTHONINC@
PYTHONLIB = @PYTHONLIB@
PYTHONMODDIR = @PYTHONMODDIR@
QTE_NORTTI = @QTE_NORTTI@
QTOPIA_INCLUDES = @QTOPIA_INCLUDES@
QT_INCLUDES = @QT_INCLUDES@
QT_LDFLAGS = @QT_LDFLAGS@
RANLIB = @RANLIB@
REPO = @REPO@
SETUIDFLAGS = @SETUIDFLAGS@
STRIP = @STRIP@
TOPSUBDIRS = @TOPSUBDIRS@
UIC = @UIC@
UIC_TR = @UIC_TR@
USER_INCLUDES = @USER_INCLUDES@
USER_LDFLAGS = @USER_LDFLAGS@
USE_EXCEPTIONS = @USE_EXCEPTIONS@
USE_RTTI = @USE_RTTI@
USE_THREADS = @USE_THREADS@
VERSION = @VERSION@
WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
XGETTEXT = @XGETTEXT@
XPMINC = @XPMINC@
XPMLIB = @XPMLIB@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_INCLUDES = @X_INCLUDES@
X_LDFLAGS = @X_LDFLAGS@
X_PRE_LIBS = @X_PRE_LIBS@
all_includes = @all_includes@
all_libraries = @all_libraries@
am__include = @am__include@
am__quote = @am__quote@
idldir = @idldir@
install_sh = @install_sh@
jni_includes = @jni_includes@
kde_appsdir = @kde_appsdir@
kde_bindir = @kde_bindir@
kde_confdir = @kde_confdir@
kde_datadir = @kde_datadir@
kde_htmldir = @kde_htmldir@
kde_icondir = @kde_icondir@
kde_includes = @kde_includes@
kde_libraries = @kde_libraries@
kde_libs_htmldir = @kde_libs_htmldir@
kde_libs_prefix = @kde_libs_prefix@
kde_locale = @kde_locale@
kde_mimedir = @kde_mimedir@
kde_moduledir = @kde_moduledir@
kde_qtver = @kde_qtver@
kde_servicesdir = @kde_servicesdir@
kde_servicetypesdir = @kde_servicetypesdir@
kde_sounddir = @kde_sounddir@
kde_styledir = @kde_styledir@
kde_templatesdir = @kde_templatesdir@
kde_wallpaperdir = @kde_wallpaperdir@
kde_widgetdir = @kde_widgetdir@
micodir = @micodir@
qt_includes = @qt_includes@
qt_libraries = @qt_libraries@
x_includes = @x_includes@
x_libraries = @x_libraries@
bin_PROGRAMS = ed2k_hash
ed2k_hash_SOURCES = md4.c processfile.c linkedlist.c options.c cl_ui.c main.c
ed2k_hash_LDADD =
SUBDIRS = docs
EXTRA_DIST = main.c cl_ui.h cl_ui.c options.h options.c linkedlist.h linkedlist.c ui.h processfile.h processfile.c md4.h md4.c global.h Makefile.mingw32
####### kdevelop will overwrite this part!!! (end)############
# set the include path found by configure
INCLUDES = $(all_includes)
# the library search path.
ed2k_hash_LDFLAGS = $(all_libraries)
subdir = ed2k_hash
mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
bin_PROGRAMS = ed2k_hash$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS)
am_ed2k_hash_OBJECTS = md4.$(OBJEXT) processfile.$(OBJEXT) \
linkedlist.$(OBJEXT) options.$(OBJEXT) cl_ui.$(OBJEXT) \
main.$(OBJEXT)
#>- ed2k_hash_OBJECTS = $(am_ed2k_hash_OBJECTS)
#>+ 6
ed2k_hash_final_OBJECTS = md4.o processfile.o linkedlist.o options.o cl_ui.o main.o
ed2k_hash_nofinal_OBJECTS = md4.$(OBJEXT) processfile.$(OBJEXT) \
linkedlist.$(OBJEXT) options.$(OBJEXT) cl_ui.$(OBJEXT) \
main.$(OBJEXT)
@KDE_USE_FINAL_FALSE@ed2k_hash_OBJECTS = $(ed2k_hash_nofinal_OBJECTS)
@KDE_USE_FINAL_TRUE@ed2k_hash_OBJECTS = $(ed2k_hash_final_OBJECTS)
ed2k_hash_DEPENDENCIES =
DEFS = @DEFS@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/cl_ui.Po $(DEPDIR)/linkedlist.Po \
@AMDEP_TRUE@ $(DEPDIR)/main.Po $(DEPDIR)/md4.Po \
@AMDEP_TRUE@ $(DEPDIR)/options.Po $(DEPDIR)/processfile.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
CFLAGS = @CFLAGS@
DIST_SOURCES = $(ed2k_hash_SOURCES)
RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
uninstall-info-recursive all-recursive install-data-recursive \
install-exec-recursive installdirs-recursive install-recursive \
uninstall-recursive check-recursive installcheck-recursive
DIST_COMMON = Makefile.am Makefile.in
DIST_SUBDIRS = $(SUBDIRS)
SOURCES = $(ed2k_hash_SOURCES)
#>- all: all-recursive
#>+ 1
all: docs-am all-recursive
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
#>- cd $(top_srcdir) && \
#>- $(AUTOMAKE) --gnu ed2k_hash/Makefile
#>+ 3
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu ed2k_hash/Makefile
cd $(top_srcdir) && perl admin/am_edit ed2k_hash/Makefile.in
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
|| test -f $$p1 \
; then \
f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
done
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
ed2k_hash$(EXEEXT): $(ed2k_hash_OBJECTS) $(ed2k_hash_DEPENDENCIES)
@rm -f ed2k_hash$(EXEEXT)
$(LINK) $(ed2k_hash_LDFLAGS) $(ed2k_hash_OBJECTS) $(ed2k_hash_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT) core *.core
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/cl_ui.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/linkedlist.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/main.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/md4.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/options.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/processfile.Po@am__quote@
distclean-depend:
-rm -rf $(DEPDIR)
.c.o:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
.c.obj:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c `cygpath -w $<`
.c.lo:
@AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(LTCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
CCDEPMODE = @CCDEPMODE@
uninstall-info-am:
# 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
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(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 $(LISP)
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(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 "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
GTAGS:
here=`CDPATH=: && cd $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
for subdir in $(SUBDIRS); do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" \
distdir=../$(distdir)/$$subdir \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
all-am: Makefile $(PROGRAMS)
installdirs: installdirs-recursive
installdirs-am:
$(mkinstalldirs) $(DESTDIR)$(bindir)
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)" \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
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
#>+ 1
clean: kde-rpo-clean clean-recursive
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
distclean-am: clean-am distclean-compile distclean-depend \
distclean-generic distclean-libtool distclean-tags
dvi: dvi-recursive
dvi-am:
info: info-recursive
info-am:
install-data-am:
install-exec-am: install-binPROGRAMS
install-info: install-info-recursive
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
clean-binPROGRAMS clean-generic clean-libtool clean-recursive \
distclean distclean-compile distclean-depend distclean-generic \
distclean-libtool distclean-recursive distclean-tags distdir \
dvi dvi-am dvi-recursive info info-am info-recursive install \
install-am install-binPROGRAMS install-data install-data-am \
install-data-recursive install-exec install-exec-am \
install-exec-recursive install-info install-info-am \
install-info-recursive install-man install-recursive \
install-strip installcheck installcheck-am installdirs \
installdirs-am installdirs-recursive maintainer-clean \
maintainer-clean-generic maintainer-clean-recursive mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
mostlyclean-recursive tags tags-recursive uninstall \
uninstall-am uninstall-binPROGRAMS uninstall-info-am \
uninstall-info-recursive uninstall-recursive
# 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:
#>+ 2
docs-am:
#>+ 6
force-reedit:
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu ed2k_hash/Makefile
cd $(top_srcdir) && perl admin/am_edit ed2k_hash/Makefile.in
#>+ 2
final:
$(MAKE) ed2k_hash_OBJECTS="$(ed2k_hash_final_OBJECTS)" all-am
#>+ 2
final-install:
$(MAKE) ed2k_hash_OBJECTS="$(ed2k_hash_final_OBJECTS)" install-am
#>+ 2
no-final:
$(MAKE) ed2k_hash_OBJECTS="$(ed2k_hash_nofinal_OBJECTS)" all-am
#>+ 2
no-final-install:
$(MAKE) ed2k_hash_OBJECTS="$(ed2k_hash_nofinal_OBJECTS)" install-am
#>+ 3
cvs-clean:
$(MAKE) -f $(top_srcdir)/admin/Makefile.common cvs-clean
#>+ 3
kde-rpo-clean:
-rm -f *.rpo
ed2k_hash-0.3.3/ed2k_hash/md4.c 0000644 0001750 0001750 00000023577 07605450534 015043 0 ustar tiago tiago /***************************************************************************
md4.c - description
-------------------
begin : Tue Sep 3 2002
copyright : (C) 2002 by Tim-Philipp Müller
email : t.i.m@orange.net
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
#include "md4.h"
#include "global.h"
#ifndef HAVE_OPENSSL
/* The MD4 hashing routines here are the reference implementation
* from the MD4 RFC.
*/
/* MD4C.C - RSA Data Security, Inc., MD4 message-digest algorithm
*/
/* Copyright (C) 1990-2, RSA Data Security, Inc. All rights reserved.
License to copy and use this software is granted provided that it
is identified as the "RSA Data Security, Inc. MD4 Message-Digest
Algorithm" in all material mentioning or referencing this software
or this function.
License is also granted to make and use derivative works provided
that such works are identified as "derived from the RSA Data
Security, Inc. MD4 Message-Digest Algorithm" in all material
mentioning or referencing the derived work.
RSA Data Security, Inc. makes no representations concerning either
the merchantability of this software or the suitability of this
software for any particular purpose. It is provided "as is"
without express or implied warranty of any kind.
*/
/* Constants for MD4Transform routine.
*/
#define S11 3
#define S12 7
#define S13 11
#define S14 19
#define S21 3
#define S22 5
#define S23 9
#define S24 13
#define S31 3
#define S32 9
#define S33 11
#define S34 15
static void MD4Transform PROTO_LIST ((UINT4 [4], unsigned char [64]));
static void Encode PROTO_LIST
((unsigned char *, UINT4 *, unsigned int));
static void Decode PROTO_LIST
((UINT4 *, unsigned char *, unsigned int));
static void MD4_memcpy PROTO_LIST ((POINTER, POINTER, unsigned int));
static void MD4_memset PROTO_LIST ((POINTER, int, unsigned int));
static unsigned char PADDING[64] = {
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
/* F, G and H are basic MD4 functions.
*/
#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
#define G(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z)))
#define H(x, y, z) ((x) ^ (y) ^ (z))
/* ROTATE_LEFT rotates x left n bits.
*/
#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
/* FF, GG and HH are transformations for rounds 1, 2 and 3 */
/* Rotation is separate from addition to prevent recomputation */
#define FF(a, b, c, d, x, s) { \
(a) += F ((b), (c), (d)) + (x); \
(a) = ROTATE_LEFT ((a), (s)); \
}
#define GG(a, b, c, d, x, s) { \
(a) += G ((b), (c), (d)) + (x) + (UINT4)0x5a827999; \
(a) = ROTATE_LEFT ((a), (s)); \
}
#define HH(a, b, c, d, x, s) { \
(a) += H ((b), (c), (d)) + (x) + (UINT4)0x6ed9eba1; \
(a) = ROTATE_LEFT ((a), (s)); \
}
/* MD4 initialization. Begins an MD4 operation, writing a new context.
*/
void MD4Init (context)
MD4_CTX *context; /* context */
{
context->count[0] = context->count[1] = 0;
/* Load magic initialization constants.
*/
context->state[0] = 0x67452301;
context->state[1] = 0xefcdab89;
context->state[2] = 0x98badcfe;
context->state[3] = 0x10325476;
}
/* MD4 block update operation. Continues an MD4 message-digest
operation, processing another message block, and updating the
context.
*/
void MD4Update (context, input, inputLen)
MD4_CTX *context; /* context */
unsigned char *input; /* input block */
unsigned int inputLen; /* length of input block */
{
unsigned int i, index, partLen;
/* Compute number of bytes mod 64 */
index = (unsigned int)((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
if ((context->count[0] += ((UINT4)inputLen << 3))
< ((UINT4)inputLen << 3))
context->count[1]++;
context->count[1] += ((UINT4)inputLen >> 29);
partLen = 64 - index;
/* Transform as many times as possible.
*/
if (inputLen >= partLen) {
MD4_memcpy
((POINTER)&context->buffer[index], (POINTER)input, partLen);
MD4Transform (context->state, context->buffer);
for (i = partLen; i + 63 < inputLen; i += 64)
MD4Transform (context->state, &input[i]);
index = 0;
}
else
i = 0;
/* Buffer remaining input */
MD4_memcpy
((POINTER)&context->buffer[index], (POINTER)&input[i],
inputLen-i);
}
/* MD4 finalization. Ends an MD4 message-digest operation, writing the
the message digest and zeroizing the context.
*/
void MD4Final (digest, context)
unsigned char digest[16]; /* message digest */
MD4_CTX *context; /* context */
{
unsigned char bits[8];
unsigned int index, padLen;
/* Save number of bits */
Encode (bits, context->count, 8);
/* Pad out to 56 mod 64.
*/
index = (unsigned int)((context->count[0] >> 3) & 0x3f);
padLen = (index < 56) ? (56 - index) : (120 - index);
MD4Update (context, PADDING, padLen);
/* Append length (before padding) */
MD4Update (context, bits, 8);
/* Store state in digest */
Encode (digest, context->state, 16);
/* Zeroize sensitive information.
*/
MD4_memset ((POINTER)context, 0, sizeof (*context));
}
/* MD4 basic transformation. Transforms state based on block.
*/
static void MD4Transform (state, block)
UINT4 state[4];
unsigned char block[64];
{
UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
Decode (x, block, 64);
/* Round 1 */
FF (a, b, c, d, x[ 0], S11); /* 1 */
FF (d, a, b, c, x[ 1], S12); /* 2 */
FF (c, d, a, b, x[ 2], S13); /* 3 */
FF (b, c, d, a, x[ 3], S14); /* 4 */
FF (a, b, c, d, x[ 4], S11); /* 5 */
FF (d, a, b, c, x[ 5], S12); /* 6 */
FF (c, d, a, b, x[ 6], S13); /* 7 */
FF (b, c, d, a, x[ 7], S14); /* 8 */
FF (a, b, c, d, x[ 8], S11); /* 9 */
FF (d, a, b, c, x[ 9], S12); /* 10 */
FF (c, d, a, b, x[10], S13); /* 11 */
FF (b, c, d, a, x[11], S14); /* 12 */
FF (a, b, c, d, x[12], S11); /* 13 */
FF (d, a, b, c, x[13], S12); /* 14 */
FF (c, d, a, b, x[14], S13); /* 15 */
FF (b, c, d, a, x[15], S14); /* 16 */
/* Round 2 */
GG (a, b, c, d, x[ 0], S21); /* 17 */
GG (d, a, b, c, x[ 4], S22); /* 18 */
GG (c, d, a, b, x[ 8], S23); /* 19 */
GG (b, c, d, a, x[12], S24); /* 20 */
GG (a, b, c, d, x[ 1], S21); /* 21 */
GG (d, a, b, c, x[ 5], S22); /* 22 */
GG (c, d, a, b, x[ 9], S23); /* 23 */
GG (b, c, d, a, x[13], S24); /* 24 */
GG (a, b, c, d, x[ 2], S21); /* 25 */
GG (d, a, b, c, x[ 6], S22); /* 26 */
GG (c, d, a, b, x[10], S23); /* 27 */
GG (b, c, d, a, x[14], S24); /* 28 */
GG (a, b, c, d, x[ 3], S21); /* 29 */
GG (d, a, b, c, x[ 7], S22); /* 30 */
GG (c, d, a, b, x[11], S23); /* 31 */
GG (b, c, d, a, x[15], S24); /* 32 */
/* Round 3 */
HH (a, b, c, d, x[ 0], S31); /* 33 */
HH (d, a, b, c, x[ 8], S32); /* 34 */
HH (c, d, a, b, x[ 4], S33); /* 35 */
HH (b, c, d, a, x[12], S34); /* 36 */
HH (a, b, c, d, x[ 2], S31); /* 37 */
HH (d, a, b, c, x[10], S32); /* 38 */
HH (c, d, a, b, x[ 6], S33); /* 39 */
HH (b, c, d, a, x[14], S34); /* 40 */
HH (a, b, c, d, x[ 1], S31); /* 41 */
HH (d, a, b, c, x[ 9], S32); /* 42 */
HH (c, d, a, b, x[ 5], S33); /* 43 */
HH (b, c, d, a, x[13], S34); /* 44 */
HH (a, b, c, d, x[ 3], S31); /* 45 */
HH (d, a, b, c, x[11], S32); /* 46 */
HH (c, d, a, b, x[ 7], S33); /* 47 */
HH (b, c, d, a, x[15], S34); /* 48 */
state[0] += a;
state[1] += b;
state[2] += c;
state[3] += d;
/* Zeroize sensitive information.
*/
MD4_memset ((POINTER)x, 0, sizeof (x));
}
/* Encodes input (UINT4) into output (unsigned char). Assumes len is
a multiple of 4.
*/
static void Encode (output, input, len)
unsigned char *output;
UINT4 *input;
unsigned int len;
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4) {
output[j] = (unsigned char)(input[i] & 0xff);
output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
}
}
/* Decodes input (unsigned char) into output (UINT4). Assumes len is
a multiple of 4.
*/
static void Decode (output, input, len)
UINT4 *output;
unsigned char *input;
unsigned int len;
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4)
output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
(((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
}
/* Note: Replace "for loop" with standard memcpy if possible.
*/
static void MD4_memcpy (output, input, len)
POINTER output;
POINTER input;
unsigned int len;
{
unsigned int i;
for (i = 0; i < len; i++)
output[i] = input[i];
}
/* Note: Replace "for loop" with standard memset if possible.
*/
static void MD4_memset (output, value, len)
POINTER output;
int value;
unsigned int len;
{
unsigned int i;
for (i = 0; i < len; i++)
((char *)output)[i] = (char)value;
}
/*
unsigned char *
MD4 (unsigned char *data, unsigned int len, unsigned char *md)
{
MD4_CTX context;
MD4_Init (&context);
MD4_Update (&context, data, len);
MD4_Final (md, &context);
return md;
}
*/
#endif /* ifndef HAVE_OPENSSL */
ed2k_hash-0.3.3/ed2k_hash/options.c 0000644 0001750 0001750 00000012567 07605450534 016047 0 ustar tiago tiago /***************************************************************************
options.c - description
-------------------
begin : Mon Sep 2 2002
copyright : (C) 2002 by Tim-Philipp Müller
email : t.i.m@orange.net
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
#include
#include "global.h"
#include "options.h"
#include "ui.h"
int option_htmllink = 0; /* wrap html link around ed2k-link */
int option_htmlfull = 0; /* print path component as well in html link */
int option_verbose = 0; /* be verbose */
int option_quiet = 0; /* only show error messages and the results */
int option_silent = 0; /* do not even show error messages! */
int option_debug = 0; /* show debug messages */
int option_recursive = 0; /* process all subdirectories of directories as well */
int option_excludedirs = 0; /* exclude directories */
int option_waitwhenfinito = 0; /* wait for keystroke when finished */
/* functions */
static int options_process_cl_option (char option, char *argv[], int *i);
/* options_process_cl_argument
*
* processes the command line argument given
* and increases the argument counter if there are extra args to an option (and only then!)
*
* returns 0 on error
*
*/
int
options_process_cl_argument (char *argv[], int *i)
{
int compound_args = 0; /* compound arguments? (e.g. '-ds') */
char *pos;
if ((!argv)||(!i))
return 0;
if (!argv[*i]) /* this case shouldn't happen */
return 0;
if (*(argv[*i])!='-') /* dito */
return 0;
if (strlen(argv[*i])>2) /* assuming all options are one one letter options! */
compound_args = 1;
pos = argv[*i]+1; /* skip the initial '-' */
while (*pos)
{
if (!options_process_cl_option(*pos, argv, i))
{
ui_printerr("unknown command line option '-%c'\n", *pos);
return 0;
}
pos++;
}
return *i;
}
/* options_process_cl_option
*
* processes one single option
* increases the argument counter i if - and only if - the
* option has extra arguments
*
* returns 0 if something went wrong
*
*/
static int
options_process_cl_option (char option, char *argv[], int *i)
{
/* XXX */
/* ui_print ("command line option '-%c'\n", option); */
switch (option)
{
case 'a':
option_htmllink = 1;
break;
case 'p':
option_htmlfull = 1;
break;
case 'h':
options_print_help_screen_and_exit();
break;
case 'q':
option_quiet = 1; /* only output error messages */
break;
case 'v':
option_verbose = 1; /* be verbose */
option_quiet = 0;
option_silent = 0;
break;
case 's':
option_silent = 1; /* do not even show error messages! */
option_quiet = 1;
break;
case 'd':
option_debug = 1; /* show debug messages */
break;
case 'r':
option_recursive = 1; /* process all subdirectories of directories as well */
break;
case 'x':
option_excludedirs = 1; /* exclude directories */
break;
case 'w':
option_waitwhenfinito = 1; /* wait for keystroke when finished */
break;
default: /* unknown option */
return 0;
}
return 1;
}
/* options_print_help_screen
*
* prints help screen and exits
*
*/
void
options_print_help_screen_and_exit (void)
{
ui_print ("\n%s v%s (build %s)\n\n", PACKAGE, VERSION, __DATE__);
ui_print ("Copyright (C) 2001-2002 by Tim-Philipp Müller\n");
#ifndef HAVE_OPENSSL
ui_print ("Copyright (C) 1990-2, RSA Data Security, Inc. (MD4 hashing functions only)\n");
#endif
ui_print ("\n");
ui_print ("This program is free software. See the source for copying conditions.\n");
ui_print ("This program is distributed in the hope that it will be useful for someone,\n");
ui_print ("but WITHOUT ANY WARRANTY; without even the implied warranty of\n");
ui_print ("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n");
ui_print ("GNU General Public License for more details.\n\n");
ui_print ("Usage: ed2k_hash [OPTIONS] \n\n");
ui_print ("Creates the eDonkey2000-URI ('ed2k-link') for the specified files.\n\n");
ui_print ("Options:\n");
ui_print ("\t-a\twrap html link around ed2k-link ()\n");
ui_print ("\t-p\tin html link print basename _with_ path component\n");
ui_print ("\t-h\tshow this helpscreen\n");
ui_print ("\t-v\tbe verbose (show extra information)\n");
ui_print ("\t-r\trecursively descend into directories\n");
ui_print ("\t-x\tdo not descend into directories\n");
/* these two options don't really make much sense, so why show them? */
/* ui_print ("\t-q\tbe quiet (only show errors)\n"); */
/* ui_print ("\t-s\tbe silent, show not even errors (pretty useless really)\n"); */
ui_print ("\t-w\twait for keystroke when finished\n");
ui_print ("\n");
if (!ui_cleanup())
exit(EXIT_FAILURE);
exit(EXIT_SUCCESS);
}
ed2k_hash-0.3.3/ed2k_hash/global.h 0000644 0001750 0001750 00000003730 07605450534 015611 0 ustar tiago tiago /***************************************************************************
global.h - description
-------------------
begin : Fri Nov 22 2002
copyright : (C) 2002 by Tim-Philipp Müller
email : t.i.m@orange.net
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
#ifndef _ed2k_hash_global_h_included_
#define _ed2k_hash_global_h_included_
#if (!defined(__MAC_OS_X__))
#if defined(__APPLE__) && defined(__GNUC__)
# define __MAC_OS_X__
#elif defined(__MACOSX__)
# define __MAC_OS_X__
#endif
#endif /* (!defined(__MAC_OS_X__)) */
/* include extra WIN32 stuff if required
*
* NOTE: ALL WIN32 STUFF IS NOT TESTED, I JUST WROTE IT HERE AS I THINK MIGHT BE RIGHT
*
*/
#ifdef __WIN32__ /* detect Borland c++ Definition and add MS Visual c++ one (???) */
#ifndef WIN32
#define WIN32
#endif
#endif
#ifdef WIN32
// # define STRICT /* XXX - Strict typing, please (do we want this?) */
# include
# include
# include
# include
# ifdef _MSC_VER
# include
# endif /* _MSC_VER */
#ifndef alloca
#include
#include
#define alloca _alloca
#endif
#ifndef strdup
#include
#define strdup _strdup
#endif
#endif /* ifdef WIN32 */
#endif
ed2k_hash-0.3.3/ed2k_hash/processfile.c 0000644 0001750 0001750 00000023040 07610007023 016641 0 ustar tiago tiago /***************************************************************************
processfile.c - description
-------------------
begin : Tue Sep 3 2002
copyright : (C) 2002 by Tim-Philipp Müller
email : t.i.m@orange.net
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
#include "global.h"
#include
#include
#include
#include
#undef ED2K_HASH_USE_MMAP
/* for nmap on unix systems */
/* TODO: add other *nix OS defines here */
#if (defined(__linux__) || defined(__MAC_OS_X__) || defined(__FreeBSD__))
# include
# include
# include
# include
# include
# ifdef _POSIX_MAPPED_FILES
# define ED2K_HASH_USE_MMAP 1
# endif
#endif
#include "md4.h"
#include "options.h"
#include "processfile.h"
#include "ui.h"
/* functions */
static unsigned int get_file_size (const char *fn);
#ifndef ED2K_HASH_USE_MMAP
static int process_one_block (fileinfo *fi, unsigned int b);
#endif
/* process_file
*
* gets the file size of the file and hashes it.
*
* If info is set, it will fill info
* with a fileinfo structure (which is undefined on error)
*
* The function will regularly call ui_update(), and will
* stop hashing if ui_update() returns a negative value.
*
* returns 0 on error, otherwise 1
*
*/
#ifdef ED2K_HASH_USE_MMAP
/************************** version with mmap() ********************************/
/* version using mmap() by Thomas Lussnig */
int
process_file (const char *fn, fileinfo *info)
{
const char hexdigits[16] = "0123456789abcdef";
unsigned int b, j;
fileinfo fi;
int fd;
if (!fn)
return 0;
memset (&fi,0x00,sizeof(fi));
/* get filesize */
fi.size = get_file_size (fn);
if (fi.size == (unsigned int)-1) /* error getting filesize? */
{
ui_printerr ("error getting filesize ('%s')?\n", fn);
return 0;
}
if (fi.size == 0) /* a filesize of 0 bytes? */
{
ui_printerr ("filesize of 0 bytes ('%s')?\n", fn);
return 0;
}
fi.filepath = strdup(fn);
if (!strrchr(fn,SLASH_CHAR)) /* get the basename without path components */
{
fi.basename = strdup(fn);
} else fi.basename = strdup(strrchr(fn,SLASH_CHAR)+1);
fi.blocks = fi.size/BLOCKSIZE;
if (fi.size % BLOCKSIZE > 0)
fi.blocks++;
fi.ed2k_hash = (unsigned char*) malloc(16);
fi.ed2k_hash_str = (char*) malloc(33);
fi.parthashes = (unsigned char*) malloc(fi.blocks*16); /* 16 bytes for each block's hash */
if ((!fi.parthashes) || (!fi.ed2k_hash) || (!fi.ed2k_hash_str) || (!fi.filepath))
return 0;
if ((fd = open (fi.filepath, O_RDONLY)) < 0)
{
ui_printerr ("in %s - fopen(%s) failed: %s\n\n", __FUNCTION__, fi.filepath, strerror(errno));
return 0;
}
for (b=0; b < fi.blocks; b++)
{
MD4_CTX context;
int len, start;
void *map;
len = BLOCKSIZE;
if (b == fi.blocks - 1)
len = fi.size % BLOCKSIZE;
if (len==0) /* this case shouldn't happen */
return 0;
start = b*BLOCKSIZE;
map = mmap (NULL, len, PROT_READ, MAP_SHARED, fd, b*BLOCKSIZE);
if (map == NULL)
{
ui_printerr ("in %s - mmap() failed: %s\n", __FUNCTION__, strerror(errno));
return 0;
}
MD4_Init (&context);
MD4_Update (&context, map, len);
MD4_Final (fi.parthashes+(b*16), &context);
munmap (map, len);
if ((option_debug)||(option_verbose))
{
int k;
ui_print ("partial hash block %3u: ", b);
for (k=0; k<16; k++)
ui_print ("%02hx", (fi.parthashes+(b*16))[k]);
ui_print ("\n");
}
} /* end of: for (b=0; b < fi.blocks; b++) */
close(fd);
/* if only one block: partial hash == final hash */
if (fi.blocks>1)
{
MD4_CTX context;
MD4_Init (&context);
MD4_Update (&context, fi.parthashes, 16*b);
MD4_Final (fi.ed2k_hash, &context);
} else memcpy (fi.ed2k_hash, fi.parthashes, 16);
/* hash to hash string: */
memset (fi.ed2k_hash_str, 0x00, 33*sizeof(char));
for (j=0; j<16; j++)
{
fi.ed2k_hash_str[(j<<1) ] = hexdigits[(((fi.ed2k_hash[j]) & 0xf0) >> 4)];
fi.ed2k_hash_str[(j<<1)+1] = hexdigits[(((fi.ed2k_hash[j]) & 0x0f) )];
}
if (info)
memcpy (info, &fi, sizeof(fi));
return 1;
}
#else
/************************** version without mmap() *****************************/
int
process_file (const char *fn, fileinfo *info)
{
const char hexdigits[16] = "0123456789abcdef";
unsigned int b, j;
fileinfo fi;
if (!fn)
return 0;
memset (&fi,0x00,sizeof(fi));
/* get filesize */
fi.size = get_file_size (fn);
if (fi.size == (unsigned int)-1) /* error getting filesize? */
{
ui_printerr ("error getting filesize ('%s')?\n", fn);
return 0;
}
if (fi.size == 0) /* a filesize of 0 bytes? */
{
ui_printerr ("filesize of 0 bytes ('%s')?\n", fn);
return 0;
}
fi.filepath = strdup(fn);
if (!strrchr(fn,SLASH_CHAR)) /* get the basename without path components */
{
fi.basename = strdup(fn);
} else fi.basename = strdup(strrchr(fn,SLASH_CHAR)+1);
fi.blocks = fi.size/BLOCKSIZE;
if (fi.size % BLOCKSIZE > 0)
fi.blocks++;
fi.ed2k_hash = (unsigned char*) malloc(16);
fi.ed2k_hash_str = (char*) malloc(33);
fi.parthashes = (unsigned char*) malloc(fi.blocks*16); /* 16 bytes for each block's hash */
if ((!fi.parthashes) || (!fi.ed2k_hash) || (!fi.ed2k_hash_str))
return 0;
for (b=0; b < fi.blocks; b++)
{
if (!process_one_block (&fi, b))
return 0;
}
/* if only one block: partial hash == final hash */
if (fi.blocks>1)
{
MD4_CTX context;
MD4_Init (&context);
MD4_Update (&context, fi.parthashes, 16*b);
MD4_Final (fi.ed2k_hash, &context);
} else memcpy (fi.ed2k_hash, fi.parthashes, 16);
/* hash to hash string: */
memset (fi.ed2k_hash_str, 0x00, 33*sizeof(char));
for (j=0; j<16; j++)
{
fi.ed2k_hash_str[(j<<1) ] = hexdigits[(((fi.ed2k_hash[j]) & 0xf0) >> 4)];
fi.ed2k_hash_str[(j<<1)+1] = hexdigits[(((fi.ed2k_hash[j]) & 0x0f) )];
}
if (info)
memcpy (info, &fi, sizeof(fi));
return 1;
}
/* process_one_block
*
* hashes one block of 9500kB of the file and
* calls ui_update() in between.
*
* returns 0 on error, otherwise 1
*
*/
static int
process_one_block (fileinfo *fi, unsigned int b)
{
MD4_CTX context;
FILE *f;
unsigned int blocksize = BLOCKSIZE;
unsigned int left;
unsigned char hash[16];
if ((!fi) || (!fi->parthashes) || (!fi->filepath))
return 0;
f = fopen (fi->filepath, "rb");
if (!f)
{
ui_printerr ("in %s - fopen(%s) failed: %s\n\n", __FUNCTION__, fi->filepath, strerror(errno));
return 0;
}
if (fseek(f, b*BLOCKSIZE, SEEK_SET)<0)
{
ui_printerr ("in %s - fseek() failed: %s\n", __FUNCTION__, strerror(errno));
return 0;
}
if (b == fi->blocks - 1)
blocksize = fi->size % BLOCKSIZE;
if (blocksize==0) /* this case shouldn't happen */
return 0;
left = blocksize;
MD4_Init (&context);
while (left>0)
{
unsigned char buf[4*1024];
int ret;
size_t readnow = (left>=sizeof(buf)) ? sizeof(buf) : left;
ret = fread(buf, readnow, 1, f);
if (ret!=1)
{
ui_printerr ("in %s - fread(%s) failed: %s\n", __FUNCTION__, fi->filepath, strerror(errno));
fclose(f);
return 0;
}
MD4_Update (&context, (void*)buf, readnow);
left -= readnow;
if (!ui_update (fi->filepath, fi->size, fi->size-left))
return 0;
}
MD4_Final (hash, &context);
memcpy (fi->parthashes+(b*16), hash, 16);
if ((option_debug)||(option_verbose))
{
int k;
ui_print ("partial hash block %3u: ", b);
for (k=0; k<16; k++)
ui_print ("%02hx", hash[k]);
ui_print ("\n");
}
fclose(f);
return 1;
}
#endif /* ifdef ED2K_HASH_USE_MMAP ... else ...*/
/* process_file_free_info_structure_content
*
* frees the fields of the fileinfo structure,
* but NOT the structure itself,
* and NOT the info->user_data field
* (which must be freed by the UI if it was used)
*
*/
void
process_file_free_info_structure_content (fileinfo *info)
{
if (!info)
return;
if (info->filepath)
free(info->filepath);
if (info->basename)
free(info->basename);
if (info->parthashes)
free(info->parthashes);
if (info->ed2k_hash)
free(info->ed2k_hash);
if (info->ed2k_hash_str)
free(info->ed2k_hash_str);
}
/* get_file_size
*
* unelegant but portable way to get the size of a file
*
* returns (unsigned int)-1 on error, otherwise filesize
*
*/
static unsigned int
get_file_size (const char *fn)
{
FILE *file;
unsigned long fsize;
if (!fn)
return (unsigned int)-1;
file = fopen(fn, "rb");
if (!file)
{
ui_printerr ("in fopen(%s) - %s\n\n", fn, strerror(errno));
return (unsigned int)-1;
}
if (fseek(file, 0, SEEK_END)<0) /* go to very last byte of file */
return (unsigned int)-1;
fsize = ftell(file); /* and tell us which no. that is */
if (fsize == (unsigned long) -1)
return (unsigned int)-1;
fclose(file);
if (fsize > (unsigned long)((unsigned int)-1))
{
ui_printerr ("the file %s is too big. The donkey can only deal with files smaller than 4GB!\n\n", fn);
return ((unsigned int)-1);
}
return (unsigned int)fsize;
}
ed2k_hash-0.3.3/ed2k_hash/ui.h 0000644 0001750 0001750 00000002272 07535440725 014771 0 ustar tiago tiago /***************************************************************************
ui.h - description
-------------------
begin : Tue Sep 3 2002
copyright : (C) 2002 by Tim-Philipp Müller
email : t.i.m@orange.net
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
#ifndef _ed2k_hash_ui_h_included_
#define _ed2k_hash_ui_h_included_
#include "cl_ui.h" /* command line interface is all we have for the moment */
#endif /* ifndef _ed2k_hash_ui_h_included_ */
ed2k_hash-0.3.3/ed2k_hash/Makefile.am 0000644 0001750 0001750 00000001267 07611103202 016217 0 ustar tiago tiago ####### kdevelop will overwrite this part!!! (begin)##########
bin_PROGRAMS = ed2k_hash
## INCLUDES were found outside kdevelop specific part
ed2k_hash_SOURCES = md4.c processfile.c linkedlist.c options.c cl_ui.c main.c
ed2k_hash_LDADD =
SUBDIRS = docs
EXTRA_DIST = main.c cl_ui.h cl_ui.c options.h options.c linkedlist.h linkedlist.c ui.h processfile.h processfile.c md4.h md4.c global.h Makefile.mingw32
####### kdevelop will overwrite this part!!! (end)############
# set the include path found by configure
INCLUDES= $(all_includes)
# the library search path.
ed2k_hash_LDFLAGS = $(all_libraries)
ed2k_hash-0.3.3/subdirs 0000644 0001750 0001750 00000000033 07611257751 013742 0 ustar tiago tiago CVS
admin
debian
ed2k_hash
ed2k_hash-0.3.3/config.h.in 0000644 0001750 0001750 00000000373 11257536450 014373 0 ustar tiago tiago /* config.h.in. Generated automatically from configure.in by autoheader 2.13. */
/* Name of package */
#undef PACKAGE
/* Version number of package */
#undef VERSION
/* C++ compiler supports template repository */
#undef HAVE_TEMPLATE_REPOSITORY
ed2k_hash-0.3.3/Makefile.am 0000644 0001750 0001750 00000002102 07611103201 014353 0 ustar tiago tiago ####### kdevelop will overwrite this part!!! (begin)##########
SUBDIRS = ed2k_hash
EXTRA_DIST = ed2k_hash.kdevprj admin AUTHORS COPYING ChangeLog INSTALL README TODO ed2k_hash.lsm
####### kdevelop will overwrite this part!!! (end)############
# not a GNU package. You can remove this line, if
# have all needed files, that a GNU package needs
AUTOMAKE_OPTIONS = foreign
$(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in ;
$(top_srcdir)/subdirs:
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs
$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/special.m4.in $(top_srcdir)/admin/libtool.m4.in
@cd $(top_srcdir) && cat admin/acinclude.m4.in special.m4.in admin/libtool.m4.in > acinclude.m4
MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files
package-messages:
$(MAKE) -f admin/Makefile.common package-messages
dist-hook:
cd $(top_distdir) && perl admin/am_edit -padmin
cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs
ed2k_hash-0.3.3/admin/ 0000755 0001750 0001750 00000000000 11257540433 013431 5 ustar tiago tiago ed2k_hash-0.3.3/admin/ltcf-gcj.sh 0000644 0001750 0001750 00000064117 07535440724 015475 0 ustar tiago tiago #### This script is meant to be sourced by ltconfig.
# ltcf-gcj.sh - Create a GCJ compiler specific configuration
#
# Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit , 1996
#
# Original GCJ support by:
# Alexandre Oliva
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# 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.
# Source file extension for Java test sources.
ac_ext=java
# Object file extension for compiled Java test sources.
objext=o
# Code to be used in simple compile tests
lt_simple_compile_test_code="class foo {}"
# Code to be used in simple link tests
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
## Linker Characteristics
case $host_os in
cygwin* | mingw*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
if test "$with_gcc" != yes; then
with_gnu_ld=no
fi
;;
esac
ld_shlibs=yes
if test "$with_gnu_ld" = yes; then
# If archive_cmds runs LD, not CC, wlarc should be empty
wlarc='${wl}'
# See if GNU ld supports shared libraries.
case $host_os in
aix3* | aix4*)
# On AIX, the GNU linker is very broken
ld_shlibs=no
cat <&2
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
*** to be unable to reliably create shared libraries on AIX.
*** Therefore, libtool is disabling shared libraries support. If you
*** really care for shared libraries, you may want to modify your PATH
*** so that a non-GNU linker is found, and then restart.
EOF
;;
amigaos*)
archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# Samuel A. Falvo II reports
# that the semantics of dynamic libraries on AmigaOS, at least up
# to version 4, is to share data among multiple programs linked
# with the same dynamic library. Since this doesn't match the
# behavior of shared libraries on other platforms, we can use
# them.
ld_shlibs=no
;;
beos*)
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
allow_undefined_flag=unsupported
# Joseph Beckenbach says some releases of gcc
# support --undefined. This deserves some investigation. FIXME
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
else
ld_shlibs=no
fi
;;
cygwin* | mingw*)
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
allow_undefined_flag=unsupported
always_export_symbols=yes
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
else $CC -o impgen impgen.c ; fi)~
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
# cygwin and mingw dlls have different entry points and sets of symbols
# to exclude.
# FIXME: what about values for MSVC?
dll_entry=__cygwin_dll_entry@12
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
case $host_os in
mingw*)
# mingw values
dll_entry=_DllMainCRTStartup@12
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
;;
esac
# mingw and cygwin differ, and it's simplest to just exclude the union
# of the two symbol sets.
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
# recent cygwin and mingw systems supply a stub DllMain which the user
# can override, but on older systems we have to supply one (in ltdll.c)
if test "x$lt_cv_need_dllmain" = "xyes"; then
ltdll_obj='$output_objdir/$soname-ltdll.'"$objext "
ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/$soname-ltdll.c~
test -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
else
ltdll_obj=
ltdll_cmds=
fi
# Extract the symbol export list from an `--export-all' def file,
# then regenerate the def file from the symbol export list, so that
# the compiled dll only exports the symbol export list.
# Be careful not to strip the DATA tag left be newer dlltools.
export_symbols_cmds="$ltdll_cmds"'
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is.
# If DATA tags from a recent dlltool are present, honour them!
archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
cp $export_symbols $output_objdir/$soname-def;
else
echo EXPORTS > $output_objdir/$soname-def;
_lt_hint=1;
cat $export_symbols | while read symbol; do
set dummy \$symbol;
case \[$]# in
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
esac;
_lt_hint=`expr 1 + \$_lt_hint`;
done;
fi~
'"$ltdll_cmds"'
$CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
$CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
;;
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
fi
;;
solaris* | sysv5*)
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
cat <&2
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
*** create shared libraries on Solaris systems. Therefore, libtool
*** is disabling shared libraries support. We urge you to upgrade GNU
*** binutils to release 2.9.1 or newer. Another option is to modify
*** your PATH or compiler configuration so that the native linker is
*** used, and then restart.
EOF
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
;;
sunos4*)
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
wlarc=
hardcode_direct=yes
hardcode_shlibpath_var=no
;;
*)
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
;;
esac
if test "$ld_shlibs" = yes; then
runpath_var=LD_RUN_PATH
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
export_dynamic_flag_spec='${wl}--export-dynamic'
case $host_os in
cygwin* | mingw*)
# dlltool doesn't understand --whole-archive et. al.
whole_archive_flag_spec=
;;
*)
# ancient GNU ld didn't support --whole-archive et. al.
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
else
whole_archive_flag_spec=
fi
;;
esac
fi
else
# PORTME fill in a description of your system's linker (not GNU ld)
case $host_os in
aix3*)
allow_undefined_flag=unsupported
always_export_symbols=yes
archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
if test "$with_gcc" = yes && test -z "$link_static_flag"; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
hardcode_direct=unsupported
fi
;;
aix4* | aix5*)
hardcode_direct=yes
hardcode_libdir_separator=':'
link_all_deplibs=yes
# When large executables or shared objects are built, AIX ld can
# have problems creating the table of contents. If linking a library
# or program results in "error TOC overflow" add -mminimal-toc to
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
if test "$with_gcc" = yes; then
case $host_os in aix4.[012]|aix4.[012].*)
# We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+
collect2name=`${CC} -print-prog-name=collect2`
if test -f "$collect2name" && \
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
hardcode_direct=yes
else
# We have old collect2
hardcode_direct=unsupported
# It fails to find uninstalled libraries when the uninstalled
# path is not listed in the libpath. Setting hardcode_minus_L
# to unsupported forces relinking
hardcode_minus_L=yes
hardcode_libdir_flag_spec='-L$libdir'
hardcode_libdir_separator=
fi
esac
shared_flag='-shared'
else
# not using gcc
if test "$host_cpu" = ia64; then
shared_flag='${wl}-G'
else
shared_flag='${wl}-bM:SRE'
fi
fi
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
exp_sym_flag='-Bexport'
no_entry_flag=""
else
# Test if we are trying to use run time linking, or normal AIX style linking.
# If -brtl is somewhere in LDFLAGS, we need to do run time linking.
aix_use_runtimelinking=no
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
aix_use_runtimelinking=yes
break
fi
done
exp_sym_flag='-bexport'
no_entry_flag='-bnoentry'
fi
# -bexpall does not export symbols beginning with underscore (_)
always_export_symbols=yes
if test "$aix_use_runtimelinking" = yes; then
# Warning - without using the other run time loading flags (-brtl), -berok will
# link without error, but may produce a broken library.
allow_undefined_flag=' ${wl}-berok'
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
else
if test "$host_cpu" = ia64; then
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
allow_undefined_flag="-z nodefs"
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
else
allow_undefined_flag=' ${wl}-berok'
# -bexpall does not export symbols beginning with underscore (_)
always_export_symbols=yes
# Exported symbols can be pulled into shared objects from archives
whole_archive_flag_spec=' '
build_libtool_need_lc=yes
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
# This is similar to how AIX traditionally builds it's shared libraries.
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
fi
fi
;;
amigaos*)
archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# see comment about different semantics on the GNU ld section
ld_shlibs=no
;;
cygwin* | mingw*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec=' '
allow_undefined_flag=unsupported
# Tell ltmain to make .lib files, not .a files.
libext=lib
# FIXME: Setting linknames here is a bad hack.
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
# The linker will automatically build a .lib file if we build a DLL.
old_archive_from_new_cmds='true'
# FIXME: Should let the user specify the lib program.
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
fix_srcfile_path='`cygpath -w "$srcfile"`'
;;
freebsd1*)
ld_shlibs=no
;;
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
# support. Future versions do this automatically, but an explicit c++rt0.o
# does not break anything, and helps significantly (at the cost of a little
# extra space).
freebsd2.2*)
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
;;
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
freebsd2*)
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct=yes
hardcode_minus_L=yes
hardcode_shlibpath_var=no
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd*)
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
;;
hpux9* | hpux10* | hpux11*)
case $host_os in
hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
esac
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
hardcode_minus_L=yes # Not in the search PATH, but as the default
# location of the library.
export_dynamic_flag_spec='${wl}-E'
;;
irix5* | irix6*)
if test "$with_gcc" = yes; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
else
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
fi
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
link_all_deplibs=yes
;;
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
fi
hardcode_libdir_flag_spec='${wl}-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
;;
openbsd*)
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
;;
os2*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
allow_undefined_flag=unsupported
archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
;;
osf3*)
if test "$with_gcc" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
else
allow_undefined_flag=' -expect_unresolved \*'
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
fi
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$with_gcc" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
else
allow_undefined_flag=' -expect_unresolved \*'
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
fi
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
sco3.2v5*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_shlibpath_var=no
runpath_var=LD_RUN_PATH
hardcode_runpath_var=yes
;;
solaris*)
no_undefined_flag=' -z text'
# $CC -shared without GNU ld will not create a library from C++
# object files and a static libstdc++, better avoid it by now
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_shlibpath_var=no
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
esac
link_all_deplibs=yes
;;
sunos4*)
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=yes
hardcode_minus_L=yes
hardcode_shlibpath_var=no
;;
sysv4)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
runpath_var='LD_RUN_PATH'
hardcode_shlibpath_var=no
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
;;
sysv4.3*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_shlibpath_var=no
export_dynamic_flag_spec='-Bexport'
;;
sysv5*)
no_undefined_flag=' -z text'
# $CC -shared without GNU ld will not create a library from C++
# object files and a static libstdc++, better avoid it by now
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
hardcode_libdir_flag_spec=
hardcode_shlibpath_var=no
runpath_var='LD_RUN_PATH'
;;
uts4*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_shlibpath_var=no
;;
dgux*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_shlibpath_var=no
;;
sysv4*MP*)
if test -d /usr/nec; then
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_shlibpath_var=no
runpath_var=LD_RUN_PATH
hardcode_runpath_var=yes
ld_shlibs=yes
fi
;;
sysv4.2uw2*)
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct=yes
hardcode_minus_L=no
hardcode_shlibpath_var=no
hardcode_runpath_var=yes
runpath_var=LD_RUN_PATH
;;
unixware7*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
runpath_var='LD_RUN_PATH'
hardcode_shlibpath_var=no
;;
*)
ld_shlibs=no
;;
esac
fi
## Compiler Characteristics: PIC flags, static flags, etc
# We don't use cached values here since only the C compiler
# characteristics should be cached.
ac_cv_prog_cc_pic=
ac_cv_prog_cc_shlib=
ac_cv_prog_cc_wl=
ac_cv_prog_cc_static=
ac_cv_prog_cc_no_builtin=
ac_cv_prog_cc_can_build_shared=$can_build_shared
ac_cv_prog_cc_wl='-Wl,'
ac_cv_prog_cc_static='-static'
case $host_os in
beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
aix*)
# Below there is a dirty hack to force normal static linking with -ldl
# The problem is because libdl dynamically linked with both libc and
# libC (AIX C++ library), which obviously doesn't included in libraries
# list by gcc. This cause undefined symbols with -static flags.
# This hack allows C programs to be linked with "-static -ldl", but
# we not sure about C++ programs.
ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
;;
*djgpp*)
# DJGPP does not suppot shared libraries at all
ac_cv_prog_cc_pic=
;;
cygwin* | mingw* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
ac_cv_prog_cc_pic='-DDLL_EXPORT'
;;
amigaos*)
# FIXME: we need at least 68020 code to build shared libraries, but
# adding the `-m68020' flag to GCC prevents building anything better,
# like `-m68040'.
ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
;;
sysv4*MP*)
if test -d /usr/nec; then
ac_cv_prog_cc_pic=-Kconform_pic
fi
;;
*)
ac_cv_prog_cc_pic='-fPIC'
;;
esac
# GCJ did not exist at the time GCC didn't implicitly link libc in.
need_lc=no
# All existing releases of GCJ support `-c -o'.
lt_cv_compiler_c_o=yes
ed2k_hash-0.3.3/admin/ltcf-c.sh 0000644 0001750 0001750 00000075731 07535440720 015154 0 ustar tiago tiago #### This script is meant to be sourced by ltconfig.
# ltcf-c.sh - Create a C compiler specific configuration
#
# Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit , 1996
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# 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.
# Source file extension for C test sources.
ac_ext=c
# Object file extension for compiled C test sources.
objext=o
# Code to be used in simple compile tests
lt_simple_compile_test_code="int some_variable = 0;"
# Code to be used in simple link tests
lt_simple_link_test_code='main(){return(0);}'
## Linker Characteristics
case $host_os in
cygwin* | mingw*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
if test "$with_gcc" != yes; then
with_gnu_ld=no
fi
;;
esac
ld_shlibs=yes
if test "$with_gnu_ld" = yes; then
# If archive_cmds runs LD, not CC, wlarc should be empty
wlarc='${wl}'
# See if GNU ld supports shared libraries.
case $host_os in
aix3* | aix4* | aix5*)
# On AIX, the GNU linker is very broken
ld_shlibs=no
cat <&2
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
*** to be unable to reliably create shared libraries on AIX.
*** Therefore, libtool is disabling shared libraries support. If you
*** really care for shared libraries, you may want to modify your PATH
*** so that a non-GNU linker is found, and then restart.
EOF
;;
amigaos*)
archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# Samuel A. Falvo II reports
# that the semantics of dynamic libraries on AmigaOS, at least up
# to version 4, is to share data among multiple programs linked
# with the same dynamic library. Since this doesn't match the
# behavior of shared libraries on other platforms, we can use
# them.
ld_shlibs=no
;;
beos*)
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
allow_undefined_flag=unsupported
# Joseph Beckenbach says some releases of gcc
# support --undefined. This deserves some investigation. FIXME
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
else
ld_shlibs=no
fi
;;
cygwin* | mingw*)
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
allow_undefined_flag=unsupported
always_export_symbols=yes
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
else $CC -o impgen impgen.c ; fi)~
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
# cygwin and mingw dlls have different entry points and sets of symbols
# to exclude.
# FIXME: what about values for MSVC?
dll_entry=__cygwin_dll_entry@12
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
case $host_os in
mingw*)
# mingw values
dll_entry=_DllMainCRTStartup@12
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
;;
esac
# mingw and cygwin differ, and it's simplest to just exclude the union
# of the two symbol sets.
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
# recent cygwin and mingw systems supply a stub DllMain which the user
# can override, but on older systems we have to supply one (in ltdll.c)
if test "x$lt_cv_need_dllmain" = "xyes"; then
ltdll_obj='$output_objdir/$soname-ltdll.'"$objext "
ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/$soname-ltdll.c~
test -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
else
ltdll_obj=
ltdll_cmds=
fi
# Extract the symbol export list from an `--export-all' def file,
# then regenerate the def file from the symbol export list, so that
# the compiled dll only exports the symbol export list.
# Be careful not to strip the DATA tag left be newer dlltools.
export_symbols_cmds="$ltdll_cmds"'
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is.
# If DATA tags from a recent dlltool are present, honour them!
archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
cp $export_symbols $output_objdir/$soname-def;
else
echo EXPORTS > $output_objdir/$soname-def;
_lt_hint=1;
cat $export_symbols | while read symbol; do
set dummy \$symbol;
case \[$]# in
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
esac;
_lt_hint=`expr 1 + \$_lt_hint`;
done;
fi~
'"$ltdll_cmds"'
$CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
$CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
;;
darwin* | rhapsody*)
allow_undefined_flag='-undefined suppress'
archive_cmds='$CC `test .$module = .yes && echo -bundle || echo -dynamiclib` $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts -install_name $rpath/$soname `test -n "$verstring" -a x$verstring != x0.0 && echo $verstring`'
# We need to add '_' to the symbols in $export_symbols first
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
hardcode_direct=yes
hardcode_shlibpath_var=no
whole_archive_flag_spec='-all_load $convenience'
;;
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
fi
;;
solaris* | sysv5*)
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
cat <&2
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
*** create shared libraries on Solaris systems. Therefore, libtool
*** is disabling shared libraries support. We urge you to upgrade GNU
*** binutils to release 2.9.1 or newer. Another option is to modify
*** your PATH or compiler configuration so that the native linker is
*** used, and then restart.
EOF
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
;;
sunos4*)
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
wlarc=
hardcode_direct=yes
hardcode_shlibpath_var=no
;;
*)
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
;;
esac
case "$host_os" in
freebsd*)
skip_need_lc_check=yes
;;
esac
if test "$ld_shlibs" = yes; then
runpath_var=LD_RUN_PATH
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
export_dynamic_flag_spec='${wl}--export-dynamic'
case $host_os in
cygwin* | mingw*)
# dlltool doesn't understand --whole-archive et. al.
whole_archive_flag_spec=
;;
*)
# ancient GNU ld didn't support --whole-archive et. al.
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
else
whole_archive_flag_spec=
fi
;;
esac
fi
else
# PORTME fill in a description of your system's linker (not GNU ld)
case $host_os in
aix3*)
allow_undefined_flag=unsupported
always_export_symbols=yes
archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
if test "$with_gcc" = yes && test -z "$link_static_flag"; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
hardcode_direct=unsupported
fi
;;
aix4* | aix5*)
hardcode_direct=yes
hardcode_libdir_separator=':'
link_all_deplibs=yes
# When large executables or shared objects are built, AIX ld can
# have problems creating the table of contents. If linking a library
# or program results in "error TOC overflow" add -mminimal-toc to
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
if test "$with_gcc" = yes; then
case $host_os in aix4.[012]|aix4.[012].*)
# We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+
collect2name=`${CC} -print-prog-name=collect2`
if test -f "$collect2name" && \
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
hardcode_direct=yes
else
# We have old collect2
hardcode_direct=unsupported
# It fails to find uninstalled libraries when the uninstalled
# path is not listed in the libpath. Setting hardcode_minus_L
# to unsupported forces relinking
hardcode_minus_L=yes
hardcode_libdir_flag_spec='-L$libdir'
hardcode_libdir_separator=
fi
esac
shared_flag='-shared'
else
# not using gcc
if test "$host_cpu" = ia64; then
shared_flag='${wl}-G'
else
shared_flag='${wl}-bM:SRE'
fi
fi
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
exp_sym_flag='-Bexport'
no_entry_flag=""
else
# KDE requires run time linking. Make it the default.
aix_use_runtimelinking=yes
exp_sym_flag='-bexport'
no_entry_flag='-bnoentry'
fi
# Let the compiler handle the export list.
always_export_symbols=no
if test "$aix_use_runtimelinking" = yes; then
# Warning - without using the other run time loading flags (-brtl), -berok will
# link without error, but may produce a broken library.
allow_undefined_flag=' ${wl}-berok'
# The following three lines along with hardcode_into_libs=yes put the correct path into libraries.
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir${libdir:+:}/usr/lib:/lib'
archive_cmds='$CC '"$shared_flag"' $libobjs $deplibs $compiler_flags ${wl}-G '"$hardcode_libdir_flag_spec"' -o $lib'
archive_expsym_cmds='$CC '"$shared_flag"' $libobjs $deplibs $compiler_flags ${wl}-G '"$hardcode_libdir_flag_spec"' ${wl}'"$exp_sym_flag"':$export_symbols -o $lib'
else
if test "$host_cpu" = ia64; then
hardcode_libdir_flag_spec='${wl}-R $libdir${libdir:+:}/usr/lib:/lib'
allow_undefined_flag="-z nodefs"
archive_cmds='$CC '"$shared_flag"' $libobjs $deplibs $compiler_flags '"$hardcode_libdir_flag_spec"' -o $lib'
archive_expsym_cmds='$CC '"$shared_flag"' $libobjs $deplibs $compiler_flags '"$hardcode_libdir_flag_spec"' ${wl}'"$exp_sym_flag"':$export_symbols -o $lib'
else
allow_undefined_flag=' ${wl}-berok'
# -bexpall does not export symbols beginning with underscore (_)
always_export_symbols=yes
# Exported symbols can be pulled into shared objects from archives
whole_archive_flag_spec=' '
build_libtool_need_lc=yes
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
# This is similar to how AIX traditionally builds it's shared libraries.
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
fi
fi
;;
amigaos*)
archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# see comment about different semantics on the GNU ld section
ld_shlibs=no
;;
cygwin* | mingw*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec=' '
allow_undefined_flag=unsupported
# Tell ltmain to make .lib files, not .a files.
libext=lib
# FIXME: Setting linknames here is a bad hack.
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
# The linker will automatically build a .lib file if we build a DLL.
old_archive_from_new_cmds='true'
# FIXME: Should let the user specify the lib program.
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
fix_srcfile_path='`cygpath -w "$srcfile"`'
;;
freebsd1*)
ld_shlibs=no
;;
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
# support. Future versions do this automatically, but an explicit c++rt0.o
# does not break anything, and helps significantly (at the cost of a little
# extra space).
freebsd2.2*)
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
;;
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
freebsd2*)
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct=yes
hardcode_minus_L=yes
hardcode_shlibpath_var=no
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd*)
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
skip_need_lc_check=yes
;;
hpux9* | hpux10* | hpux11*)
case $host_os in
hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
esac
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
hardcode_minus_L=yes # Not in the search PATH, but as the default
# location of the library.
export_dynamic_flag_spec='${wl}-E'
;;
irix5* | irix6*)
if test "$with_gcc" = yes; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
else
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
fi
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
link_all_deplibs=yes
;;
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
fi
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
;;
newsos6)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
hardcode_direct=yes
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_shlibpath_var=no
;;
openbsd*)
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
;;
os2*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
allow_undefined_flag=unsupported
archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
;;
osf3*)
if test "$with_gcc" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
else
allow_undefined_flag=' -expect_unresolved \*'
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
fi
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$with_gcc" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
else
allow_undefined_flag=' -expect_unresolved \*'
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
fi
hardcode_libdir_flag_spec='-rpath $libdir'
hardcode_libdir_separator=:
;;
sco3.2v5*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_shlibpath_var=no
runpath_var=LD_RUN_PATH
hardcode_runpath_var=yes
;;
solaris*)
no_undefined_flag=' -z text'
# $CC -shared without GNU ld will not create a library from C++
# object files and a static libstdc++, better avoid it by now
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_shlibpath_var=no
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
esac
link_all_deplibs=yes
;;
sunos4*)
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=yes
hardcode_minus_L=yes
hardcode_shlibpath_var=no
;;
sysv4)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
runpath_var='LD_RUN_PATH'
hardcode_shlibpath_var=no
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
;;
sysv4.3*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_shlibpath_var=no
export_dynamic_flag_spec='-Bexport'
;;
sysv5*)
no_undefined_flag=' -z text'
# $CC -shared without GNU ld will not create a library from C++
# object files and a static libstdc++, better avoid it by now
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
hardcode_libdir_flag_spec=
hardcode_shlibpath_var=no
runpath_var='LD_RUN_PATH'
;;
uts4*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_shlibpath_var=no
;;
dgux*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_shlibpath_var=no
;;
sysv4*MP*)
if test -d /usr/nec; then
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_shlibpath_var=no
runpath_var=LD_RUN_PATH
hardcode_runpath_var=yes
ld_shlibs=yes
fi
;;
sysv4.2uw2*)
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct=yes
hardcode_minus_L=no
hardcode_shlibpath_var=no
hardcode_runpath_var=yes
runpath_var=LD_RUN_PATH
;;
unixware7*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
runpath_var='LD_RUN_PATH'
hardcode_shlibpath_var=no
;;
*)
ld_shlibs=no
;;
esac
fi
## Compiler Characteristics: PIC flags, static flags, etc
if test "X${ac_cv_prog_cc_pic+set}" = Xset; then
:
else
ac_cv_prog_cc_pic=
ac_cv_prog_cc_shlib=
ac_cv_prog_cc_wl=
ac_cv_prog_cc_static=
ac_cv_prog_cc_no_builtin=
ac_cv_prog_cc_can_build_shared=$can_build_shared
if test "$with_gcc" = yes; then
ac_cv_prog_cc_wl='-Wl,'
ac_cv_prog_cc_static='-static'
case $host_os in
aix*)
# All AIX code is PIC.
if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
lt_cv_prog_cc_static='-Bstatic'
else
lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
fi
;;
amigaos*)
# FIXME: we need at least 68020 code to build shared libraries, but
# adding the `-m68020' flag to GCC prevents building anything better,
# like `-m68040'.
ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
;;
beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
cygwin* | mingw* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
ac_cv_prog_cc_pic='-DDLL_EXPORT'
;;
darwin* | rhapsody*)
# PIC is the default on this platform
# Common symbols not allowed in MH_DYLIB files
lt_cv_prog_cc_pic='-fno-common'
;;
*djgpp*)
# DJGPP does not support shared libraries at all
ac_cv_prog_cc_pic=
;;
sysv4*MP*)
if test -d /usr/nec; then
ac_cv_prog_cc_pic=-Kconform_pic
fi
;;
*)
ac_cv_prog_cc_pic='-fPIC'
;;
esac
else
# PORTME Check for PIC flags for the system compiler.
case $host_os in
aix*)
# All AIX code is PIC.
ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
;;
hpux9* | hpux10* | hpux11*)
# Is there a better ac_cv_prog_cc_static that works with the bundled CC?
ac_cv_prog_cc_wl='-Wl,'
ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
ac_cv_prog_cc_pic='+Z'
;;
irix5* | irix6*)
ac_cv_prog_cc_wl='-Wl,'
ac_cv_prog_cc_static='-non_shared'
# PIC (with -KPIC) is the default.
;;
cygwin* | mingw* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
ac_cv_prog_cc_pic='-DDLL_EXPORT'
;;
linux*)
case "$CC" in
ccc*)
# Compaq C
# It appears that all Alpha
# Linux and Compaq Tru64 Unix objects are PIC.
ac_cv_prog_cc_static='-non_shared'
;;
KCC*)
# KAI C++
ac_cv_prog_cc_pic='-fPIC'
ac_cv_prog_cc_wl='--backend -Wl,'
ac_cv_prog_cc_static='-Bstatic'
;;
*)
;;
esac
;;
newsos6)
ac_cv_prog_cc_pic='-KPIC'
ac_cv_prog_cc_static='-Bstatic'
;;
osf3* | osf4* | osf5*)
# All OSF/1 code is PIC.
ac_cv_prog_cc_wl='-Wl,'
ac_cv_prog_cc_static='-non_shared'
;;
sco3.2v5*)
ac_cv_prog_cc_pic='-Kpic'
ac_cv_prog_cc_static='-dn'
ac_cv_prog_cc_shlib='-belf'
;;
solaris*)
ac_cv_prog_cc_pic='-KPIC'
ac_cv_prog_cc_static='-Bstatic'
ac_cv_prog_cc_wl='-Wl,'
;;
sunos4*)
ac_cv_prog_cc_pic='-PIC'
ac_cv_prog_cc_static='-Bstatic'
ac_cv_prog_cc_wl='-Qoption ld '
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
ac_cv_prog_cc_pic='-KPIC'
ac_cv_prog_cc_static='-Bstatic'
ac_cv_prog_cc_wl='-Wl,'
;;
uts4*)
ac_cv_prog_cc_pic='-pic'
ac_cv_prog_cc_static='-Bstatic'
;;
sysv4*MP*)
if test -d /usr/nec ;then
ac_cv_prog_cc_pic='-Kconform_pic'
ac_cv_prog_cc_static='-Bstatic'
fi
;;
*)
ac_cv_prog_cc_can_build_shared=no
;;
esac
fi
case "$host_os" in
# Platforms which do not suport PIC and -DPIC is meaningless
# on them:
*djgpp*)
ac_cv_prog_cc_pic=
;;
*)
ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
;;
esac
fi
need_lc=yes
if test "$enable_shared" = yes && test "$with_gcc" = yes; then
case $archive_cmds in
*'~'*)
# FIXME: we may have to deal with multi-command sequences.
;;
'$CC '*)
# Test whether the compiler implicitly links with -lc since on some
# systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc.
echo $ac_n "checking whether -lc should be explicitly linked in... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_archive_cmds_needs_lc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
need_lc=$ac_cv_archive_cmds_needs_lc
elif test "x$skip_need_lc_check" = "xyes" ; then
echo $ac_n "(skipping, using no) $ac_c" 1>&6
need_lc=no
else
$rm conftest*
echo "static int dummy;" > conftest.$ac_ext
if { (eval echo ltcf-c.sh:need_lc: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
# Append any warnings to the config.log.
cat conftest.err 1>&5
soname=conftest
lib=conftest
libobjs=conftest.$ac_objext
deplibs=
wl=$ac_cv_prog_cc_wl
compiler_flags=-v
linker_flags=-v
verstring=
output_objdir=.
libname=conftest
save_allow_undefined_flag=$allow_undefined_flag
allow_undefined_flag=
if { (eval echo ltcf-c.sh:need_lc: \"$archive_cmds\") 1>&5; (eval $archive_cmds) 2>&1 | grep " -lc " 1>&5 ; }; then
need_lc=no
fi
allow_undefined_flag=$save_allow_undefined_flag
else
cat conftest.err 1>&5
fi
fi
$rm conftest*
echo "$ac_t$need_lc" 1>&6
;;
esac
fi
ac_cv_archive_cmds_needs_lc=$need_lc
ed2k_hash-0.3.3/admin/ylwrap 0000755 0001750 0001750 00000007644 07535440722 014714 0 ustar tiago tiago #! /bin/sh
# ylwrap - wrapper for lex/yacc invocations.
# Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
# Written by Tom Tromey .
#
# 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.
# Usage:
# ylwrap INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
# * INPUT is the input file
# * OUTPUT is file PROG generates
# * DESIRED is file we actually want
# * PROGRAM is program to run
# * ARGS are passed to PROG
# Any number of OUTPUT,DESIRED pairs may be used.
# The input.
input="$1"
shift
case "$input" in
[\\/]* | ?:[\\/]*)
# Absolute path; do nothing.
;;
*)
# Relative path. Make it absolute.
input="`pwd`/$input"
;;
esac
# The directory holding the input.
input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
# Quote $INPUT_DIR so we can use it in a regexp.
# FIXME: really we should care about more than `.' and `\'.
input_rx=`echo "$input_dir" | sed -e 's,\\\\,\\\\\\\\,g' -e 's,\\.,\\\\.,g'`
echo "got $input_rx"
pairlist=
while test "$#" -ne 0; do
if test "$1" = "--"; then
shift
break
fi
pairlist="$pairlist $1"
shift
done
# The program to run.
prog="$1"
shift
# Make any relative path in $prog absolute.
case "$prog" in
[\\/]* | ?:[\\/]*) ;;
*[\\/]*) prog="`pwd`/$prog" ;;
esac
# FIXME: add hostname here for parallel makes that run commands on
# other machines. But that might take us over the 14-char limit.
dirname=ylwrap$$
trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
mkdir $dirname || exit 1
cd $dirname
$prog ${1+"$@"} "$input"
status=$?
if test $status -eq 0; then
set X $pairlist
shift
first=yes
# Since DOS filename conventions don't allow two dots,
# the DOS version of Bison writes out y_tab.c instead of y.tab.c
# and y_tab.h instead of y.tab.h. Test to see if this is the case.
y_tab_nodot="no"
if test -f y_tab.c || test -f y_tab.h; then
y_tab_nodot="yes"
fi
while test "$#" -ne 0; do
from="$1"
# Handle y_tab.c and y_tab.h output by DOS
if test $y_tab_nodot = "yes"; then
if test $from = "y.tab.c"; then
from="y_tab.c"
else
if test $from = "y.tab.h"; then
from="y_tab.h"
fi
fi
fi
if test -f "$from"; then
# If $2 is an absolute path name, then just use that,
# otherwise prepend `../'.
case "$2" in
[\\/]* | ?:[\\/]*) target="$2";;
*) target="../$2";;
esac
# Edit out `#line' or `#' directives. We don't want the
# resulting debug information to point at an absolute srcdir;
# it is better for it to just mention the .y file with no
# path.
sed -e "/^#/ s,$input_rx,," "$from" > "$target" || status=$?
else
# A missing file is only an error for the first file. This
# is a blatant hack to let us support using "yacc -d". If -d
# is not specified, we don't want an error when the header
# file is "missing".
if test $first = yes; then
status=1
fi
fi
shift
shift
first=no
done
else
status=$?
fi
# Remove the directory.
cd ..
rm -rf $dirname
exit $status
ed2k_hash-0.3.3/admin/ltcf-cxx.sh 0000644 0001750 0001750 00000112020 07535440723 015516 0 ustar tiago tiago #### This script is meant to be sourced by ltconfig.
# ltcf-cxx.sh - Create a C++ compiler specific configuration
#
# Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit , 1996
#
# Original C++ support by:Gary V. Vaughan
# Alexandre Oliva
# Ossama Othman
# Thomas Thanner
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# 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.
# Source file extension for C++ test sources.
ac_ext=cc
# Object file extension for compiled C++ test sources.
objext=o
# Code to be used in simple compile tests
lt_simple_compile_test_code="int some_variable = 0;"
# Code to be used in simple link tests
lt_simple_link_test_code='int main(int, char *[]) { return (0); }'
# C++ compiler
CXX=${CXX-c++}
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
CC=${CC-"$CXX"}
CFLAGS=${CFLAGS-"$CXXFLAGS"}
# Allow CC (or CXX) to be a program name with arguments.
set dummy $CC
compiler=$2
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
# we are optimistic. (Too optimistic if you ask me, down there we switch it
# off again for most platforms ;) (MM)
ld_shlibs=yes
# Check if we are using GNU gcc (taken/adapted from configure script)
# We need to check here since "--with-gcc" is set at configure time,
# not ltconfig time!
cat > conftest.$ac_ext <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
with_gcc=yes
# Set up default GNU C++ configuration
# Check if GNU C++ uses GNU ld as the underlying linker, since the
# archiving commands below assume that GNU ld is being used.
if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
egrep 'GNU ld' > /dev/null; then
with_gnu_ld=yes
archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
runpath_var=LD_RUN_PATH
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
export_dynamic_flag_spec='${wl}--export-dynamic'
# If archive_cmds runs LD, not CC, wlarc should be empty
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
# investigate it a little bit more. (MM)
wlarc='${wl}'
# ancient GNU ld didn't support --whole-archive et. al.
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
egrep 'no-whole-archive' > /dev/null; then
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
else
whole_archive_flag_spec=
fi
else
with_gnu_ld=no
wlarc=
# A generic and very simple default shared library creation
# command for GNU C++ for the case where it uses the native
# linker, instead of GNU ld. If possible, this setting should
# overridden to take advantage of the native linker features on
# the platform it is being used on.
archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
fi
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
else
with_gcc=no
with_gnu_ld=no
wlarc=
fi
echo "ltcf-cxx: with_gcc=$with_gcc ; with_gnu_ld=$with_gnu_ld"
# PORTME: fill in a description of your system's C++ link characteristics
case $host_os in
aix3*)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
aix4* | aix5*)
archive_cmds=''
hardcode_direct=yes
hardcode_libdir_separator=':'
link_all_deplibs=yes
# When large executables or shared objects are built, AIX ld can
# have problems creating the table of contents. If linking a library
# or program results in "error TOC overflow" add -mminimal-toc to
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
if test "$with_gcc" = yes; then
case $host_os in aix4.[012]|aix4.[012].*)
# We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+
collect2name=`${CC} -print-prog-name=collect2`
if test -f "$collect2name" && \
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
hardcode_direct=yes
else
# We have old collect2
hardcode_direct=unsupported
# It fails to find uninstalled libraries when the uninstalled
# path is not listed in the libpath. Setting hardcode_minus_L
# to unsupported forces relinking
hardcode_minus_L=yes
hardcode_libdir_flag_spec='-L$libdir'
hardcode_libdir_separator=
fi
esac
shared_flag='-shared'
else
# not using gcc
if test "$host_cpu" = ia64; then
shared_flag='${wl}-G'
else
shared_flag='${wl}-bM:SRE'
fi
fi
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
exp_sym_flag='-Bexport'
no_entry_flag=""
else
# KDE requires run time linking. Make it the default.
aix_use_runtimelinking=yes
exp_sym_flag='-bexport'
no_entry_flag='-bnoentry'
fi
# Let the compiler handle the export list.
always_export_symbols=no
if test "$aix_use_runtimelinking" = yes; then
allow_undefined_flag=' ${wl}-berok'
# The following three lines along with hardcode_into_libs=yes put the correct path into libraries.
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir${libdir:+:}/usr/lib:/lib'
archive_cmds='$CC '"$shared_flag"' $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-G '"$hardcode_libdir_flag_spec"' -o $lib'
archive_expsym_cmds='$CC '"$shared_flag"' $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-G '"$hardcode_libdir_flag_spec"' ${wl}'"$exp_sym_flag"':$export_symbols -o $lib'
else
if test "$host_cpu" = ia64; then
hardcode_libdir_flag_spec='${wl}-R $libdir${libdir:+:}/usr/lib:/lib'
allow_undefined_flag="-z nodefs"
archive_cmds='$CC '"$shared_flag"' $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags '"$hardcode_libdir_flag_spec"' -o $lib'
archive_expsym_cmds='$CC '"$shared_flag"' $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags '"$hardcode_libdir_flag_spec"' ${wl}'"$exp_sym_flag"':$export_symbols -o $lib'
else
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
# Warning - without using the other run time loading flags, -berok will
# link without error, but may produce a broken library.
no_undefined_flag='${wl}-bnoerok'
allow_undefined_flag='${wl}-berok"
# -bexpall does not export symbols beginning with underscore (_)
always_export_symbols=yes
# Exported symbols can be pulled into shared objects from archives
whole_archive_flag_spec=' '
build_libtool_need_lc=yes
# This is similar to how AIX traditionally builds it's shared libraries.
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
fi
fi
;;
chorus*)
case $cc_basename in
*)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
esac
;;
dgux*)
case $cc_basename in
ec++)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
ghcx)
# Green Hills C++ Compiler
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
*)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
esac
;;
freebsd*)
# FreeBSD uses GNU C++ and GNU ld
skip_need_lc_check=yes
remove_lgcc=yes
;;
hpux*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
hardcode_minus_L=yes # Not in the search PATH, but as the default
# location of the library.
export_dynamic_flag_spec='${wl}-E'
case $cc_basename in
CC)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
aCC)
case $host_os in
hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;;
esac
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
#
# There doesn't appear to be a way to prevent this compiler from
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
output_verbose_link_cmds='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
;;
*)
if test "$with_gcc" = yes && test "$with_gnu_ld" = no ; then
# MM: for HP-UX and g++ -fPIC is needed to link pic objects together
case $host_os in
hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
*) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;;
esac
output_verbose_link_cmds='$CC -shared -fPIC $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
remove_lgcc=yes
fi
if test "$with_gcc" = no ; then
# FIXME: insert proper C++ library support
ld_shlibs=no
fi
;;
esac
;;
irix5* | irix6*)
case $cc_basename in
CC)
# SGI C++
archive_cmds='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
# Archives containing C++ object files must be created using
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
# necessary to make sure instantiated templates are included
# in the archive.
old_archive_cmds='$CC -ar -WR,-u -o $oldlib $oldobjs'
;;
*)
if test "$with_gcc" = yes; then
if test "$with_gnu_ld" = no; then
archive_cmds='$CC -D_LANGUAGE_C_CPLUS_PLUS -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
else
archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
fi
fi
;;
esac
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
link_all_deplibs=yes
;;
linux*)
case $cc_basename in
KCC)
# Kuck and Associates, Inc. (KAI) C++ Compiler
# KCC will only create a shared library if the output file
# ends with ".so" (or ".sl" for HP-UX), so rename the library
# to its proper name (with version) after linking.
archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $libobjs $deplibs $compiler_flags --soname $soname -o \$templib; test \$templib = $lib || mv \$templib $lib'
archive_expsym_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $libobjs $deplibs $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; test \$templib = $lib || mv \$templib $lib'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
#
# There doesn't appear to be a way to prevent this compiler from
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
output_verbose_link_cmds='echo "go to hell"'
skip_need_lc_check=yes
hardcode_libdir_flag_spec='${wl}--rpath,$libdir'
export_dynamic_flag_spec='${wl}--export-dynamic'
# Archives containing C++ object files must be created using
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
# We add also $compiler_flags, to evetually add any --thread_safe or
# --exceptions flags (which is also tested when building an .a
# archive.
old_archive_cmds='$CC -Bstatic $compiler_flags -o $oldlib $oldobjs'
;;
cxx)
# Compaq C++
archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
runpath_var=LD_RUN_PATH
hardcode_libdir_flag_spec='-rpath $libdir'
hardcode_libdir_separator=:
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
#
# There doesn't appear to be a way to prevent this compiler from
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
output_verbose_link_cmds='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
;;
insure)
if test "$with_gcc" = yes; then
# Insure++ together with gcc probably means also GNU ld
# only -whole-archive isn't supported
whole_archive_flag_spec=""
# and we can't use -nostdlib, because bloody insure has no way to
# output the linkline (-Zvm isn't working as documented), so we don't
# know the depending libs. So we hope, insure gets it right anyway.
archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
runpath_var=LD_RUN_PATH
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
export_dynamic_flag_spec='${wl}--export-dynamic'
output_verbose_link_cmds=""
fi
esac
;;
lynxos*)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
m88k*)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
mvs*)
case $cc_basename in
cxx)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
*)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
esac
;;
netbsd*)
if test "$with_gcc" = no || test "$with_gnu_ld" = no; then
# This should only be triggered for NetBSD/a.out
# Add in C++ constructor/destructor support
if test -f /usr/pkg/lib/c++rt0/c++rt0.o.PIC; then
cppopts="/usr/pkg/lib/c++rt0/c++rt0.o.PIC"
elif test -f /usr/lib/c++rt0.o; then
cppopts="/usr/lib/c++rt0.o"
fi
archive_cmds='ld -Bshareable -o $lib '"$cppopts"' $libobjs $deplibs $linkopts'
fi
;;
openbsd*)
if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
# MM: OpenBSD 2.7 uses G++, but not GNU ld
archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
archive_expsym_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
old_archive_cmds="$old_archive_cmds~"'$RANLIB $oldlib'
hardcode_libdir_flag_spec='${wl}-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
whole_archive_flag_spec='${wl}-Bforcearchive'
remove_lgcc=yes
fi
;;
osf3*)
if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
else
case $cc_basename in
KCC)
# Kuck and Associates, Inc. (KAI) C++ Compiler
# KCC will only create a shared library if the output file
# ends with ".so" (or ".sl" for HP-UX), so rename the library
# to its proper name (with version) after linking.
archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
hardcode_libdir_separator=:
# Archives containing C++ object files must be created using
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
old_archive_cmds='$CC -Bstatic -o $oldlib $oldobjs'
;;
RCC)
# Rational C++ 2.4.1
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
cxx)
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
#
# There doesn't appear to be a way to prevent this compiler from
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
output_verbose_link_cmds='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
;;
*)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
esac
fi
;;
osf4* | osf5*)
if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
allow_undefined_flag=' -Wl,-expect_unresolved -Wl,\*'
no_undefined_flag=' -Wl,-expect_unresolved -Wl,\*'
archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
else
case $cc_basename in
KCC)
# Kuck and Associates, Inc. (KAI) C++ Compiler
# KCC will only create a shared library if the output file
# ends with ".so" (or ".sl" for HP-UX), so rename the library
# to its proper name (with version) after linking.
archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
hardcode_libdir_separator=:
# Archives containing C++ object files must be created using
# the KAI C++ compiler.
old_archive_cmds='$CC -o $oldlib $oldobjs'
;;
RCC)
# Rational C++ 2.4.1
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
cxx)
allow_undefined_flag=' -Wl,-expect_unresolved -Wl,\*'
no_undefined_flag=' -Wl,-expect_unresolved -Wl,\*'
archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -update_registry ${objdir}/so_locations -o $lib'
hardcode_libdir_flag_spec='-rpath $libdir'
hardcode_libdir_separator=:
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
#
# There doesn't appear to be a way to prevent this compiler from
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
output_verbose_link_cmds='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
;;
*)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
esac
fi
;;
psos*)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
sco*)
case $cc_basename in
CC)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
*)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
esac
;;
sunos4*)
case $cc_basename in
CC)
# Sun C++ 4.x
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
lcc)
# Lucid
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
*)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
esac
;;
solaris*)
case $cc_basename in
CC)
# Sun C++ 4.2, 5.x and Centerline C++
no_undefined_flag=' -ztext'
archive_cmds='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_shlibpath_var=no
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
# The C++ compiler is used as linker so we must use $wl
# flag to pass the commands to the underlying system
# linker.
# Supported since Solaris 2.6 (maybe 2.5.1?)
whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
;;
esac
link_all_deplibs=yes
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
#
# There doesn't appear to be a way to prevent this compiler from
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
output_verbose_link_cmds='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
# Archives containing C++ object files must be created using
# "CC -xar", where "CC" is the Sun C++ compiler. This is
# necessary to make sure instantiated templates are included
# in the archive.
old_archive_cmds='$CC -xar -o $oldlib $oldobjs'
;;
gcx)
# Green Hills C++ Compiler
archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
# The C++ compiler must be used to create the archive.
old_archive_cmds='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
;;
*)
# GNU C++ compiler with Solaris linker
if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
if $CC --version | egrep -v '^2\.7' > /dev/null; then
archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
output_verbose_link_cmds="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
else
# g++ 2.7 appears to require `-G' NOT `-shared' on this
# platform.
archive_cmds='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
output_verbose_link_cmds="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
fi
hardcode_libdir_flag_spec='${wl}-R $wl$libdir'
fi
;;
esac
;;
tandem*)
case $cc_basename in
NCC)
# NonStop-UX NCC 3.20
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
*)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
esac
;;
unixware*)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
vxworks*)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
*)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
esac
## Compiler Characteristics: PIC flags, static flags, etc
# We don't use cached values here since only the C compiler
# characteristics should be cached.
ac_cv_prog_cc_pic=
ac_cv_prog_cc_shlib=
ac_cv_prog_cc_wl=
ac_cv_prog_cc_static=
ac_cv_prog_cc_no_builtin=
ac_cv_prog_cc_can_build_shared=$can_build_shared
ac_cv_prog_cc_pic_works=
ac_cv_prog_cc_static_works=
if test "$with_gcc" = yes; then
ac_cv_prog_cc_wl='-Wl,'
ac_cv_prog_cc_static='-static'
case $host_os in
aix*)
# All AIX code is PIC.
if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
lt_cv_prog_cc_static='-Bstatic'
else
lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
fi
;;
amigaos*)
# FIXME: we need at least 68020 code to build shared libraries, but
# adding the `-m68020' flag to GCC prevents building anything better,
# like `-m68040'.
ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
;;
beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
cygwin* | mingw* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
ac_cv_prog_cc_pic='-DDLL_EXPORT'
;;
darwin* | rhapsody*)
# PIC is the default on this platform
# Common symbols not allowed in MH_DYLIB files
lt_cv_prog_cc_pic='-fno-common'
;;
*djgpp*)
# DJGPP does not support shared libraries at all
ac_cv_prog_cc_pic=
;;
sysv4*MP*)
if test -d /usr/nec; then
ac_cv_prog_cc_pic=-Kconform_pic
fi
;;
*)
ac_cv_prog_cc_pic='-fPIC'
;;
esac
else
case $host_os in
aix4* | aix5*)
# All AIX code is PIC.
if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
lt_cv_prog_cc_static='-Bstatic'
else
lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
fi
;;
chorus*)
case $cc_basename in
cxch68)
# Green Hills C++ Compiler
# ac_cv_prog_cc_static="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
;;
esac
;;
dgux*)
case $cc_basename in
ec++)
ac_cv_prog_cc_pic='-KPIC'
;;
ghcx)
# Green Hills C++ Compiler
ac_cv_prog_cc_pic='-pic'
;;
*)
;;
esac
;;
freebsd*)
# FreeBSD uses GNU C++
;;
hpux9* | hpux10* | hpux11*)
case $cc_basename in
CC)
ac_cv_prog_cc_wl='-Wl,'
ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
ac_cv_prog_cc_pic='+Z'
;;
aCC)
ac_cv_prog_cc_wl='-Wl,'
ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
ac_cv_prog_cc_pic='+Z'
;;
*)
;;
esac
;;
irix5* | irix6*)
case $cc_basename in
CC)
ac_cv_prog_cc_wl='-Wl,'
ac_cv_prog_cc_static='-non_shared'
ac_cv_prog_cc_pic='-KPIC'
;;
*)
;;
esac
;;
linux*)
case $cc_basename in
KCC)
# KAI C++ Compiler
ac_cv_prog_cc_wl='--backend -Wl,'
ac_cv_prog_cc_pic='-fPIC'
ac_cv_prog_cc_static='-Bstatic'
;;
cxx)
# Compaq C++
# Make sure the PIC flag is empty. It appears that all Alpha
# Linux and Compaq Tru64 Unix objects are PIC.
ac_cv_prog_cc_pic=
ac_cv_prog_cc_static='-non_shared'
;;
*)
;;
esac
;;
lynxos*)
;;
m88k*)
;;
mvs*)
case $cc_basename in
cxx)
ac_cv_prog_cc_pic='-W c,exportall'
;;
*)
;;
esac
;;
netbsd*)
;;
osf3* | osf4* | osf5*)
case $cc_basename in
KCC)
ac_cv_prog_cc_wl='--backend -Wl,'
;;
RCC)
# Rational C++ 2.4.1
ac_cv_prog_cc_pic='-pic'
;;
cxx)
# Digital/Compaq C++
ac_cv_prog_cc_wl='-Wl,'
# Make sure the PIC flag is empty. It appears that all Alpha
# Linux and Compaq Tru64 Unix objects are PIC.
ac_cv_prog_cc_pic=
ac_cv_prog_cc_static='-non_shared'
;;
*)
;;
esac
;;
psos*)
;;
sco*)
case $cc_basename in
CC)
ac_cv_prog_cc_pic='-fPIC'
;;
*)
;;
esac
;;
solaris*)
case $cc_basename in
CC)
# Sun C++ 4.2, 5.x and Centerline C++
ac_cv_prog_cc_pic='-KPIC'
ac_cv_prog_cc_static='-Bstatic'
ac_cv_prog_cc_wl='-Qoption ld '
;;
gcx)
# Green Hills C++ Compiler
ac_cv_prog_cc_pic='-PIC'
;;
*)
;;
esac
;;
sunos4*)
case $cc_basename in
CC)
# Sun C++ 4.x
ac_cv_prog_cc_pic='-pic'
ac_cv_prog_cc_static='-Bstatic'
;;
lcc)
# Lucid
ac_cv_prog_cc_pic='-pic'
;;
*)
;;
esac
;;
tandem*)
case $cc_basename in
NCC)
# NonStop-UX NCC 3.20
ac_cv_prog_cc_pic='-KPIC'
;;
*)
;;
esac
;;
unixware*)
;;
vxworks*)
;;
*)
ac_cv_prog_cc_can_build_shared=no
;;
esac
fi
case "$host_os" in
# Platforms which do not suport PIC and -DPIC is meaningless
# on them:
*djgpp*)
ac_cv_prog_cc_pic=
;;
*)
ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
;;
esac
# Figure out "hidden" C++ library dependencies from verbose
# compiler output whening linking a shared library.
cat > conftest.$ac_ext <&5; then
# Parse the compiler output and extract the necessary
# objects, libraries and library flags.
# Sentinel used to keep track of whether or not we are before
# the conftest object file.
pre_test_object_deps_done=no
for p in `eval $output_verbose_link_cmds`; do
case $p in
-L* | -R* | -l*)
# Some compilers place space between "-{L,R}" and the path.
# Remove the space.
if test $p = "-L" \
|| test $p = "-R"; then
prev=$p
continue
else
prev=
fi
if test "$pre_test_object_deps_done" = no; then
case $p in
-L* | -R*)
# Internal compiler library paths should come after those
# provided the user. The postdeps already come after the
# user supplied libs so there is no need to process them.
if test -z "$compiler_lib_search_path"; then
compiler_lib_search_path="${prev}${p}"
else
compiler_lib_search_path="${compiler_lib_search_path} ${prev}${p}"
fi
;;
# The "-l" case would never come before the object being
# linked, so don't bother handling this case.
esac
else
add="${prev}${p}"
if test "x$remove_lgcc" = "xyes" ; then
case "$add" in
-lgcc ) add="" ;;
esac
fi
if test -n "$add" ; then
if test -z "$postdeps"; then
postdeps="$add"
else
postdeps="${postdeps} ${add}"
fi
fi
fi
;;
*.$objext)
# This assumes that the test object file only shows up
# once in the compiler output.
if test "$p" = "conftest.$objext"; then
pre_test_object_deps_done=yes
continue
fi
if test "$pre_test_object_deps_done" = no; then
if test -z "$predep_objects"; then
predep_objects="$p"
else
predep_objects="$predep_objects $p"
fi
else
if test -z "$postdep_objects"; then
postdep_objects="$p"
else
postdep_objects="$postdep_objects $p"
fi
fi
;;
*) ;; # Ignore the rest.
esac
done
# Clean up.
rm -f a.out
else
echo "ltcf-cxx.sh: error: problem compiling test program"
fi
$rm -f confest.$objext
if test "x$skip_need_lc_check" = "xyes" ; then
need_lc=no
else
case " $postdeps " in
*" -lc "*) need_lc=no ;;
*) need_lc=yes ;;
esac
fi
ed2k_hash-0.3.3/admin/config.pl 0000644 0001750 0001750 00000014236 07535440724 015247 0 ustar tiago tiago #!/usr/bin/perl
# a script for use by autoconf to make the Makefiles
# from the Makefile.in's
#
# the original autoconf mechanism first splits all substitutions into groups
# of ca. 90, and than invokes sed for _every_ Makefile.in and every group
# (so around 2-3 times per Makefile.in). So this takes forever, as sed
# has to recompile the regexps every time.
#
# this script does better. It changes all Makefile.ins in one process.
# in kdelibs the time for building Makefile went down from 2:59 min to 13 sec!
#
# written by Michael Matz
# adapted by Dirk Mueller
#
# the first part was done by looking at the config.status files generated
# by configure.
#
my $ac_subs=$ARGV[0];
my $ac_sacfiles = $ARGV[1];
my $ac_given_srcdir=$ARGV[2];
my $ac_given_INSTALL=$ARGV[3];
#print "ac_subs=$ac_subs\n";
#print "ac_sacfiles=$ac_sacfiles\n";
#print "ac_given_srcdir=$ac_given_srcdir\n";
#print "ac_given_INSTALL=$ac_given_INSTALL\n";
my ($srcdir, $top_srcdir);
my $INSTALL;
my $bad_perl = ($] < 5.005);
open(CF, "< $ac_subs") || die "can't open $ac_subs: $!";
my @subs = ;
close(CF);
chomp @subs;
@comp_match=();
@comp_subs=();
if ($bad_perl) {
print "Using perl older than version 5.005\n";
foreach my $pat (@subs) {
if ( ($pat =~ /s%([^%]*)%([^%]*)%g/ )
|| ($pat =~ m%/([^/]*)/([^/]*)/g% )
|| ($pat =~ /s%([^%]*)%([^%]*)%;t/ )
|| ($pat =~ m%/([^/]*)/([^/]*)/;t% )
|| ($pat =~ /s,([^,]*),(.*),;t/)
) {
# form : s%bla%blubb%g
# or s%bla%blubb%;t t (autoconf > 2.13 and < 2.52 ?)
# or s,bla,blubb,;t t (autoconf 2.52)
my $srch = $1;
my $repl = $2;
$repl =~ s/\\(.)/$1/g;
push @comp_subs, make_closure($srch, $repl);
} elsif ( ($pat =~ /%([^%]*)%d/ )
|| ($pat =~ m%/([^/]*)/d% )
) {
push @comp_subs, make_closure($1, "");
} else {
die "Uhh. Malformed pattern in $ac_subs ($pat)"
unless ( $pat =~ /^\s*$/ ); # ignore white lines
}
}
} else {
foreach my $pat (@subs) {
if ( ($pat =~ /s%([^%]*)%([^%]*)%g/ ) ||
($pat =~ /s%([^%]*)%([^%]*)%;t/ ) ||
($pat =~ /s,([^,]*),(.*),;t/) ) {
# form : s%bla%blubb%g
# or s%bla%blubb%;t t (autoconf > 2.13 and < 2.52 ?)
# or s,bla,blubb,;t t (autoconf 2.52)
my $srch = $1;
my $repl = $2;
push @comp_match, eval "qr/\Q$srch\E/"; # compile match pattern
$repl =~ s/\\(.)/$1/g;
push @comp_subs, $repl;
} elsif ( ($pat =~ /%([^%]*)%d/ )
|| ($pat =~ m%/([^/]*)/d% )
) {
push @comp_match, eval "qr/\Q$1\E/";
push @comp_subs, "";
} else {
die "Uhh. Malformed pattern in $ac_cs_root.subs ($pat)"
unless ( $pat =~ /^\s*$/ ); # ignore white lines
}
}
}
undef @subs;
# read the list of files to be patched, form:
# ./Makefile arts/Makefile arts/examples/Makefile arts/flow/Makefile
open(CF, "< $ac_sacfiles") || die "can't open $ac_sacfiles: $!";
my @ac_files = ;
close(CF);
chomp @ac_files;
my $ac_file;
foreach $ac_file (@ac_files) {
next if $ac_file =~ /\.\./;
next if $ac_file =~ /^\s*$/;
my $ac_file_in;
my ($ac_dir, $ac_dots, $ac_dir_suffix);
if ($ac_file =~ /.*:.*/ ) {
($ac_file_in = $ac_file) =~ s%[^:]*:%%;
$ac_file =~ s%:.*%%;
} else {
$ac_file_in = $ac_file.".in";
}
# Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
# Remove last slash and all that follows it. Not all systems have dirname.
($ac_dir = $ac_file) =~ s%/[^/][^/]*$%%;
if ( ($ac_dir ne $ac_file) && ($ac_dir ne ".")) {
# The file is in a subdirectory.
if (! -d "$ac_dir") { mkdir "$ac_dir", 0777; }
($ac_dir_suffix = $ac_dir) =~ s%^./%%;
$ac_dir_suffix="/".$ac_dir_suffix;
# A "../" for each directory in $ac_dir_suffix.
($ac_dots = $ac_dir_suffix) =~ s%/[^/]*%../%g;
} else {
$ac_dir_suffix="";
$ac_dots="";
}
if ($ac_given_srcdir eq ".") {
$srcdir=".";
if ($ac_dots) {
( $top_srcdir = $ac_dots) =~ s%/$%%;
} else { $top_srcdir="."; }
} elsif ($ac_given_srcdir =~ m%^/%) {
$srcdir=$ac_given_srcdir.$ac_dir_suffix;
$top_srcdir = $ac_given_srcdir;
} else {
$srcdir = $ac_dots.$ac_given_srcdir.$ac_dir_suffix;
$top_srcdir = $ac_dots.$ac_given_srcdir;
}
if ($ac_given_INSTALL) {
if ($ac_given_INSTALL =~ m%^/% ) {
$INSTALL = $ac_given_INSTALL;
} else {
$INSTALL = $ac_dots.$ac_given_INSTALL;
}
}
print "fast creating $ac_file\n";
unlink $ac_file;
my $ac_comsub="";
my $fname=$ac_file_in;
$fname =~ s%.*/%%;
my $configure_input="Generated automatically from $fname by config.pl.";
if ($ac_file =~ /.*[Mm]akefile.*/) {
$ac_comsub="# ".$configure_input."\n"; # for the first line in $ac_file
}
my $ac_file_inputs;
($ac_file_inputs = $ac_file_in) =~ s%^%$ac_given_srcdir/%;
$ac_file_inputs =~ s%:% $ac_given_srcdir/%g;
patch_file($ac_file, $ac_file_inputs, $ac_comsub);
}
sub patch_file {
my ($outf, $infiles, $firstline) = @_;
my $filedata;
my @infiles=split(' ', $infiles);
my $i=0;
if ($firstline) {
$filedata = $firstline;
}
foreach my $name (@infiles) {
if (open(CF, "< $name")) {
while () {
$filedata .= $_;
}
close(CF);
} else {
print STDERR "can't open $name: $!"."\n";
}
}
$filedata =~ s%\@configure_input\@%$configure_input%g;
$filedata =~ s%\@srcdir\@%$srcdir%g;
$filedata =~ s%\@top_srcdir\@%$top_srcdir%g;
$filedata =~ s%\@INSTALL\@%$INSTALL%g;
if ($bad_perl) {
while ($i <= $#comp_subs) {
my $ref = $comp_subs[$i];
&$ref(\$filedata);
$i++;
}
} else {
while ($i <= $#comp_match) {
$filedata =~ s/$comp_match[$i]/$comp_subs[$i]/g;
$i++;
}
}
open(CF, "> $outf") || die "can't create $outf: $!";
print CF $filedata;
close(CF);
}
sub make_closure {
my ($pat, $sub) = @_;
$pat =~ s/\@/\\@/g; # @bla@ -> \@bla\@
$pat =~ s/\$/\\\$/g; # $bla -> \$bla
$sub =~ s/\@/\\@/g;
$sub =~ s/\$/\\\$/g;
my $ret = eval "return sub { my \$ref=shift; \$\$ref =~ s%$pat%$sub%g; }";
if ($@) {
print "can't create CODE: $@\n";
}
return $ret;
}
ed2k_hash-0.3.3/admin/missing 0000755 0001750 0001750 00000021231 07535440723 015034 0 ustar tiago tiago #! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard , 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
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
-h|--h|--he|--hel|--help)
echo "\
$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]"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing 0.3 - GNU automake"
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
aclocal)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. 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 missing on your system. 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 missing on your system. 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 missing on your system. 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
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. 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 missing on your system. 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 missing on your system. 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)
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
# We have makeinfo, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. 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
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar ${1+"$@"} && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar ${1+"$@"} && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" ${1+"$@"} && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" ${1+"$@"} && 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 you do not seem to have it handy on your
system. 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 prerequirements 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
ed2k_hash-0.3.3/admin/libtool.m4.in 0000644 0001750 0001750 00000072200 07535440717 015755 0 ustar tiago tiago ## libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
## Copyright 1996, 1997, 1998, 1999, 2000, 2001
## Free Software Foundation, Inc.
## Originally by Gordon Matzigkeit , 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 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##
## 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.
# serial 46 AC_PROG_LIBTOOL
AC_DEFUN([AC_PROG_LIBTOOL],
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[AC_LIBTOOL_CXX],
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
])])
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
[AC_LIBTOOL_GCJ],
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
[AC_LIBTOOL_GCJ],
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
[AC_LIBTOOL_GCJ],
[ifdef([AC_PROG_GCJ],
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
])])
ifdef([A][M_PROG_GCJ],
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
])])
ifdef([LT_AC_PROG_GCJ],
[define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
])])])])])])
AC_DEFUN([_AC_PROG_LIBTOOL],
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
# Save cache, so that ltconfig can load it
AC_CACHE_SAVE
# Actually configure libtool. ac_aux_dir is where install-sh is found.
AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
|| AC_MSG_ERROR([libtool configure failed])
# Reload cache, that may have been modified by ltconfig
AC_CACHE_LOAD
# This can be used to rebuild libtool when needed
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
AC_SUBST(LIBTOOL)dnl
# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log
])
AC_DEFUN([AC_LIBTOOL_SETUP],
[AC_PREREQ(2.13)dnl
AC_REQUIRE([AC_ENABLE_SHARED])dnl
AC_REQUIRE([AC_ENABLE_STATIC])dnl
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_LD])dnl
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
AC_REQUIRE([AC_PROG_NM])dnl
AC_REQUIRE([AC_PROG_LN_S])dnl
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
AC_REQUIRE([AC_OBJEXT])dnl
AC_REQUIRE([AC_EXEEXT])dnl
dnl
# Only perform the check for file, if the check method requires it
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
AC_PATH_MAGIC
fi
;;
esac
AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_CHECK_TOOL(STRIP, strip, :)
# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
[libtool_flags="$libtool_flags --enable-dlopen"])
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
[libtool_flags="$libtool_flags --enable-win32-dll"])
AC_ARG_ENABLE(libtool-lock,
[ --disable-libtool-lock avoid locking (might break parallel builds)])
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
AC_ARG_WITH(pic,
[ --with-pic try to use only PIC/non-PIC objects [default=use both]],
pic_mode="$withval", pic_mode=default)
test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case $host in
*-*-irix6*)
# Find out which ABI we are using.
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
;;
*N32*)
LD="${LD-ld} -n32"
;;
*64-bit*)
LD="${LD-ld} -64"
;;
esac
fi
rm -rf conftest*
;;
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
[AC_LANG_SAVE
AC_LANG_C
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
AC_LANG_RESTORE])
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
CFLAGS="$SAVE_CFLAGS"
fi
;;
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
# recent cygwin and mingw systems supply a stub DllMain which the user
# can override, but on older systems we have to supply one
AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
[AC_TRY_LINK([],
[extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
DllMain (0, 0, 0);],
[lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
case $host/$CC in
*-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
# old mingw systems require "-dll" to link a DLL, while more recent ones
# require "-mdll"
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -mdll"
AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
[AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
CFLAGS="$SAVE_CFLAGS" ;;
*-*-cygwin* | *-*-pw32*)
# cygwin systems need to pass --dll to the linker, and not link
# crt.o which will require a WinMain@16 definition.
lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
esac
;;
])
esac
])
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
# AC_ENABLE_SHARED - implement the --enable-shared flag
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
AC_DEFUN([AC_ENABLE_SHARED],
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(shared,
changequote(<<, >>)dnl
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
case $enableval in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
for pkg in $enableval; do
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
IFS="$ac_save_ifs"
;;
esac],
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
])
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_SHARED(no)])
# AC_ENABLE_STATIC - implement the --enable-static flag
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
AC_DEFUN([AC_ENABLE_STATIC],
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(static,
changequote(<<, >>)dnl
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
case $enableval in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
for pkg in $enableval; do
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
IFS="$ac_save_ifs"
;;
esac],
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
])
# AC_DISABLE_STATIC - set the default static flag to --disable-static
AC_DEFUN([AC_DISABLE_STATIC],
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_STATIC(no)])
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(fast-install,
changequote(<<, >>)dnl
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
case $enableval in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
for pkg in $enableval; do
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
IFS="$ac_save_ifs"
;;
esac],
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
])
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_FAST_INSTALL(no)])
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
# Where MODE is either `yes' or `no'. If omitted, it defaults to
# `both'.
AC_DEFUN([AC_LIBTOOL_PICMODE],
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
pic_mode=ifelse($#,1,$1,default)])
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
AC_DEFUN([AC_PATH_TOOL_PREFIX],
[AC_MSG_CHECKING([for $1])
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
[case $MAGIC_CMD in
/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
?:/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
;;
*)
ac_save_MAGIC_CMD="$MAGIC_CMD"
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
dnl $ac_dummy forces splitting on constant user-supplied paths.
dnl POSIX.2 word splitting is done only on the output of word expansions,
dnl not every word. This closes a longstanding sh security hole.
ac_dummy="ifelse([$2], , $PATH, [$2])"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$1; then
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
egrep "$file_magic_regex" > /dev/null; then
:
else
cat <&2
*** Warning: the command libtool uses to detect shared libraries,
*** $file_magic_cmd, produces output that libtool cannot recognize.
*** The result is that libtool may fail to recognize shared libraries
*** as such. This will affect the creation of libtool libraries that
*** depend on shared libraries, but programs linked with such libtool
*** libraries will work regardless of this problem. Nevertheless, you
*** may want to report the problem to your system manager and/or to
*** bug-libtool@gnu.org
EOF
fi ;;
esac
fi
break
fi
done
IFS="$ac_save_ifs"
MAGIC_CMD="$ac_save_MAGIC_CMD"
;;
esac])
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
AC_MSG_RESULT($MAGIC_CMD)
else
AC_MSG_RESULT(no)
fi
])
# AC_PATH_MAGIC - find a file program which can recognise a shared library
AC_DEFUN([AC_PATH_MAGIC],
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
else
MAGIC_CMD=:
fi
fi
])
# AC_PROG_LD - find the path to the GNU or non-GNU linker
AC_DEFUN([AC_PROG_LD],
[AC_ARG_WITH(gnu-ld,
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
AC_MSG_CHECKING([for ld used by GCC])
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
esac
case $ac_prog in
# Accept absolute paths.
[[\\/]* | [A-Za-z]:[\\/]*)]
re_direlt=['/[^/][^/]*/\.\./']
# Canonicalize the path of ld
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
done
test -z "$LD" && LD="$ac_prog"
;;
"")
# If it fails, then pretend we aren't using GCC.
ac_prog=ld
;;
*)
# If it is relative, then search for the first ld in PATH.
with_gnu_ld=unknown
;;
esac
elif test "$with_gnu_ld" = yes; then
AC_MSG_CHECKING([for GNU ld])
else
AC_MSG_CHECKING([for non-GNU ld])
fi
AC_CACHE_VAL(lt_cv_path_LD,
[if test -z "$LD"; then
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
lt_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
test "$with_gnu_ld" != no && break
else
test "$with_gnu_ld" != yes && break
fi
fi
done
IFS="$ac_save_ifs"
else
lt_cv_path_LD="$LD" # Let the user override the test with a path.
fi])
LD="$lt_cv_path_LD"
if test -n "$LD"; then
AC_MSG_RESULT($LD)
else
AC_MSG_RESULT(no)
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
AC_PROG_LD_GNU
])
AC_DEFUN([AC_PROG_LD_GNU],
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 &5; then
lt_cv_prog_gnu_ld=yes
else
lt_cv_prog_gnu_ld=no
fi])
with_gnu_ld=$lt_cv_prog_gnu_ld
])
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
# -- PORTME Some linkers may need a different reload flag.
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
[lt_cv_ld_reload_flag='-r'])
reload_flag=$lt_cv_ld_reload_flag
test -n "$reload_flag" && reload_flag=" $reload_flag"
])
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
# -- PORTME fill in with the dynamic library characteristics
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
[AC_CACHE_CHECK([how to recognise dependant libraries],
lt_cv_deplibs_check_method,
[lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
lt_cv_deplibs_check_method='unknown'
# Need to set the preceding variable on all platforms that support
# interlibrary dependencies.
# 'none' -- dependencies not supported.
# `unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
# 'test_compile' -- check by making test program.
# 'file_magic [regex]' -- check by looking for files in library path
# which responds to the $file_magic_cmd with a given egrep regex.
# If you have `file' or equivalent on your system and you're not sure
# whether `pass_all' will *always* work, you probably want this one.
case $host_os in
aix*)
lt_cv_deplibs_check_method=pass_all
;;
beos*)
lt_cv_deplibs_check_method=pass_all
;;
bsdi4*)
lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
lt_cv_file_magic_cmd='/usr/bin/file -L'
lt_cv_file_magic_test_file=/shlib/libc.so
;;
cygwin* | mingw* |pw32*)
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
lt_cv_file_magic_cmd='$OBJDUMP -f'
;;
darwin* | rhapsody*)
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
lt_cv_file_magic_cmd='/usr/bin/file -L'
case "$host_os" in
rhapsody* | darwin1.[012])
lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
;;
*) # Darwin 1.3 on
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
;;
esac
;;
freebsd* )
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up.
lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;;
esac
else
lt_cv_deplibs_check_method=pass_all
fi
;;
gnu*)
lt_cv_deplibs_check_method=pass_all
;;
hpux10.20*|hpux11*)
lt_cv_deplibs_check_method=['file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/libc.sl
;;
irix5* | irix6*)
case $host_os in
irix5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
;;
*)
case $LD in
*-32|*"-32 ") libmagic=32-bit;;
*-n32|*"-n32 ") libmagic=N32;;
*-64|*"-64 ") libmagic=64-bit;;
*) libmagic=never-match;;
esac
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
;;
esac
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
lt_cv_deplibs_check_method=pass_all
;;
# This must be Linux ELF.
linux-gnu*)
case $host_cpu in
alpha* | i*86 | powerpc* | sparc* | ia64* | s390* | m68k* | arm* | mips* | hppa* | sh* )
lt_cv_deplibs_check_method=pass_all ;;
*)
# glibc up to 2.1.1 does not perform some relocations on ARM
lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
esac
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
[lt_cv_deplibs_check_method='file_magic NetBSD/[a-z0-9]* demand paged shared library']
else
[lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object']
fi
lt_cv_file_magic_cmd='/usr/bin/file -L'
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
;;
openbsd* )
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case "$host_cpu" in
i*86 )
changequote(,)dnl
lt_cv_deplibs_check_method='file_magic OpenBSD/i[3-9]86 demand paged shared library'
changequote([, ])dnl
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;;
esac
else
lt_cv_deplibs_check_method=pass_all
fi
;;
newsos6)
[lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/libnls.so
;;
osf3* | osf4* | osf5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
lt_cv_file_magic_test_file=/shlib/libc.so
lt_cv_deplibs_check_method=pass_all
;;
sco3.2v5*)
lt_cv_deplibs_check_method=pass_all
;;
solaris*)
lt_cv_deplibs_check_method=pass_all
lt_cv_file_magic_test_file=/lib/libc.so
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
case $host_vendor in
ncr)
lt_cv_deplibs_check_method=pass_all
;;
motorola)
lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]']
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
;;
esac
;;
esac
])
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
])
# AC_PROG_NM - find the path to a BSD-compatible name lister
AC_DEFUN([AC_PROG_NM],
[AC_MSG_CHECKING([for BSD-compatible nm])
AC_CACHE_VAL(lt_cv_path_NM,
[if test -n "$NM"; then
# Let the user override the test.
lt_cv_path_NM="$NM"
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
test -z "$ac_dir" && ac_dir=.
tmp_nm=$ac_dir/${ac_tool_prefix}nm
if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
# Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
# Tru64's nm complains that /dev/null is an invalid object file
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
lt_cv_path_NM="$tmp_nm -B"
break
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
lt_cv_path_NM="$tmp_nm -p"
break
else
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
continue # so that we can try to find one that supports BSD flags
fi
fi
done
IFS="$ac_save_ifs"
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
fi])
NM="$lt_cv_path_NM"
AC_MSG_RESULT([$NM])
])
# AC_CHECK_LIBM - check for math library
AC_DEFUN([AC_CHECK_LIBM],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
LIBM=
case $host in
*-*-beos* | *-*-cygwin* | *-*-pw32*)
# These system don't have libm
;;
*-ncr-sysv4.3*)
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
;;
*)
AC_CHECK_LIB(m, main, LIBM="-lm")
;;
esac
])
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
# the libltdl convenience library and INCLTDL to the include flags for
# the libltdl header and adds --enable-ltdl-convenience to the
# configure arguments. Note that LIBLTDL and INCLTDL are not
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
# with '${top_builddir}/' and INCLTDL will be prefixed with
# '${top_srcdir}/' (note the single quotes!). If your package is not
# flat and you're not using automake, define top_builddir and
# top_srcdir appropriately in the Makefiles.
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
case $enable_ltdl_convenience in
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
"") enable_ltdl_convenience=yes
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
esac
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
])
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
# the libltdl installable library and INCLTDL to the include flags for
# the libltdl header and adds --enable-ltdl-install to the configure
# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
# with '${top_srcdir}/' (note the single quotes!). If your package is
# not flat and you're not using automake, define top_builddir and
# top_srcdir appropriately in the Makefiles.
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_CHECK_LIB(ltdl, main,
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
[if test x"$enable_ltdl_install" = xno; then
AC_MSG_WARN([libltdl not installed, but installation disabled])
else
enable_ltdl_install=yes
fi
])
if test x"$enable_ltdl_install" = x"yes"; then
ac_configure_args="$ac_configure_args --enable-ltdl-install"
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
else
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
LIBLTDL="-lltdl"
INCLTDL=
fi
])
# If this macro is not defined by Autoconf, define it here.
ifdef([AC_PROVIDE_IFELSE],
[],
[define([AC_PROVIDE_IFELSE],
[ifdef([AC_PROVIDE_$1],
[$2], [$3])])])
# AC_LIBTOOL_CXX - enable support for C++ libraries
AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
AC_DEFUN([_AC_LIBTOOL_CXX],
[AC_REQUIRE([AC_PROG_CXX])
AC_REQUIRE([AC_PROG_CXXCPP])
LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
lt_save_CC="$CC"
lt_save_CFLAGS="$CFLAGS"
dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
dnl is set to the C++ compiler.
AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
deplibs_check_method="$deplibs_check_method" \
file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
--build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
|| AC_MSG_ERROR([libtool tag configuration failed])
CC="$lt_save_CC"
CFLAGS="$lt_save_CFLAGS"
# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log
])
# AC_LIBTOOL_GCJ - enable support for GCJ libraries
AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
AC_DEFUN([_AC_LIBTOOL_GCJ],
[AC_REQUIRE([AC_PROG_LIBTOOL])
AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
lt_save_CC="$CC"
lt_save_CFLAGS="$CFLAGS"
dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
dnl is set to the C++ compiler.
AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
deplibs_check_method="$deplibs_check_method" \
file_magic_cmd="$file_magic_cmd" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
--build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
|| AC_MSG_ERROR([libtool tag configuration failed])
CC="$lt_save_CC"
CFLAGS="$lt_save_CFLAGS"
# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log
])
dnl old names
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
dnl This is just to silence aclocal about the macro not being used
ifelse([AC_DISABLE_FAST_INSTALL])dnl
AC_DEFUN([LT_AC_PROG_GCJ],
[AC_CHECK_TOOL(GCJ, gcj, no)
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
AC_SUBST(GCJFLAGS)
])
ed2k_hash-0.3.3/admin/depcomp 0000755 0001750 0001750 00000024656 07535440720 015025 0 ustar tiago tiago #! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
# Copyright 1999, 2000 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.
# Originally written by Alexandre Oliva .
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
# `libtool' can also be set to `yes' or `no'.
depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
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!
if "$@" -MT "$object" -MF "$tmpdepfile" -MD -MP; then :
else
stat=$?
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
if "$@" -Wp,"$gccflag$tmpdepfile"; then :
else
stat=$?
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).
tr ' ' '
' < "$tmpdepfile" | sed 's/^[^\.]*\.o://' | tr '
' ' ' >> $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"
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.
tmpdepfile=`echo "$object" | sed 's/\(.*\)\..*$/\1.u/'`
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
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).
tr ' ' '
' < "$tmpdepfile" | sed 's/^[^\.]*\.o://' | tr '
' ' ' >> $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"
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"
;;
#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 proprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
test -z "$dashmflag" && dashmflag=-M
( IFS=" "
case " $* " in
*" --mode=compile "*) # this is libtool, let us make it quiet
for arg
do # cycle over the arguments
case "$arg" in
"--mode=compile")
# insert --quiet before "--mode=compile"
set fnord "$@" --quiet
shift # fnord
;;
esac
set fnord "$@" "$arg"
shift # fnord
shift # "$arg"
done
;;
esac
"$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
) &
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
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)
# 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;;
-*)
;;
*)
set fnord "$@" "$arg"; shift;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
) &
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tail +3 "$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 proprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
( IFS=" "
case " $* " in
*" --mode=compile "*)
for arg
do # cycle over the arguments
case $arg in
"--mode=compile")
# insert --quiet before "--mode=compile"
set fnord "$@" --quiet
shift # fnord
;;
esac
set fnord "$@" "$arg"
shift # fnord
shift # "$arg"
done
;;
esac
"$@" -E |
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
) &
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
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 proprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
( IFS=" "
case " $* " in
*" --mode=compile "*)
for arg
do # cycle over the arguments
case $arg in
"--mode=compile")
# insert --quiet before "--mode=compile"
set fnord "$@" --quiet
shift # fnord
;;
esac
set fnord "$@" "$arg"
shift # fnord
shift # "$arg"
done
;;
esac
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
) &
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
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
ed2k_hash-0.3.3/admin/acinclude.m4.in 0000644 0001750 0001750 00000364637 07535440722 016256 0 ustar tiago tiago ## -*- autoconf -*-
dnl This file is part of the KDE libraries/packages
dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
dnl This file is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Library General Public
dnl License as published by the Free Software Foundation; either
dnl version 2 of the License, or (at your option) any later version.
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Library General Public License for more details.
dnl You should have received a copy of the GNU Library General Public License
dnl along with this library; see the file COPYING.LIB. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
dnl IMPORTANT NOTE:
dnl Please do not modify this file unless you expect your modifications to be
dnl carried into every other module in the repository. If you decide that you
dnl really want to modify it, contact coolo@kde.org mentioning that you have
dnl and that the modified file should be committed to every module.
dnl
dnl Single-module modifications are best placed in configure.in for kdelibs
dnl and kdebase or configure.in.in if present.
dnl ------------------------------------------------------------------------
dnl Forward compatibility macros (make autoconf 2.13 look like 2.50),
dnl thanks to Raja R Harinath.
dnl ------------------------------------------------------------------------
dnl
ifdef([_AC_PATH_X_XMKMF],[],
[AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])])
ifdef([AC_OUTPUT_SUBDIRS],[],
[AC_DEFUN([AC_OUTPUT_SUBDIRS],[subdirs=$1; _AC_OUTPUT_SUBDIRS])])
# KDE_PATH_X_DIRECT
dnl Internal subroutine of AC_PATH_X.
dnl Set ac_x_includes and/or ac_x_libraries.
AC_DEFUN(KDE_PATH_X_DIRECT,
[if test "$ac_x_includes" = NO; then
# Guess where to find include files, by looking for this one X11 .h file.
test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
# First, try using that file with no special directory specified.
AC_TRY_CPP([#include <$x_direct_test_include>],
[# We can compile using X headers with no special include directory.
ac_x_includes=],
[# Look for the header file in a standard set of common directories.
# Check X11 before X11Rn because it is often a symlink to the current release.
for ac_dir in \
/usr/X11/include \
/usr/X11R6/include \
/usr/X11R5/include \
/usr/X11R4/include \
\
/usr/include/X11 \
/usr/include/X11R6 \
/usr/include/X11R5 \
/usr/include/X11R4 \
\
/usr/local/X11/include \
/usr/local/X11R6/include \
/usr/local/X11R5/include \
/usr/local/X11R4/include \
\
/usr/local/include/X11 \
/usr/local/include/X11R6 \
/usr/local/include/X11R5 \
/usr/local/include/X11R4 \
\
/usr/X386/include \
/usr/x386/include \
/usr/XFree86/include/X11 \
\
/usr/include \
/usr/local/include \
/usr/unsupported/include \
/usr/athena/include \
/usr/local/x11r5/include \
/usr/lpp/Xamples/include \
\
/usr/openwin/include \
/usr/openwin/share/include \
; \
do
if test -r "$ac_dir/$x_direct_test_include"; then
ac_x_includes=$ac_dir
break
fi
done])
fi # $ac_x_includes = NO
if test "$ac_x_libraries" = NO; then
# Check for the libraries.
test -z "$x_direct_test_library" && x_direct_test_library=Xt
test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
# See if we find them without any special options.
# Don't add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
AC_TRY_LINK(, [${x_direct_test_function}()],
[LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
ac_x_libraries=],
[LIBS="$ac_save_LIBS"
# First see if replacing the include by lib works.
# Check X11 before X11Rn because it is often a symlink to the current release.
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
/usr/X11/lib \
/usr/X11R6/lib \
/usr/X11R5/lib \
/usr/X11R4/lib \
\
/usr/lib/X11 \
/usr/lib/X11R6 \
/usr/lib/X11R5 \
/usr/lib/X11R4 \
\
/usr/local/X11/lib \
/usr/local/X11R6/lib \
/usr/local/X11R5/lib \
/usr/local/X11R4/lib \
\
/usr/local/lib/X11 \
/usr/local/lib/X11R6 \
/usr/local/lib/X11R5 \
/usr/local/lib/X11R4 \
\
/usr/X386/lib \
/usr/x386/lib \
/usr/XFree86/lib/X11 \
\
/usr/lib \
/usr/local/lib \
/usr/unsupported/lib \
/usr/athena/lib \
/usr/local/x11r5/lib \
/usr/lpp/Xamples/lib \
/lib/usr/lib/X11 \
\
/usr/openwin/lib \
/usr/openwin/share/lib \
; \
do
dnl Don't even attempt the hair of trying to link an X program!
for ac_extension in a so sl; do
if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
ac_x_libraries=$ac_dir
break 2
fi
done
done])
fi # $ac_x_libraries = NO
])
dnl ------------------------------------------------------------------------
dnl Find a file (or one of more files in a list of dirs)
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(AC_FIND_FILE,
[
$3=NO
for i in $2;
do
for j in $1;
do
echo "configure: __oline__: $i/$j" >&AC_FD_CC
if test -r "$i/$j"; then
echo "taking that" >&AC_FD_CC
$3=$i
break 2
fi
done
done
])
dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
dnl if-not-found, test-parameter)
AC_DEFUN(KDE_FIND_PATH,
[
AC_MSG_CHECKING([for $1])
if test -n "$$2"; then
kde_cv_path="$$2";
else
kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
AC_CACHE_VAL(kde_cv_path_$kde_cache,
[
kde_cv_path="NONE"
dirs="$3"
kde_save_IFS=$IFS
IFS=':'
for dir in $PATH; do
dirs="$dirs $dir"
done
IFS=$kde_save_IFS
for dir in $dirs; do
if test -x "$dir/$1"; then
if test -n "$5"
then
evalstr="$dir/$1 $5 2>&1 "
if eval $evalstr; then
kde_cv_path="$dir/$1"
break
fi
else
kde_cv_path="$dir/$1"
break
fi
fi
done
eval "kde_cv_path_$kde_cache=$kde_cv_path"
])
eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
fi
if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
AC_MSG_RESULT(not found)
$4
else
AC_MSG_RESULT($kde_cv_path)
$2=$kde_cv_path
fi
])
AC_DEFUN(KDE_MOC_ERROR_MESSAGE,
[
AC_MSG_ERROR([No Qt meta object compiler (moc) found!
Please check whether you installed Qt correctly.
You need to have a running moc binary.
configure tried to run $ac_cv_path_moc and the test didn't
succeed. If configure shouldn't have tried this one, set
the environment variable MOC to the right one before running
configure.
])
])
AC_DEFUN(KDE_UIC_ERROR_MESSAGE,
[
AC_MSG_WARN([No Qt ui compiler (uic) found!
Please check whether you installed Qt correctly.
You need to have a running uic binary.
configure tried to run $ac_cv_path_uic and the test didn't
succeed. If configure shouldn't have tried this one, set
the environment variable UIC to the right one before running
configure.
])
])
dnl ------------------------------------------------------------------------
dnl Find the meta object compiler and the ui compiler in the PATH,
dnl in $QTDIR/bin, and some more usual places
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(AC_PATH_QT_MOC_UIC,
[
qt_bindirs=""
for dir in $kde_qt_dirs; do
qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
done
qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
if test ! "$ac_qt_bindir" = "NO"; then
qt_bindirs="$ac_qt_bindir $qt_bindirs"
fi
KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
if test -z "$UIC_NOT_NEEDED"; then
KDE_FIND_PATH(uic, UIC, [$qt_bindirs], [UIC=""])
if test -z "$UIC" ; then
KDE_UIC_ERROR_MESSAGE
exit 1
fi
else
UIC="echo uic not available: "
fi
AC_SUBST(MOC)
AC_SUBST(UIC)
UIC_TR="i18n"
if test $kde_qtver = 3; then
UIC_TR="tr2i18n"
fi
AC_SUBST(UIC_TR)
])
AC_DEFUN(KDE_1_CHECK_PATHS,
[
KDE_1_CHECK_PATH_HEADERS
KDE_TEST_RPATH=
if test -n "$USE_RPATH"; then
if test -n "$kde_libraries"; then
KDE_TEST_RPATH="-R $kde_libraries"
fi
if test -n "$qt_libraries"; then
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
fi
if test -n "$x_libraries"; then
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
fi
KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
fi
AC_MSG_CHECKING([for KDE libraries installed])
ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
if AC_TRY_EVAL(ac_link) && test -s conftest; then
AC_MSG_RESULT(yes)
else
AC_MSG_ERROR([your system fails at linking a small KDE application!
Check, if your compiler is installed correctly and if you have used the
same compiler to compile Qt and kdelibs as you did use now.
For more details about this problem, look at the end of config.log.])
fi
if eval `KDEDIR= ./conftest 2>&5`; then
kde_result=done
else
kde_result=problems
fi
KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
kde_have_all_paths=yes
KDE_SET_PATHS($kde_result)
])
AC_DEFUN(KDE_SET_PATHS,
[
kde_cv_all_paths="kde_have_all_paths=\"yes\" \
kde_htmldir=\"$kde_htmldir\" \
kde_appsdir=\"$kde_appsdir\" \
kde_icondir=\"$kde_icondir\" \
kde_sounddir=\"$kde_sounddir\" \
kde_datadir=\"$kde_datadir\" \
kde_locale=\"$kde_locale\" \
kde_cgidir=\"$kde_cgidir\" \
kde_confdir=\"$kde_confdir\" \
kde_mimedir=\"$kde_mimedir\" \
kde_toolbardir=\"$kde_toolbardir\" \
kde_wallpaperdir=\"$kde_wallpaperdir\" \
kde_templatesdir=\"$kde_templatesdir\" \
kde_bindir=\"$kde_bindir\" \
kde_servicesdir=\"$kde_servicesdir\" \
kde_servicetypesdir=\"$kde_servicetypesdir\" \
kde_moduledir=\"$kde_moduledir\" \
kde_styledir=\"$kde_styledir\" \
kde_widgetdir=\"$kde_widgetdir\" \
kde_result=$1"
])
AC_DEFUN(KDE_SET_DEFAULT_PATHS,
[
if test "$1" = "default"; then
if test -z "$kde_htmldir"; then
kde_htmldir='\${prefix}/share/doc/HTML'
fi
if test -z "$kde_appsdir"; then
kde_appsdir='\${prefix}/share/applnk'
fi
if test -z "$kde_icondir"; then
kde_icondir='\${prefix}/share/icons'
fi
if test -z "$kde_sounddir"; then
kde_sounddir='\${prefix}/share/sounds'
fi
if test -z "$kde_datadir"; then
kde_datadir='\${prefix}/share/apps'
fi
if test -z "$kde_locale"; then
kde_locale='\${prefix}/share/locale'
fi
if test -z "$kde_cgidir"; then
kde_cgidir='\${exec_prefix}/cgi-bin'
fi
if test -z "$kde_confdir"; then
kde_confdir='\${prefix}/share/config'
fi
if test -z "$kde_mimedir"; then
kde_mimedir='\${prefix}/share/mimelnk'
fi
if test -z "$kde_toolbardir"; then
kde_toolbardir='\${prefix}/share/toolbar'
fi
if test -z "$kde_wallpaperdir"; then
kde_wallpaperdir='\${prefix}/share/wallpapers'
fi
if test -z "$kde_templatesdir"; then
kde_templatesdir='\${prefix}/share/templates'
fi
if test -z "$kde_bindir"; then
kde_bindir='\${exec_prefix}/bin'
fi
if test -z "$kde_servicesdir"; then
kde_servicesdir='\${prefix}/share/services'
fi
if test -z "$kde_servicetypesdir"; then
kde_servicetypesdir='\${prefix}/share/servicetypes'
fi
if test -z "$kde_moduledir"; then
if test "$kde_qtver" = "2"; then
kde_moduledir='\${exec_prefix}/lib/kde2'
else
kde_moduledir='\${exec_prefix}/lib/kde3'
fi
fi
if test -z "$kde_styledir"; then
kde_styledir='\${exec_prefix}/lib/kde3/plugins/styles'
fi
if test -z "$kde_widgetdir"; then
kde_widgetdir='\${exec_prefix}/lib/kde3/plugins/designer'
fi
KDE_SET_PATHS(defaults)
else
if test $kde_qtver = 1; then
AC_MSG_RESULT([compiling])
KDE_1_CHECK_PATHS
else
AC_MSG_ERROR([path checking not yet supported for KDE 2])
fi
fi
])
AC_DEFUN(KDE_CHECK_PATHS_FOR_COMPLETENESS,
[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
test -z "$kde_icondir" || test -z "$kde_sounddir" ||
test -z "$kde_datadir" || test -z "$kde_locale" ||
test -z "$kde_cgidir" || test -z "$kde_confdir" ||
test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
test -z "$kde_styledir" || test -z "kde_widgetdir"
test "x$kde_have_all_paths" != "xyes"; then
kde_have_all_paths=no
fi
])
AC_DEFUN(KDE_MISSING_PROG_ERROR,
[
AC_MSG_ERROR([The important program $1 was not found!
Please check whether you installed KDE correctly.
])
])
AC_DEFUN(KDE_SUBST_PROGRAMS,
[
kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
if test -n "$KDEDIRS"; then
kde_save_IFS=$IFS
IFS=:
for dir in $KDEDIRS; do
kde_default_bindirs="$dir/bin $kde_default_bindirs "
done
IFS=$kde_save_IFS
fi
kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(mcopidl)])
KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(artsc-config)])
KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then
kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
if test "$KDE_XSL_STYLESHEET" = "NO"; then
KDE_XSL_STYLESHEET=""
else
KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
fi
fi
DCOP_DEPENDENCIES='$(DCOPIDL)'
AC_SUBST(DCOPIDL)
AC_SUBST(DCOPIDL2CPP)
AC_SUBST(DCOP_DEPENDENCIES)
AC_SUBST(MCOPIDL)
AC_SUBST(ARTSCCONFIG)
AC_SUBST(KDECONFIG)
AC_SUBST(MEINPROC)
AC_SUBST(KDE_XSL_STYLESHEET)
if test -x "$KDECONFIG"; then # it can be "compiled"
kde_libs_prefix=`$KDECONFIG --prefix`
if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
This means it has been moved since you installed it.
This won't work. Please recompile kdelibs for the new prefix.
])
fi
kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
else
kde_libs_prefix='$(prefix)'
kde_libs_htmldir='$(kde_htmldir)'
fi
AC_SUBST(kde_libs_prefix)
AC_SUBST(kde_libs_htmldir)
])dnl
AC_DEFUN(AC_CREATE_KFSSTND,
[
AC_REQUIRE([AC_CHECK_RPATH])
AC_MSG_CHECKING([for KDE paths])
kde_result=""
kde_cached_paths=yes
AC_CACHE_VAL(kde_cv_all_paths,
[
KDE_SET_DEFAULT_PATHS($1)
kde_cached_paths=no
])
eval "$kde_cv_all_paths"
KDE_CHECK_PATHS_FOR_COMPLETENESS
if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
# wrong values were cached, may be, we can set better ones
kde_result=
kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
kde_datadir= kde_locale= kde_cgidir= kde_confdir=
kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
kde_have_all_paths=
kde_styledir=
kde_widgetdir=
KDE_SET_DEFAULT_PATHS($1)
eval "$kde_cv_all_paths"
KDE_CHECK_PATHS_FOR_COMPLETENESS
kde_result="$kde_result (cache overridden)"
fi
if test "$kde_have_all_paths" = "no"; then
AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
Since it had compiled and linked before, it must be a strange problem on your system.
Look at config.log for details. If you are not able to fix this, look at
http://www.kde.org/faq/installation.html or any www.kde.org mirror.
(If you're using an egcs version on Linux, you may update binutils!)
])
else
rm -f conftest*
AC_MSG_RESULT($kde_result)
fi
bindir=$kde_bindir
KDE_SUBST_PROGRAMS
])
AC_DEFUN(AC_SUBST_KFSSTND,
[
AC_SUBST(kde_htmldir)
AC_SUBST(kde_appsdir)
AC_SUBST(kde_icondir)
AC_SUBST(kde_sounddir)
AC_SUBST(kde_datadir)
AC_SUBST(kde_locale)
AC_SUBST(kde_confdir)
AC_SUBST(kde_mimedir)
AC_SUBST(kde_wallpaperdir)
AC_SUBST(kde_bindir)
dnl for KDE 2
AC_SUBST(kde_templatesdir)
AC_SUBST(kde_servicesdir)
AC_SUBST(kde_servicetypesdir)
AC_SUBST(kde_moduledir)
AC_SUBST(kde_styledir)
AC_SUBST(kde_widgetdir)
if test "$kde_qtver" = 1; then
kde_minidir="$kde_icondir/mini"
else
# for KDE 1 - this breaks KDE2 apps using minidir, but
# that's the plan ;-/
kde_minidir="/dev/null"
fi
dnl AC_SUBST(kde_minidir)
dnl AC_SUBST(kde_cgidir)
dnl AC_SUBST(kde_toolbardir)
])
AC_DEFUN(KDE_MISC_TESTS,
[
AC_LANG_C
dnl Checks for libraries.
AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD
AC_SUBST(LIBUTIL)
AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
AC_SUBST(LIBCOMPAT)
kde_have_crypt=
AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
AC_MSG_WARN([you have no crypt in either libcrypt or libc.
You should install libcrypt from another source or configure with PAM
support])
kde_have_crypt=no
]))
AC_SUBST(LIBCRYPT)
if test $kde_have_crypt = yes; then
AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
fi
AC_CHECK_SOCKLEN_T
AC_LANG_C
AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
AC_CHECK_LIB(dnet_stub, dnet_ntoa,
[X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
fi
AC_CHECK_FUNC(inet_ntoa)
if test $ac_cv_func_inet_ntoa = no; then
AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
fi
AC_CHECK_FUNC(connect)
if test $ac_cv_func_connect = no; then
AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
$X_EXTRA_LIBS)
fi
AC_CHECK_FUNC(remove)
if test $ac_cv_func_remove = no; then
AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
fi
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
AC_CHECK_FUNC(shmat, ,
AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
# Solaris 2.6 and others need -lresolv for res_init
AC_CHECK_FUNCS(res_init, , [
kde_libs_safe="$LIBS"
LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
AC_TRY_LINK(
[
#include
],
[
res_init();
],
LIBRESOLV="-lresolv"
X_EXTRA_LIBS="$X_EXTRA_LIBS $LIBRESOLV"
AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
)
LIBS=$kde_libs_safe
])
LIBSOCKET="$X_EXTRA_LIBS"
AC_SUBST(LIBSOCKET)
AC_SUBST(LIBRESOLV)
AC_SUBST(X_EXTRA_LIBS)
AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
AC_SUBST(LIBUCB)
case $host in dnl this *is* LynxOS specific
*-*-lynxos* )
AC_MSG_CHECKING([LynxOS header file wrappers])
[CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
AC_MSG_RESULT(disabled)
AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
;;
esac
KDE_CHECK_TYPES
KDE_CHECK_LIBDL
])
dnl ------------------------------------------------------------------------
dnl Find the header files and libraries for X-Windows. Extended the
dnl macro AC_PATH_X
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(K_PATH_X,
[
AC_REQUIRE([KDE_MISC_TESTS])dnl
AC_ARG_ENABLE(
embedded,
[ --enable-embedded link to Qt-embedded, don't use X],
kde_use_qt_emb=$enableval,
kde_use_qt_emb=no
)
AC_ARG_ENABLE(
qtopia,
[ --enable-qtopia link to Qt-embedded, link to the Qtopia Environment],
kde_use_qt_emb_palm=$enableval,
kde_use_qt_emb_palm=no
)
if test "$kde_use_qt_emb" = "no"; then
AC_MSG_CHECKING(for X)
AC_LANG_SAVE
AC_LANG_C
AC_CACHE_VAL(kde_cv_have_x,
[# One or both of the vars are not set, and there is no cached value.
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
kde_x_includes=NO
else
kde_x_includes=$x_includes
fi
if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
kde_x_libraries=NO
else
kde_x_libraries=$x_libraries
fi
# below we use the standard autoconf calls
ac_x_libraries=$kde_x_libraries
ac_x_includes=$kde_x_includes
KDE_PATH_X_DIRECT
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
dnl location. The correct location is /usr/lib32 or an undefined value
dnl (the linker is smart enough to pick the correct default library).
dnl Things work just fine if you use just AC_PATH_X_DIRECT.
dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
dnl x_includes should be left alone.
case "$host" in
mips-sgi-irix6*)
;;
*-*-solaris*)
;;
*)
_AC_PATH_X_XMKMF
if test -z "$ac_x_includes"; then
ac_x_includes="."
fi
if test -z "$ac_x_libraries"; then
ac_x_libraries="/usr/lib"
fi
esac
#from now on we use our own again
# when the user already gave --x-includes, we ignore
# what the standard autoconf macros told us.
if test "$kde_x_includes" = NO; then
kde_x_includes=$ac_x_includes
fi
# for --x-libraries too
if test "$kde_x_libraries" = NO; then
kde_x_libraries=$ac_x_libraries
fi
if test "$kde_x_includes" = NO; then
AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
fi
if test "$kde_x_libraries" = NO; then
AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
fi
# Record where we found X for the cache.
kde_cv_have_x="have_x=yes \
kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
])dnl
eval "$kde_cv_have_x"
if test "$have_x" != yes; then
AC_MSG_RESULT($have_x)
no_x=yes
else
AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
fi
if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
X_INCLUDES=""
x_includes="."; dnl better than nothing :-
else
x_includes=$kde_x_includes
X_INCLUDES="-I$x_includes"
fi
if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
X_LDFLAGS=""
x_libraries="/usr/lib"; dnl better than nothing :-
else
x_libraries=$kde_x_libraries
X_LDFLAGS="-L$x_libraries"
fi
all_includes="$X_INCLUDES"
all_libraries="$X_LDFLAGS"
AC_SUBST(X_INCLUDES)
AC_SUBST(X_LDFLAGS)
AC_SUBST(x_libraries)
AC_SUBST(x_includes)
# Check for libraries that X11R6 Xt/Xaw programs need.
ac_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $X_LDFLAGS"
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
# check for ICE first), but we must link in the order -lSM -lICE or
# we get undefined symbols. So assume we have SM if we have ICE.
# These have to be linked with before -lX11, unlike the other
# libraries we check for below, so use a different variable.
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
AC_CHECK_LIB(ICE, IceConnectionNumber,
[LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
AC_SUBST(LIBSM)
LDFLAGS="$ac_save_LDFLAGS"
AC_SUBST(X_PRE_LIBS)
LIB_X11='-lX11 $(LIBSOCKET)'
AC_SUBST(LIB_X11)
AC_MSG_CHECKING(for libXext)
AC_CACHE_VAL(kde_cv_have_libXext,
[
kde_ldflags_safe="$LDFLAGS"
kde_libs_safe="$LIBS"
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
LIBS="-lXext -lX11 $LIBSOCKET"
AC_TRY_LINK([
#include
#ifdef STDC_HEADERS
# include
#endif
],
[
printf("hello Xext\n");
],
kde_cv_have_libXext=yes,
kde_cv_have_libXext=no
)
LDFLAGS=$kde_ldflags_safe
LIBS=$kde_libs_safe
])
AC_MSG_RESULT($kde_cv_have_libXext)
if test "$kde_cv_have_libXext" = "no"; then
AC_MSG_ERROR([We need a working libXext to proceed. Since configure
can't find it itself, we stop here assuming that make wouldn't find
them either.])
fi
AC_MSG_CHECKING(for Xinerama)
AC_ARG_WITH(xinerama,
[ --with-xinerama enable support for Xinerama ],
[
no_xinerama=no
], [
no_xinerama=yes
]
)
kde_save_LDFLAGS="$LDFLAGS"
kde_save_CFLAGS="$CFLAGS"
kde_save_LIBS="$LIBS"
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
CFLAGS="$CFLAGS -I$x_includes"
LIBS="-lXinerama -lXext"
if test "x$no_xinerama" = "xno"; then
AC_CACHE_VAL(ac_cv_have_xinerama,
[
AC_TRY_LINK([#include
#include ],
[XineramaIsActive(NULL);],
[ac_cv_have_xinerama="yes"],
[ac_cv_have_xinerama="no"])
])
else
ac_cv_have_xinerama=no;
fi
AC_MSG_RESULT($ac_cv_have_xinerama)
LIBXINERAMA=""
if test "$ac_cv_have_xinerama" = "yes"; then
AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support])
LIBXINERAMA="-lXinerama"
fi
AC_SUBST(LIBXINERAMA)
LDFLAGS="$kde_save_LDFLAGS"
CFLAGS="$kde_save_CFLAGS"
LIBS="$kde_save_LIBS"
LIB_XEXT="-lXext"
QTE_NORTTI=""
else
dnl We're using QT Embedded
CXXFLAGS="$CXXFLAGS -fno-rtti -DQWS"
CFLAGS="$CFLAGS -DQWS"
LDFLAGS="$LDFLAGS -DQWS"
QTE_NORTTI="-fno-rtti -DQWS"
X_PRE_LIBS=""
LIB_X11=""
LIB_XEXT=""
LIBSM=""
X_INCLUDES=""
X_LDFLAGS=""
x_includes=""
x_libraries=""
AC_SUBST(X_PRE_LIBS)
AC_SUBST(LIB_X11)
AC_SUBST(LIBSM)
AC_SUBST(X_INCLUDES)
AC_SUBST(X_LDFLAGS)
AC_SUBST(x_includes)
AC_SUBST(x_libraries)
fi
AC_SUBST(QTE_NORTTI)
AC_SUBST(LIB_XEXT)
AC_LANG_RESTORE
])
AC_DEFUN(KDE_PRINT_QT_PROGRAM,
[
AC_REQUIRE([KDE_USE_QT])
cat > conftest.$ac_ext <
#include
EOF
if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <
#include
#include
EOF
if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <
EOF
fi
fi
if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <
#include
#include
EOF
fi
echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
cat >> conftest.$ac_ext <> conftest.$ac_ext <> conftest.$ac_ext <> conftest.$ac_ext <> conftest.$ac_ext <&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
fi
rm -f conftest*
CXXFLAGS="$ac_cxxflags_safe"
LDFLAGS="$ac_ldflags_safe"
LIBS="$ac_libs_safe"
LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
export LD_LIBRARY_PATH
LIBRARY_PATH="$ac_LIBRARY_PATH"
export LIBRARY_PATH
AC_LANG_RESTORE
])
if test "$kde_cv_qt_direct" = "yes"; then
AC_MSG_RESULT(yes)
$1
else
AC_MSG_RESULT(no)
$2
fi
])
dnl ------------------------------------------------------------------------
dnl Try to find the Qt headers and libraries.
dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(AC_PATH_QT_1_3,
[
AC_REQUIRE([K_PATH_X])
AC_REQUIRE([KDE_USE_QT])
dnl ------------------------------------------------------------------------
dnl Add configure flag to enable linking to MT version of Qt library.
dnl ------------------------------------------------------------------------
AC_ARG_ENABLE(
mt,
[ --disable-mt link to non-threaded Qt (deprecated)],
kde_use_qt_mt=$enableval,
[
if test $kde_qtver = 3; then
kde_use_qt_mt=yes
else
kde_use_qt_mt=no
fi
]
)
USING_QT_MT=""
dnl ------------------------------------------------------------------------
dnl If we not get --disable-qt-mt then adjust some vars for the host.
dnl ------------------------------------------------------------------------
KDE_MT_LDFLAGS=
KDE_MT_LIBS=
if test "x$kde_use_qt_mt" = "xyes"; then
KDE_CHECK_THREADING
if test "x$kde_use_threading" = "xyes"; then
CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
KDE_MT_LDFLAGS="$USE_THREADS"
KDE_MT_LIBS="$LIBPTHREAD"
else
kde_use_qt_mt=no
fi
fi
AC_SUBST(KDE_MT_LDFLAGS)
AC_SUBST(KDE_MT_LIBS)
kde_qt_was_given=yes
dnl ------------------------------------------------------------------------
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
dnl ------------------------------------------------------------------------
if test -z "$LIBQT_GLOB"; then
if test "x$kde_use_qt_emb" = "xyes"; then
LIBQT_GLOB="libqte.*"
else
LIBQT_GLOB="libqt.*"
fi
fi
if test -z "$LIBQT"; then
dnl ------------------------------------------------------------
dnl If we got --enable-embedded then adjust the Qt library name.
dnl ------------------------------------------------------------
if test "x$kde_use_qt_emb" = "xyes"; then
qtlib="qte"
else
qtlib="qt"
fi
kde_int_qt="-l$qtlib"
else
kde_int_qt="$LIBQT"
kde_lib_qt_set=yes
fi
if test -z "$LIBQPE"; then
dnl ------------------------------------------------------------
dnl If we got --enable-palmtop then add -lqpe to the link line
dnl ------------------------------------------------------------
if test "x$kde_use_qt_emb" = "xyes"; then
if test "x$kde_use_qt_emb_palm" = "xyes"; then
LIB_QPE="-lqpe"
else
LIB_QPE=""
fi
else
LIB_QPE=""
fi
fi
dnl ------------------------------------------------------------------------
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
dnl ------------------------------------------------------------------------
if test "x$kde_use_qt_mt" = "xyes"; then
if test -z "$LIBQT"; then
LIBQT="-l$qtlib-mt"
kde_int_qt="-l$qtlib-mt"
else
LIBQT="$qtlib-mt"
kde_int_qt="$qtlib-mt"
fi
LIBQT_GLOB="lib$qtlib-mt.*"
USING_QT_MT="using -mt"
else
LIBQT="-l$qtlib"
fi
if test $kde_qtver != 1; then
AC_REQUIRE([AC_FIND_PNG])
AC_REQUIRE([AC_FIND_JPEG])
LIBQT="$LIBQT $LIBPNG $LIBJPEG"
fi
if test $kde_qtver = 3; then
AC_REQUIRE([KDE_CHECK_LIBDL])
LIBQT="$LIBQT $LIBDL"
fi
AC_MSG_CHECKING([for Qt])
if test "x$kde_use_qt_emb" != "xyes"; then
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
fi
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
qt_libraries=""
qt_includes=""
AC_ARG_WITH(qt-dir,
[ --with-qt-dir=DIR where the root of Qt is installed ],
[ ac_qt_includes="$withval"/include
ac_qt_libraries="$withval"/lib
ac_qt_bindir="$withval"/bin
])
AC_ARG_WITH(qt-includes,
[ --with-qt-includes=DIR where the Qt includes are. ],
[
ac_qt_includes="$withval"
])
kde_qt_libs_given=no
AC_ARG_WITH(qt-libraries,
[ --with-qt-libraries=DIR where the Qt library is installed.],
[ ac_qt_libraries="$withval"
kde_qt_libs_given=yes
])
AC_CACHE_VAL(ac_cv_have_qt,
[#try to guess Qt locations
qt_incdirs=""
for dir in $kde_qt_dirs; do
qt_incdirs="$qt_incdirs $dir/include $dir"
done
qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 $x_includes"
if test ! "$ac_qt_includes" = "NO"; then
qt_incdirs="$ac_qt_includes $qt_incdirs"
fi
if test "$kde_qtver" != "1"; then
kde_qt_header=qstyle.h
else
kde_qt_header=qglobal.h
fi
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
ac_qt_includes="$qt_incdir"
qt_libdirs=""
for dir in $kde_qt_dirs; do
qt_libdirs="$qt_libdirs $dir/lib $dir"
done
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
if test ! "$ac_qt_libraries" = "NO"; then
qt_libdir=$ac_qt_libraries
else
qt_libdirs="$ac_qt_libraries $qt_libdirs"
# if the Qt was given, the chance is too big that libqt.* doesn't exist
qt_libdir=NONE
for dir in $qt_libdirs; do
try="ls -1 $dir/${LIBQT_GLOB}"
if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
done
fi
ac_qt_libraries="$qt_libdir"
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_cxxflags_safe="$CXXFLAGS"
ac_ldflags_safe="$LDFLAGS"
ac_libs_safe="$LIBS"
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
KDE_PRINT_QT_PROGRAM
if AC_TRY_EVAL(ac_link) && test -s conftest; then
rm -f conftest*
else
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
ac_qt_libraries="NO"
fi
rm -f conftest*
CXXFLAGS="$ac_cxxflags_safe"
LDFLAGS="$ac_ldflags_safe"
LIBS="$ac_libs_safe"
AC_LANG_RESTORE
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
ac_cv_have_qt="have_qt=no"
ac_qt_notfound=""
missing_qt_mt=""
if test "$ac_qt_includes" = NO; then
if test "$ac_qt_libraries" = NO; then
ac_qt_notfound="(headers and libraries)";
else
ac_qt_notfound="(headers)";
fi
else
if test "x$kde_use_qt_mt" = "xyes"; then
missing_qt_mt="
Make sure that you have compiled Qt with thread support!"
ac_qt_notfound="(library $qtlib-mt)";
else
ac_qt_notfound="(library $qtlib)";
fi
fi
AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
For more details about this problem, look at the end of config.log.$missing_qt_mt])
else
have_qt="yes"
fi
])
eval "$ac_cv_have_qt"
if test "$have_qt" != yes; then
AC_MSG_RESULT([$have_qt]);
else
ac_cv_have_qt="have_qt=yes \
ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
qt_libraries="$ac_qt_libraries"
qt_includes="$ac_qt_includes"
fi
if test ! "$kde_qt_libs_given" = "yes"; then
KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
fi
AC_SUBST(qt_libraries)
AC_SUBST(qt_includes)
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
QT_INCLUDES=""
else
QT_INCLUDES="-I$qt_includes"
all_includes="$QT_INCLUDES $all_includes"
fi
if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
QT_LDFLAGS=""
else
QT_LDFLAGS="-L$qt_libraries"
all_libraries="$all_libraries $QT_LDFLAGS"
fi
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
AC_SUBST(QT_INCLUDES)
AC_SUBST(QT_LDFLAGS)
AC_PATH_QT_MOC_UIC
if test "x$kde_use_qt_emb" != "xyes"; then
LIB_QT="$kde_int_qt "'$(LIBPNG) $(LIBJPEG) -lXext $(LIB_X11) $(LIBSM)'
else
LIB_QT="$kde_int_qt "'$(LIBPNG) $(LIBJPEG)'
fi
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
AC_SUBST(LIB_QT)
AC_SUBST(LIB_QPE)
AC_SUBST(kde_qtver)
])
AC_DEFUN(AC_PATH_QT,
[
AC_PATH_QT_1_3
])
AC_DEFUN(KDE_CHECK_FINAL,
[
AC_ARG_ENABLE(final, [ --enable-final build size optimized apps (experimental - needs lots of memory)],
kde_use_final=$enableval, kde_use_final=no)
KDE_COMPILER_REPO
if test "x$kde_use_final" = "xyes"; then
KDE_USE_FINAL_TRUE=""
KDE_USE_FINAL_FALSE="#"
else
KDE_USE_FINAL_TRUE="#"
KDE_USE_FINAL_FALSE=""
fi
AC_SUBST(KDE_USE_FINAL_TRUE)
AC_SUBST(KDE_USE_FINAL_FALSE)
AC_ARG_ENABLE(closure, [ --disable-closure don't delay template instantiation],
kde_use_closure=$enableval, kde_use_closure=yes)
if test "x$kde_use_closure" = "xyes"; then
KDE_USE_CLOSURE_TRUE=""
KDE_USE_CLOSURE_FALSE="#"
# CXXFLAGS="$CXXFLAGS $REPO"
else
KDE_USE_CLOSURE_TRUE="#"
KDE_USE_CLOSURE_FALSE=""
fi
AC_SUBST(KDE_USE_CLOSURE_TRUE)
AC_SUBST(KDE_USE_CLOSURE_FALSE)
])
dnl ------------------------------------------------------------------------
dnl Now, the same with KDE
dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(AC_BASE_PATH_KDE,
[
AC_PREREQ([2.13])
AC_REQUIRE([AC_PATH_QT])dnl
AC_CHECK_RPATH
AC_MSG_CHECKING([for KDE])
if test "${prefix}" != NONE; then
kde_includes=${prefix}/include
ac_kde_includes=$prefix/include
if test "${exec_prefix}" != NONE; then
kde_libraries=${exec_prefix}/lib
ac_kde_libraries=$exec_prefix/lib
else
kde_libraries=${prefix}/lib
ac_kde_libraries=$prefix/lib
fi
else
ac_kde_includes=
ac_kde_libraries=
kde_libraries=""
kde_includes=""
fi
AC_CACHE_VAL(ac_cv_have_kde,
[#try to guess kde locations
if test "$kde_qtver" = 1; then
kde_check_header="ksock.h"
kde_check_lib="libkdecore.la"
else
kde_check_header="ksharedptr.h"
kde_check_lib="libkio.la"
fi
if test -z "$1"; then
kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
kde_incdirs="$ac_kde_includes $kde_incdirs"
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
ac_kde_includes="$kde_incdir"
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
AC_MSG_ERROR([
in the prefix, you've chosen, are no KDE headers installed. This will fail.
So, check this please and use another prefix!])
fi
kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib/kde3 /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib"
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib $KDEDIR $kde_libdirs"
kde_libdirs="$ac_kde_libraries $kde_libdirs"
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
ac_kde_libraries="$kde_libdir"
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
AC_MSG_ERROR([
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
So, check this please and use another prefix!])
fi
ac_kde_libraries="$kde_libdir"
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO; then
ac_cv_have_kde="have_kde=no"
else
ac_cv_have_kde="have_kde=yes \
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
fi
else dnl test -z $1
ac_cv_have_kde="have_kde=no"
fi
])dnl
eval "$ac_cv_have_kde"
if test "$have_kde" != "yes"; then
if test "${prefix}" = NONE; then
ac_kde_prefix="$ac_default_prefix"
else
ac_kde_prefix="$prefix"
fi
if test "$exec_prefix" = NONE; then
ac_kde_exec_prefix="$ac_kde_prefix"
AC_MSG_RESULT([will be installed in $ac_kde_prefix])
else
ac_kde_exec_prefix="$exec_prefix"
AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
fi
kde_libraries="${ac_kde_exec_prefix}/lib"
kde_includes=${ac_kde_prefix}/include
else
ac_cv_have_kde="have_kde=yes \
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
kde_libraries="$ac_kde_libraries"
kde_includes="$ac_kde_includes"
fi
AC_SUBST(kde_libraries)
AC_SUBST(kde_includes)
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then
KDE_INCLUDES=""
else
KDE_INCLUDES="-I$kde_includes"
all_includes="$KDE_INCLUDES $all_includes"
fi
KDE_LDFLAGS="-L$kde_libraries"
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
all_libraries="$all_libraries $KDE_LDFLAGS"
fi
AC_SUBST(KDE_LDFLAGS)
AC_SUBST(KDE_INCLUDES)
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
all_libraries="$all_libraries $USER_LDFLAGS"
all_includes="$all_includes $USER_INCLUDES"
AC_SUBST(all_includes)
AC_SUBST(all_libraries)
AC_SUBST(AUTODIRS)
])
AC_DEFUN(KDE_CHECK_EXTRA_LIBS,
[
AC_MSG_CHECKING(for extra includes)
AC_ARG_WITH(extra-includes, [ --with-extra-includes=DIR
adds non standard include paths],
kde_use_extra_includes="$withval",
kde_use_extra_includes=NONE
)
kde_extra_includes=
if test -n "$kde_use_extra_includes" && \
test "$kde_use_extra_includes" != "NONE"; then
ac_save_ifs=$IFS
IFS=':'
for dir in $kde_use_extra_includes; do
kde_extra_includes="$kde_extra_includes $dir"
USER_INCLUDES="$USER_INCLUDES -I$dir"
done
IFS=$ac_save_ifs
kde_use_extra_includes="added"
else
kde_use_extra_includes="no"
fi
AC_SUBST(USER_INCLUDES)
AC_MSG_RESULT($kde_use_extra_includes)
kde_extra_libs=
AC_MSG_CHECKING(for extra libs)
AC_ARG_WITH(extra-libs, [ --with-extra-libs=DIR adds non standard library paths],
kde_use_extra_libs=$withval,
kde_use_extra_libs=NONE
)
if test -n "$kde_use_extra_libs" && \
test "$kde_use_extra_libs" != "NONE"; then
ac_save_ifs=$IFS
IFS=':'
for dir in $kde_use_extra_libs; do
kde_extra_libs="$kde_extra_libs $dir"
KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
USER_LDFLAGS="$USER_LDFLAGS -L$dir"
done
IFS=$ac_save_ifs
kde_use_extra_libs="added"
else
kde_use_extra_libs="no"
fi
AC_SUBST(USER_LDFLAGS)
AC_MSG_RESULT($kde_use_extra_libs)
])
AC_DEFUN(KDE_1_CHECK_PATH_HEADERS,
[
AC_MSG_CHECKING([for KDE headers installed])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
cat > conftest.$ac_ext <
#endif
#include
#include "confdefs.h"
#include
int main() {
printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
printf("kde_wallpaperdir=\\"%s\\"\n",
KApplication::kde_wallpaperdir().data());
printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
printf("kde_moduledir=\\"/tmp/dummy\\"\n");
printf("kde_styledir=\\"/tmp/dummy\\"\n");
printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
return 0;
}
EOF
ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
if AC_TRY_EVAL(ac_compile); then
AC_MSG_RESULT(yes)
else
AC_MSG_ERROR([your system is not able to compile a small KDE application!
Check, if you installed the KDE header files correctly.
For more details about this problem, look at the end of config.log.])
fi
AC_LANG_RESTORE
])
AC_DEFUN(KDE_CHECK_KDEQTADDON,
[
AC_MSG_CHECKING(for kde-qt-addon)
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
[
kde_ldflags_safe="$LDFLAGS"
kde_libs_safe="$LIBS"
kde_cxxflags_safe="$CXXFLAGS"
LIBS="-lkde-qt-addon $LIBQT $LIBS"
CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
AC_TRY_LINK([
#include
],
[
QDomDocument doc;
],
kde_cv_have_kdeqtaddon=yes,
kde_cv_have_kdeqtaddon=no
)
LDFLAGS=$kde_ldflags_safe
LIBS=$kde_libs_safe
kde_cxxflags_safe="$CXXFLAGS"
])
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
if test "$kde_cv_have_kdeqtaddon" = "no"; then
AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
It is a separate package (and CVS module) named kde-qt-addon.])
fi
])
AC_DEFUN(KDE_CHECK_KIMGIO,
[
AC_REQUIRE([AC_BASE_PATH_KDE])
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
AC_REQUIRE([AC_FIND_TIFF])
AC_REQUIRE([AC_FIND_JPEG])
AC_REQUIRE([AC_FIND_PNG])
AC_REQUIRE([KDE_CREATE_LIBS_ALIASES])
if test "$1" = "existance"; then
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
kde_save_LIBS="$LIBS"
LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
AC_CHECK_LIB(kimgio, kimgioRegister, [
LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
LIBS="$kde_save_LIBS"
AC_LANG_RESTORE
else
LIBKIMGIO_EXISTS=yes
fi
if test "$LIBKIMGIO_EXISTS" = "yes"; then
LIB_KIMGIO='-lkimgio'
else
LIB_KIMGIO=''
fi
AC_SUBST(LIB_KIMGIO)
])
AC_DEFUN(KDE_CREATE_LIBS_ALIASES,
[
AC_REQUIRE([KDE_MISC_TESTS])
AC_REQUIRE([KDE_CHECK_LIBDL])
AC_REQUIRE([K_PATH_X])
if test $kde_qtver = 3; then
LIB_KDECORE='-lkdecore'
AC_SUBST(LIB_KDECORE)
LIB_KDEUI='-lkdeui'
AC_SUBST(LIB_KDEUI)
LIB_KIO='-lkio'
AC_SUBST(LIB_KIO)
LIB_SMB='-lsmb'
AC_SUBST(LIB_SMB)
LIB_KAB='-lkab'
AC_SUBST(LIB_KAB)
LIB_KHTML='-lkhtml'
AC_SUBST(LIB_KHTML)
LIB_KSPELL='-lkspell'
AC_SUBST(LIB_KSPELL)
LIB_KPARTS='-lkparts'
AC_SUBST(LIB_KPARTS)
LIB_KDEPRINT='-lkdeprint'
AC_SUBST(LIB_KDEPRINT)
# these are for backward compatibility
LIB_KSYCOCA='-lkio'
AC_SUBST(LIB_KSYCOCA)
LIB_KFILE='-lkio'
AC_SUBST(LIB_KFILE)
elif test $kde_qtver = 2; then
LIB_KDECORE='-lkdecore'
AC_SUBST(LIB_KDECORE)
LIB_KDEUI='-lkdeui'
AC_SUBST(LIB_KDEUI)
LIB_KIO='-lkio'
AC_SUBST(LIB_KIO)
LIB_KSYCOCA='-lksycoca'
AC_SUBST(LIB_KSYCOCA)
LIB_SMB='-lsmb'
AC_SUBST(LIB_SMB)
LIB_KFILE='-lkfile'
AC_SUBST(LIB_KFILE)
LIB_KAB='-lkab'
AC_SUBST(LIB_KAB)
LIB_KHTML='-lkhtml'
AC_SUBST(LIB_KHTML)
LIB_KSPELL='-lkspell'
AC_SUBST(LIB_KSPELL)
LIB_KPARTS='-lkparts'
AC_SUBST(LIB_KPARTS)
LIB_KDEPRINT='-lkdeprint'
AC_SUBST(LIB_KDEPRINT)
else
LIB_KDECORE='-lkdecore -lXext $(LIB_QT)'
AC_SUBST(LIB_KDECORE)
LIB_KDEUI='-lkdeui $(LIB_KDECORE)'
AC_SUBST(LIB_KDEUI)
LIB_KFM='-lkfm $(LIB_KDECORE)'
AC_SUBST(LIB_KFM)
LIB_KFILE='-lkfile $(LIB_KFM) $(LIB_KDEUI)'
AC_SUBST(LIB_KFILE)
LIB_KAB='-lkab $(LIB_KIMGIO) $(LIB_KDECORE)'
AC_SUBST(LIB_KAB)
fi
])
AC_DEFUN(AC_PATH_KDE,
[
AC_BASE_PATH_KDE
AC_ARG_ENABLE(path-check, [ --disable-path-check don't try to find out, where to install],
[
if test "$enableval" = "no";
then ac_use_path_checking="default"
else ac_use_path_checking=""
fi
],
[
if test "$kde_qtver" = 1;
then ac_use_path_checking=""
else ac_use_path_checking="default"
fi
]
)
AC_CREATE_KFSSTND($ac_use_path_checking)
AC_SUBST_KFSSTND
KDE_CREATE_LIBS_ALIASES
])
dnl obsolete
AC_DEFUN(AC_CHECK_SETENV,
[
AC_OBSOLETE([$0], [; instead use AC_CHECK_FUNCS([setenv unsetenv])])dnl
AC_CHECK_FUNCS([setenv unsetenv])
])
AC_DEFUN(AC_CHECK_GETDOMAINNAME,
[
AC_MSG_CHECKING(for getdomainname)
AC_CACHE_VAL(ac_cv_func_getdomainname,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
save_CXXFLAGS="$CXXFLAGS"
kde_safe_LIBS="$LIBS"
LIBS="$LIBS $X_EXTRA_LIBS"
if test "$GCC" = "yes"; then
CXXFLAGS="$CXXFLAGS -pedantic-errors"
fi
AC_TRY_COMPILE([
#include
#include
],
[
char buffer[200];
getdomainname(buffer, 200);
],
ac_cv_func_getdomainname=yes,
ac_cv_func_getdomainname=no)
CXXFLAGS="$save_CXXFLAGS"
LIBS=$kde_safe_LIBS
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_func_getdomainname)
AC_MSG_CHECKING([if getdomainname needs custom prototype])
AC_CACHE_VAL(ac_cv_proto_getdomainname,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
if eval "test \"`echo $ac_cv_func_getdomainname`\" = yes"; then
ac_cv_proto_getdomainname=no
else
kde_safe_libs=$LIBS
LIBS="$LIBS $X_EXTRA_LIBS"
AC_TRY_LINK([
#include
#include
extern "C" int getdomainname (char *, int);
],
[
char buffer[200];
getdomainname(buffer, 200);
],
ac_cv_func_getdomainname=yes
ac_cv_proto_getdomainname=yes,
AC_MSG_RESULT([fatal error])
AC_MSG_ERROR([getdomainname unavailable]))
fi
LIBS=$kde_safe_libs
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_proto_getdomainname)
if eval "test \"`echo $ac_cv_func_getdomainname`\" = yes"; then
AC_DEFINE(HAVE_GETDOMAINNAME, 1, [Define if you have getdomainname])
fi
if eval "test \"`echo $ac_cv_proto_getdomainname`\" = no"; then
AC_DEFINE(HAVE_GETDOMAINNAME_PROTO, 1,
[Define if you have getdomainname prototype])
fi
])
AC_DEFUN(AC_CHECK_GETHOSTNAME,
[
AC_MSG_CHECKING([for gethostname])
AC_CACHE_VAL(ac_cv_func_gethostname,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
save_CXXFLAGS="$CXXFLAGS"
if test "$GCC" = "yes"; then
CXXFLAGS="$CXXFLAGS -pedantic-errors"
fi
AC_TRY_LINK([
#include
#include
],
[
char buffer[200];
gethostname(buffer, 200);
],
ac_cv_func_gethostname=yes,
ac_cv_func_gethostname=no)
CXXFLAGS="$save_CXXFLAGS"
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_func_gethostname)
AC_MSG_CHECKING([if gethostname needs custom prototype])
AC_CACHE_VAL(ac_cv_proto_gethostname,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
ac_cv_proto_gethostname=no
else
AC_TRY_LINK([
#include
#include
extern "C" int gethostname (char *, int);
],
[
char buffer[200];
gethostname(buffer, 200);
],
ac_cv_func_gethostname=yes
ac_cv_proto_gethostname=yes,
AC_MSG_RESULT([fatal error])
AC_MSG_ERROR(gethostname unavailable))
fi
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_proto_gethostname)
if eval "test \"`echo $ac_cv_proto_gethostname`\" = no"; then
AC_DEFINE(HAVE_GETHOSTNAME_PROTO, 1,
[Define if you have gethostname prototype])
fi
if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
AC_DEFINE(HAVE_GETHOSTNAME, 1, [Define if you have gethostname])
fi
])
AC_DEFUN(AC_CHECK_USLEEP,
[
AC_MSG_CHECKING([for usleep])
AC_CACHE_VAL(ac_cv_func_usleep,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_libs_safe="$LIBS"
LIBS="$LIBS $LIBUCB"
AC_TRY_LINK([
#include
#include
],
[
usleep(200);
],
ac_cv_func_usleep=yes,
ac_cv_func_usleep=no)
LIBS="$ac_libs_safe"
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_func_usleep)
if eval "test \"`echo $ac_cv_func_usleep`\" = yes"; then
AC_DEFINE(HAVE_USLEEP, 1, [Define if you have the usleep function])
fi
])
AC_DEFUN(AC_CHECK_RANDOM,
[
AC_MSG_CHECKING([for random])
AC_CACHE_VAL(ac_cv_func_random,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_libs_safe="$LIBS"
LIBS="$LIBS $LIBUCB"
AC_TRY_LINK([
#include
],
[
random();
],
ac_cv_func_random=yes,
ac_cv_func_random=no)
LIBS="$ac_libs_safe"
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_func_random)
if eval "test \"`echo $ac_cv_func_random`\" = yes"; then
AC_DEFINE(HAVE_RANDOM, 1, [Define if you have random])
fi
])
AC_DEFUN(AC_FIND_GIF,
[AC_MSG_CHECKING([for giflib])
AC_CACHE_VAL(ac_cv_lib_gif,
[ac_save_LIBS="$LIBS"
if test "x$kde_use_qt_emb" != "xyes"; then
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
else
LIBS="$all_libraries -lgif"
fi
AC_TRY_LINK(dnl
[
#ifdef __cplusplus
extern "C" {
#endif
int GifLastError(void);
#ifdef __cplusplus
}
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
],
[return GifLastError();],
eval "ac_cv_lib_gif=yes",
eval "ac_cv_lib_gif=no")
LIBS="$ac_save_LIBS"
])dnl
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
else
AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
fi
])
AC_DEFUN(KDE_FIND_JPEG_HELPER,
[
AC_MSG_CHECKING([for libjpeg$2])
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
[
AC_LANG_C
ac_save_LIBS="$LIBS"
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK(
[/* Override any gcc2 internal prototype to avoid an error. */
struct jpeg_decompress_struct;
typedef struct jpeg_decompress_struct * j_decompress_ptr;
typedef int size_t;
#ifdef __cplusplus
extern "C" {
#endif
void jpeg_CreateDecompress(j_decompress_ptr cinfo,
int version, size_t structsize);
#ifdef __cplusplus
}
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
],
[jpeg_CreateDecompress(0L, 0, 0);],
eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
eval "ac_cv_lib_jpeg_$1=no")
LIBS="$ac_save_LIBS"
CFLAGS="$ac_save_CFLAGS"
])
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
LIBJPEG="$ac_cv_lib_jpeg_$1"
AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
else
AC_MSG_RESULT(no)
$3
fi
])
AC_DEFUN(AC_FIND_JPEG,
[
dnl first look for libraries
KDE_FIND_JPEG_HELPER(6b, 6b,
KDE_FIND_JPEG_HELPER(normal, [],
[
LIBJPEG=
]
)
)
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
dnl requires system dependent includes loaded before it)
jpeg_incdirs="/usr/include /usr/local/include $kde_extra_includes"
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
test "x$jpeg_incdir" = xNO && jpeg_incdir=
dnl if headers _and_ libraries are missing, this is no error, and we
dnl continue with a warning (the user will get no jpeg support in khtml)
dnl if only one is missing, it means a configuration error, but we still
dnl only warn
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
else
if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
AC_MSG_WARN([
There is an installation error in jpeg support. You seem to have only one
of either the headers _or_ the libraries installed. You may need to either
provide correct --with-extra-... options, or the development package of
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
Disabling JPEG support.
])
else
AC_MSG_WARN([libjpeg not found. disable JPEG support.])
fi
jpeg_incdir=
LIBJPEG=
fi
AC_SUBST(LIBJPEG)
])
AC_DEFUN(AC_FIND_ZLIB,
[
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
AC_MSG_CHECKING([for libz])
AC_CACHE_VAL(ac_cv_lib_z,
[
AC_LANG_C
kde_save_LIBS="$LIBS"
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
kde_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK(dnl
[
#include
],
[return (zlibVersion() == ZLIB_VERSION); ],
eval "ac_cv_lib_z='-lz'",
eval "ac_cv_lib_z=no")
LIBS="$kde_save_LIBS"
CFLAGS="$kde_save_CFLAGS"
])dnl
if test ! "$ac_cv_lib_z" = no; then
AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
LIBZ="$ac_cv_lib_z"
AC_SUBST(LIBZ)
AC_MSG_RESULT($ac_cv_lib_z)
else
AC_MSG_ERROR(not found. Check your installation and look into config.log)
LIBZ=""
AC_SUBST(LIBZ)
fi
])
AC_DEFUN(KDE_TRY_TIFFLIB,
[
AC_MSG_CHECKING([for libtiff $1])
AC_CACHE_VAL(kde_cv_libtiff_$1,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
kde_save_LIBS="$LIBS"
if test "x$kde_use_qt_emb" != "xyes"; then
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
else
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
fi
kde_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK(dnl
[
#include
],
[return (TIFFOpen( "", "r") == 0); ],
[
kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
], [
kde_cv_libtiff_$1=no
])
LIBS="$kde_save_LIBS"
CXXFLAGS="$kde_save_CXXFLAGS"
AC_LANG_RESTORE
])
if test "$kde_cv_libtiff_$1" = "no"; then
AC_MSG_RESULT(no)
LIBTIFF=""
$3
else
LIBTIFF="$kde_cv_libtiff_$1"
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
$2
fi
])
AC_DEFUN(AC_FIND_TIFF,
[
AC_REQUIRE([K_PATH_X])
AC_REQUIRE([AC_FIND_ZLIB])
AC_REQUIRE([AC_FIND_JPEG])
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
KDE_TRY_TIFFLIB(tiff, [],
KDE_TRY_TIFFLIB(tiff34))
AC_SUBST(LIBTIFF)
])
AC_DEFUN(AC_FIND_PNG,
[
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
AC_REQUIRE([AC_FIND_ZLIB])
AC_MSG_CHECKING([for libpng])
AC_CACHE_VAL(ac_cv_lib_png,
[
kde_save_LIBS="$LIBS"
if test "x$kde_use_qt_emb" != "xyes"; then
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
else
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
fi
kde_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
AC_LANG_C
AC_TRY_LINK(dnl
[
#include
],
[
png_structp png_ptr = png_create_read_struct( /* image ptr */
PNG_LIBPNG_VER_STRING, 0, 0, 0 );
return( png_ptr != 0 );
],
eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
eval "ac_cv_lib_png=no"
)
LIBS="$kde_save_LIBS"
CFLAGS="$kde_save_CFLAGS"
])dnl
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
LIBPNG="$ac_cv_lib_png"
AC_SUBST(LIBPNG)
AC_MSG_RESULT($ac_cv_lib_png)
else
AC_MSG_RESULT(no)
LIBPNG=""
AC_SUBST(LIBPNG)
fi
])
AC_DEFUN(AC_CHECK_BOOL,
[
AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
])
AC_DEFUN(AC_CHECK_GNU_EXTENSIONS,
[
AC_MSG_CHECKING(if you need GNU extensions)
AC_CACHE_VAL(ac_cv_gnu_extensions,
[
cat > conftest.c << EOF
#include
#ifdef __GNU_LIBRARY__
yes
#endif
EOF
if (eval "$ac_cpp conftest.c") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_gnu_extensions=yes
else
ac_cv_gnu_extensions=no
fi
])
AC_MSG_RESULT($ac_cv_gnu_extensions)
if test "$ac_cv_gnu_extensions" = "yes"; then
AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
fi
])
AC_DEFUN(KDE_CHECK_COMPILER_FLAG,
[
AC_MSG_CHECKING(whether $CXX supports -$1)
kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -$1"
AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
CXXFLAGS="$save_CXXFLAGS"
AC_LANG_RESTORE
])
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
AC_MSG_RESULT(yes)
:
$2
else
AC_MSG_RESULT(no)
:
$3
fi
])
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
dnl it's all white-space separated
AC_DEFUN(AC_REMOVE_FORBIDDEN,
[ __val=$$1
__forbid=" $2 "
if test -n "$__val"; then
__new=""
ac_save_IFS=$IFS
IFS=" "
for i in $__val; do
case "$__forbid" in
*" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
*) # Careful to not add spaces, where there were none, because otherwise
# libtool gets confused, if we change e.g. CXX
if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
esac
done
IFS=$ac_save_IFS
$1=$__new
fi
])
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
AC_DEFUN(AC_VALIDIFY_CXXFLAGS,
[dnl
if test "x$kde_use_qt_emb" != "xyes"; then
AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
else
AC_REMOVE_FORBIDDEN(CXX, [-rpath])
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
fi
])
AC_DEFUN(AC_CHECK_COMPILERS,
[
AC_ARG_ENABLE(debug,[ --enable-debug[=ARG] enables debug symbols (yes|no|full) [default=no]],
[
case $enableval in
yes)
kde_use_debug_code="yes"
kde_use_debug_define=no
;;
full)
kde_use_debug_code="full"
kde_use_debug_define=no
;;
*)
kde_use_debug_code="no"
kde_use_debug_define=yes
;;
esac
],
[kde_use_debug_code="no"
kde_use_debug_define=no
])
dnl Just for configure --help
AC_ARG_ENABLE(dummyoption,[ --disable-debug disables debug output and debug symbols [default=no]],[],[])
AC_ARG_ENABLE(strict,[ --enable-strict compiles with strict compiler options (may not work!)],
[
if test $enableval = "no"; then
kde_use_strict_options="no"
else
kde_use_strict_options="yes"
fi
], [kde_use_strict_options="no"])
AC_ARG_ENABLE(warnings,[ --enable-warnings compiles with -Wall and similiar],
[
if test $enableval = "no"; then
kde_use_warnings="no"
else
kde_use_warnings="yes"
fi
], [kde_use_warnings="no"])
dnl enable warnings for debug build
if test "$kde_use_debug_code" != "no"; then
kde_use_warnings=yes
fi
AC_ARG_ENABLE(profile,[ --enable-profile creates profiling infos [default=no]],
[kde_use_profiling=$enableval],
[kde_use_profiling="no"]
)
dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
CFLAGS=" $CFLAGS"
AC_PROG_CC
AC_PROG_CPP
if test "$GCC" = "yes"; then
if test "$kde_use_debug_code" != "no"; then
if test $kde_use_debug_code = "full"; then
CFLAGS="-g3 $CFLAGS"
else
CFLAGS="-g -O2 $CFLAGS"
fi
else
CFLAGS="-O2 $CFLAGS"
fi
fi
if test "$kde_use_debug_define" = "yes"; then
CFLAGS="-DNDEBUG $CFLAGS"
fi
case "$host" in
*-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
*-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
esac
if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
LDFLAGS=""
fi
CXXFLAGS=" $CXXFLAGS"
AC_PROG_CXX
if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
if test "$kde_use_debug_code" != "no"; then
if test "$CXX" = "KCC"; then
CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
else
if test "$kde_use_debug_code" = "full"; then
CXXFLAGS="-g3 $CXXFLAGS"
else
CXXFLAGS="-g -O2 $CXXFLAGS"
fi
fi
KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
dnl convenience compiler flags
KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
AC_SUBST(WOVERLOADED_VIRTUAL)
else
if test "$CXX" = "KCC"; then
CXXFLAGS="+K3 $CXXFLAGS"
else
CXXFLAGS="-O2 $CXXFLAGS"
fi
fi
fi
if test "$kde_use_debug_define" = "yes"; then
CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
fi
if test "$kde_use_profiling" = "yes"; then
KDE_CHECK_COMPILER_FLAG(pg,
[
CFLAGS="-pg $CFLAGS"
CXXFLAGS="-pg $CXXFLAGS"
])
fi
if test "$kde_use_warnings" = "yes"; then
if test "$GCC" = "yes"; then
case $host in
*-*-linux-gnu)
CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion $CXXFLAGS"
;;
esac
CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
KDE_CHECK_COMPILER_FLAG(Wbad-function-cast,[CXXFLAGS="-Wbad-function-cast $CXXFLAGS"])
KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
fi
fi
if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then
CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
fi
if test "$GXX" = "yes"; then
KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
fi
if test "$CXX" = "KCC"; then
dnl unfortunately we currently cannot disable exception support in KCC
dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= )
AC_ARG_ENABLE(pch,[ --enable-pch enables precompiled header support (currently only KCC) [default=no]],
[
kde_use_pch=$enableval
],[kde_use_pch=no])
if test "$kde_use_pch" = "yes"; then
dnl TODO: support --pch-dir!
KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
dnl the below works (but the dir must exist), but it's
dnl useless for a whole package.
dnl The are precompiled headers for each source file, so when compiling
dnl from scratch, it doesn't make a difference, and they take up
dnl around ~5Mb _per_ sourcefile.
dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
fi
dnl this flag controls inlining. by default KCC inlines in optimisation mode
dnl all implementations that are defined inside the class {} declaration.
dnl because of templates-compatibility with broken gcc compilers, this
dnl can cause excessive inlining. This flag limits it to a sane level
KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
dnl Some source files are shared between multiple executables
dnl (or libraries) and some of those need template instantiations.
dnl In that case KCC needs to compile those sources with
dnl --one_instantiation_per_object. To make it easy for us we compile
dnl _all_ objects with that flag (--one_per is a shorthand).
KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
fi
AC_SUBST(USE_EXCEPTIONS)
dnl obsolete macro - provided to keep things going
USE_RTTI=
AC_SUBST(USE_RTTI)
case "$host" in
*-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
*-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
*-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
*-*-solaris*)
if test "$GXX" = yes; then
libstdcpp=`$CXX -print-file-name=libstdc++.so`
if test ! -f $libstdcpp; then
AC_MSG_ERROR([You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so])
fi
fi
;;
esac
AC_VALIDIFY_CXXFLAGS
AC_PROG_CXXCPP
# the following is to allow programs, that are known to
# have problems when compiled with -O2
if test -n "$CXXFLAGS"; then
kde_safe_IFS=$IFS
IFS=" "
NOOPT_CXXFLAGS=""
for i in $CXXFLAGS; do
case $i in
-O*)
;;
*)
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS $i"
;;
esac
done
IFS=$kde_safe_IFS
fi
if test -n "$CFLAGS"; then
kde_safe_IFS=$IFS
IFS=" "
NOOPT_CFLAGS=""
for i in $CFLAGS; do
case $i in
-O*)
;;
*)
NOOPT_CFLAGS="$NOOPT_CFLAGS $i"
;;
esac
done
IFS=$kde_safe_IFS
fi
if test "x$kde_use_qt_emb" = "xyes"; then
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS -fno-rtti -DQWS"
fi
AC_SUBST(NOOPT_CXXFLAGS)
AC_SUBST(NOOPT_CFLAGS)
KDE_CHECK_FINAL
ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
KDE_CXXFLAGS=
AC_SUBST(KDE_CXXFLAGS)
])
AC_DEFUN(KDE_ADD_DEPENDENCIES,
[
[A]M_DEPENDENCIES(CC)
[A]M_DEPENDENCIES(CXX)
])
dnl just a wrapper to clean up configure.in
AC_DEFUN(KDE_PROG_LIBTOOL,
[
AC_REQUIRE([AC_CHECK_COMPILERS])
AC_REQUIRE([AC_ENABLE_SHARED])
AC_REQUIRE([AC_ENABLE_STATIC])
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
AC_LANG_SAVE
AC_LANG_C
AC_OBJEXT
AC_EXEEXT
AC_LANG_RESTORE
AM_PROG_LIBTOOL
AC_LIBTOOL_CXX
LIBTOOL_SHELL="/bin/sh ./libtool"
# LIBTOOL="$LIBTOOL --silent"
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
AC_SUBST(KDE_PLUGIN)
])
AC_DEFUN(KDE_CHECK_TYPES,
[ AC_CHECK_SIZEOF(int, 4)dnl
AC_CHECK_SIZEOF(long, 4)dnl
AC_CHECK_SIZEOF(char *, 4)dnl
AC_CHECK_SIZEOF(char, 1)dnl
])dnl
AC_DEFUN(KDE_DO_IT_ALL,
[
AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM
AM_INIT_AUTOMAKE($1, $2)
AM_DISABLE_LIBRARIES
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
AC_CHECK_COMPILERS
KDE_PROG_LIBTOOL
AM_KDE_WITH_NLS
AC_PATH_KDE
])
AC_DEFUN(AC_CHECK_RPATH,
[
AC_MSG_CHECKING(for rpath)
AC_ARG_ENABLE(rpath,
[ --disable-rpath do not use the rpath feature of ld],
USE_RPATH=$enableval, USE_RPATH=yes)
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
KDE_RPATH="-R \$(kde_libraries)"
if test -n "$qt_libraries"; then
KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
fi
dnl $x_libraries is set to /usr/lib in case
if test -n "$X_LDFLAGS"; then
KDE_RPATH="$KDE_RPATH -R \$(x_libraries)"
fi
if test -n "$KDE_EXTRA_RPATH"; then
KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
fi
fi
AC_SUBST(KDE_EXTRA_RPATH)
AC_SUBST(KDE_RPATH)
AC_MSG_RESULT($USE_RPATH)
])
dnl Check for the type of the third argument of getsockname
AC_DEFUN(AC_CHECK_SOCKLEN_T, [
AC_MSG_CHECKING(for socklen_t)
AC_CACHE_VAL(ac_cv_socklen_t, [
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([
#include
#include
],[
socklen_t a=0;
getsockname(0,(struct sockaddr*)0, &a);
],
ac_cv_socklen_t=socklen_t,
AC_TRY_COMPILE([
#include
#include
],[
int a=0;
getsockname(0,(struct sockaddr*)0, &a);
],
ac_cv_socklen_t=int,
ac_cv_socklen_t=size_t
)
)
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_socklen_t)
if test "$ac_cv_socklen_t" != "socklen_t"; then
AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
[Define the real type of socklen_t])
fi
AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
])
dnl This is a merge of some macros out of the gettext aclocal.m4
dnl since we don't need anything, I took the things we need
dnl the copyright for them is:
dnl >
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
dnl This Makefile.in is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE.
dnl >
dnl for this file it is relicensed under LGPL
AC_DEFUN(AM_KDE_WITH_NLS,
[
dnl If we use NLS figure out what method
AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
[test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
GMSGFMT=":"
fi
MSGFMT=$GMSGFMT
AC_SUBST(GMSGFMT)
AC_SUBST(MSGFMT)
AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
dnl Test whether we really found GNU xgettext.
if test "$XGETTEXT" != ":"; then
dnl If it is no GNU xgettext we define it as : so that the
dnl Makefiles still can work.
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
: ;
else
AC_MSG_RESULT(
[found xgettext programs is not GNU xgettext; ignore it])
XGETTEXT=":"
fi
fi
AC_SUBST(XGETTEXT)
])
# Search path for a program which passes the given test.
# Ulrich Drepper , 1996.
# serial 1
# Stephan Kulow: I appended a _KDE against name conflicts
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
AC_DEFUN(AM_PATH_PROG_WITH_TEST_KDE,
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
AC_MSG_CHECKING([for $ac_word])
AC_CACHE_VAL(ac_cv_path_$1,
[case "[$]$1" in
/*)
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in ifelse([$5], , $PATH, [$5]); do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if [$3]; then
ac_cv_path_$1="$ac_dir/$ac_word"
break
fi
fi
done
IFS="$ac_save_ifs"
dnl If no 4th arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
])dnl
;;
esac])dnl
$1="$ac_cv_path_$1"
if test -n "[$]$1"; then
AC_MSG_RESULT([$]$1)
else
AC_MSG_RESULT(no)
fi
AC_SUBST($1)dnl
])
# Check whether LC_MESSAGES is available in .
# Ulrich Drepper , 1995.
# serial 1
AC_DEFUN(AM_LC_MESSAGES,
[if test $ac_cv_header_locale_h = yes; then
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include ], [return LC_MESSAGES],
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
if test $am_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
fi
fi])
dnl From Jim Meyering.
dnl FIXME: migrate into libit.
AC_DEFUN([AM_FUNC_OBSTACK],
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
[AC_TRY_LINK([#include "obstack.h"],
[struct obstack *mem;obstack_free(mem,(char *) 0)],
am_cv_func_obstack=yes,
am_cv_func_obstack=no)])
if test $am_cv_func_obstack = yes; then
AC_DEFINE(HAVE_OBSTACK)
else
LIBOBJS="$LIBOBJS obstack.o"
fi
])
dnl From Jim Meyering. Use this if you use the GNU error.[ch].
dnl FIXME: Migrate into libit
AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
[AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
am_cv_lib_error_at_line=yes,
am_cv_lib_error_at_line=no)])
if test $am_cv_lib_error_at_line = no; then
LIBOBJS="$LIBOBJS error.o"
fi
AC_SUBST(LIBOBJS)dnl
])
# Macro to add for using GNU gettext.
# Ulrich Drepper , 1995.
# serial 1
# Stephan Kulow: I put a KDE in it to avoid name conflicts
AC_DEFUN(AM_KDE_GNU_GETTEXT,
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
AC_REQUIRE([AC_TYPE_OFF_T])dnl
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
AC_REQUIRE([AC_FUNC_MMAP])dnl
AC_REQUIRE([AM_KDE_WITH_NLS])dnl
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h string.h values.h alloca.h])
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
__argz_count __argz_stringify __argz_next])
AC_MSG_CHECKING(for stpcpy)
AC_CACHE_VAL(kde_cv_func_stpcpy,
[
kde_safe_cxxflags=$CXXFLAGS
CXXFLAGS="-Wmissing-prototypes -Werror"
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([
#include
],
[
char buffer[200];
stpcpy(buffer, buffer);
],
kde_cv_func_stpcpy=yes,
kde_cv_func_stpcpy=no)
AC_LANG_RESTORE
CXXFLAGS=$kde_safe_cxxflags
])
AC_MSG_RESULT($kde_cv_func_stpcpy)
if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
fi
AM_LC_MESSAGES
if test "x$CATOBJEXT" != "x"; then
if test "x$ALL_LINGUAS" = "x"; then
LINGUAS=
else
AC_MSG_CHECKING(for catalogs to be installed)
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
esac
done
LINGUAS=$NEW_LINGUAS
AC_MSG_RESULT($LINGUAS)
fi
dnl Construct list of names of catalog files to be constructed.
if test -n "$LINGUAS"; then
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
fi
fi
])
AC_DEFUN(AC_HAVE_XPM,
[AC_REQUIRE_CPP()dnl
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
test -z "$XPM_INCLUDE" && XPM_INCLUDE=
AC_ARG_WITH(xpm, [ --without-xpm disable color pixmap XPM tests],
xpm_test=$withval, xpm_test="yes")
if test "x$xpm_test" = xno; then
ac_cv_have_xpm=no
else
AC_MSG_CHECKING(for XPM)
AC_CACHE_VAL(ac_cv_have_xpm,
[
AC_LANG_C
ac_save_ldflags="$LDFLAGS"
ac_save_cflags="$CFLAGS"
if test "x$kde_use_qt_emb" != "xyes"; then
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
else
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
fi
CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
AC_TRY_LINK([#include ],[],
ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
LDFLAGS="$ac_save_ldflags"
CFLAGS="$ac_save_cflags"
])dnl
if test "$ac_cv_have_xpm" = no; then
AC_MSG_RESULT(no)
XPM_LDFLAGS=""
XPMINC=""
$2
else
AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
if test "$XPM_LDFLAGS" = ""; then
XPMLIB='-lXpm $(LIB_X11)'
else
XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
fi
if test "$XPM_INCLUDE" = ""; then
XPMINC=""
else
XPMINC="-I$XPM_INCLUDE"
fi
AC_MSG_RESULT(yes)
$1
fi
fi
AC_SUBST(XPMINC)
AC_SUBST(XPMLIB)
])
AC_DEFUN(AC_HAVE_DPMS,
[AC_REQUIRE_CPP()dnl
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
DPMS_LIB=
AC_ARG_WITH(dpms, [ --without-dpms disable DPMS power saving],
dpms_test=$withval, dpms_test="yes")
if test "x$dpms_test" = xno; then
ac_cv_have_dpms=no
else
AC_MSG_CHECKING(for DPMS)
dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
AC_CACHE_VAL(ac_cv_have_dpms,
[
if test "x$kde_use_qt_emb" = "xyes"; then
AC_MSG_RESULT(no)
ac_cv_have_dpms="no"
else
AC_LANG_C
ac_save_ldflags="$LDFLAGS"
ac_save_cflags="$CFLAGS"
ac_save_libs="$LIBS"
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
CFLAGS="$CFLAGS $X_INCLUDES"
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
AC_TRY_LINK([
#include
#include
#include
#include
int foo_test_dpms()
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
ac_cv_have_dpms="yes", [
LDFLAGS="$ac_save_ldflags"
CFLAGS="$ac_save_cflags"
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
LIBS="$LIBS -lXdpms"
CFLAGS="$CFLAGS $X_INCLUDES"
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
AC_TRY_LINK([
#include
#include
#include
#include
int foo_test_dpms()
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
[
ac_cv_have_dpms="-lXdpms"
],ac_cv_have_dpms="no")
])
LDFLAGS="$ac_save_ldflags"
CFLAGS="$ac_save_cflags"
LIBS="$ac_save_libs"
fi
])dnl
if test "$ac_cv_have_dpms" = no; then
AC_MSG_RESULT(no)
DPMS_LDFLAGS=""
DPMSINC=""
$2
else
AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
if test "$ac_cv_have_dpms" = "-lXdpms"; then
DPMS_LIB="-lXdpms"
fi
if test "$DPMS_LDFLAGS" = ""; then
DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
else
DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
fi
if test "$DPMS_INCLUDE" = ""; then
DPMSINC=""
else
DPMSINC="-I$DPMS_INCLUDE"
fi
AC_MSG_RESULT(yes)
$1
fi
fi
AC_SUBST(DPMSINC)
AC_SUBST(DPMSLIB)
])
AC_DEFUN(AC_HAVE_GL,
[AC_REQUIRE_CPP()dnl
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
test -z "$GL_LDFLAGS" && GL_LDFLAGS=
test -z "$GL_INCLUDE" && GL_INCLUDE=
AC_ARG_WITH(gl, [ --without-gl disable 3D GL modes],
gl_test=$withval, gl_test="yes")
if test "x$kde_use_qt_emb" = "xyes"; then
# GL and Qt Embedded is a no-go for now.
ac_cv_have_gl=no
elif test "x$gl_test" = xno; then
ac_cv_have_gl=no
else
AC_MSG_CHECKING(for GL)
AC_CACHE_VAL(ac_cv_have_gl,
[
AC_LANG_C
ac_save_ldflags="$LDFLAGS"
ac_save_cflags="$CFLAGS"
LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
CFLAGS="$CFLAGS $X_INCLUDES"
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
AC_TRY_LINK([#include
#include
], [],
ac_cv_have_gl="mesa", ac_cv_have_gl="no")
if test "x$ac_cv_have_gl" = "xno"; then
LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGL -lGLU"
test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
CFLAGS="$ac_save_cflags $X_INCLUDES"
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
AC_TRY_LINK([#include
#include
], [],
ac_cv_have_gl="yes", ac_cv_have_gl="no")
fi
LDFLAGS="$ac_save_ldflags"
CFLAGS="$ac_save_cflags"
])dnl
if test "$ac_cv_have_gl" = "no"; then
AC_MSG_RESULT(no)
GL_LDFLAGS=""
GLINC=""
$2
else
AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
if test "$GL_LDFLAGS" = ""; then
if test "$ac_cv_have_gl" = "mesa"; then
GLLIB='-lMesaGL -lMesaGLU $(LIB_X11)'
else
GLLIB='-lGL -lGLU $(LIB_X11)'
fi
else
if test "$ac_cv_have_gl" = "mesa"; then
GLLIB="$GL_LDFLAGS -lMesaGL -lMesaGLU "'$(LIB_X11)'
else
GLLIB="$GL_LDFLAGS -lGL -lGLU "'$(LIB_X11)'
fi
fi
if test "$GL_INCLUDE" = ""; then
GLINC=""
else
GLINC="-I$GL_INCLUDE"
fi
AC_MSG_RESULT($ac_cv_have_gl)
$1
fi
fi
AC_SUBST(GLINC)
AC_SUBST(GLLIB)
])
dnl shadow password and PAM magic - maintained by ossi@kde.org
AC_DEFUN(KDE_PAM, [
AC_REQUIRE([KDE_CHECK_LIBDL])
AC_ARG_WITH(pam,
[ --with-pam[=ARG] enable support for PAM: ARG=[yes|no|service name]],
[ if test "x$withval" = "xyes"; then
use_pam=yes
pam_service=kde
elif test "x$withval" = "xno"; then
use_pam=no
else
use_pam=yes
pam_service=$withval
fi
ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
], [
AC_CACHE_VAL(ac_cv_path_pam,
[ use_pam=no
AC_CHECK_LIB(pam, pam_start,
[ AC_CHECK_HEADER(security/pam_appl.h,
[ use_pam=yes
pam_service=kde ])
], , $LIBDL)
ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
])
])
eval "$ac_cv_path_pam"
AC_MSG_CHECKING(for PAM)
if test "x$use_pam" = xno; then
AC_MSG_RESULT(no)
PAMLIBS=""
else
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
dnl test whether struct pam_message is const (Linux) or not (Sun)
AC_MSG_CHECKING(for const pam_message)
AC_EGREP_HEADER([struct pam_message], security/pam_appl.h,
[ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h,
[AC_MSG_RESULT([const: Linux-type PAM])],
[AC_MSG_RESULT([nonconst: Sun-type PAM])
AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
)],
[AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
fi
AC_SUBST(PAMLIBS)
])
dnl DEF_PAM_SERVICE(arg name, full name, define name)
AC_DEFUN(DEF_PAM_SERVICE, [
AC_ARG_WITH($1-pam,
[ --with-$1-pam=[val] override PAM service from --with-pam for $2],
[ if test "x$use_pam" = xyes; then
$3_PAM_SERVICE="$withval"
else
AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
You may want to enforce it by using --with-pam.])
fi
],
[ if test "x$use_pam" = xyes; then
$3_PAM_SERVICE="$pam_service"
fi
])
if test -n "$$3_PAM_SERVICE"; then
AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
fi
AC_SUBST($3_PAM_SERVICE)
])
AC_DEFUN(KDE_SHADOWPASSWD, [
AC_REQUIRE([KDE_PAM])
AC_CHECK_LIB(shadow, getspent,
[ LIBSHADOW="-lshadow"
ac_use_shadow=yes
],
[ dnl for UnixWare
AC_CHECK_LIB(gen, getspent,
[ LIBGEN="-lgen"
ac_use_shadow=yes
],
[ AC_CHECK_FUNC(getspent,
[ ac_use_shadow=yes ],
[ ac_use_shadow=no ])
])
])
AC_SUBST(LIBSHADOW)
AC_SUBST(LIBGEN)
AC_MSG_CHECKING([for shadow passwords])
AC_ARG_WITH(shadow,
[ --with-shadow If you want shadow password support ],
[ if test "x$withval" != "xno"; then
use_shadow=yes
else
use_shadow=no
fi
], [
use_shadow="$ac_use_shadow"
])
if test "x$use_shadow" = xyes; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
else
AC_MSG_RESULT(no)
LIBSHADOW=
LIBGEN=
fi
dnl finally make the relevant binaries setuid root, if we have shadow passwds.
dnl this still applies, if we could use it indirectly through pam.
if test "x$use_shadow" = xyes ||
( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
case $host in
*-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
SETUIDFLAGS="-m 4755 -o root";;
*)
SETUIDFLAGS="-m 4755";;
esac
fi
AC_SUBST(SETUIDFLAGS)
])
AC_DEFUN(KDE_PASSWDLIBS, [
AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
AC_REQUIRE([KDE_PAM])
AC_REQUIRE([KDE_SHADOWPASSWD])
if test "x$use_pam" = "xyes"; then
PASSWDLIBS="$PAMLIBS"
else
PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
fi
dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires
dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
dnl may need to read /etc/master.passwd).
case $host in
*-*-freebsd*)
SETUIDFLAGS="-m 4755 -o root"
;;
*)
;;
esac
AC_SUBST(PASSWDLIBS)
])
AC_DEFUN(KDE_CHECK_LIBDL,
[
AC_CHECK_LIB(dl, dlopen, [
LIBDL="-ldl"
ac_cv_have_dlfcn=yes
])
AC_CHECK_LIB(dld, shl_unload, [
LIBDL="-ldld"
ac_cv_have_shload=yes
])
AC_SUBST(LIBDL)
])
AC_DEFUN(KDE_CHECK_DLOPEN,
[
KDE_CHECK_LIBDL
AC_CHECK_HEADERS(dlfcn.h dl.h)
if test "$ac_cv_header_dlfcn_h" = "no"; then
ac_cv_have_dlfcn=no
fi
if test "$ac_cv_header_dl_h" = "no"; then
ac_cv_have_shload=no
fi
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
dnl (MM)
AC_ARG_ENABLE(dlopen,
[ --disable-dlopen link statically [default=no]] ,
enable_dlopen=$enableval,
enable_dlopen=yes)
# override the user's opinion, if we know it better ;)
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
enable_dlopen=no
fi
if test "$ac_cv_have_dlfcn" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
fi
if test "$ac_cv_have_shload" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
fi
if test "$enable_dlopen" = no ; then
test -n "$1" && eval $1
else
test -n "$2" && eval $2
fi
])
AC_DEFUN(KDE_CHECK_DYNAMIC_LOADING,
[
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
KDE_PROG_LIBTOOL
AC_MSG_CHECKING([dynamic loading])
eval "`egrep '^build_libtool_libs=' libtool`"
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
dynamic_loading=yes
AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
else
dynamic_loading=no
fi
AC_MSG_RESULT($dynamic_loading)
if test "$dynamic_loading" = "yes"; then
$1
else
$2
fi
])
AC_DEFUN(KDE_ADD_INCLUDES,
[
if test -z "$1"; then
test_include="Pix.h"
else
test_include="$1"
fi
AC_MSG_CHECKING([for libg++ ($test_include)])
AC_CACHE_VAL(kde_cv_libgpp_includes,
[
kde_cv_libgpp_includes=no
for ac_dir in \
\
/usr/include/g++ \
/usr/include \
/usr/unsupported/include \
/opt/include \
$extra_include \
; \
do
if test -r "$ac_dir/$test_include"; then
kde_cv_libgpp_includes=$ac_dir
break
fi
done
])
AC_MSG_RESULT($kde_cv_libgpp_includes)
if test "$kde_cv_libgpp_includes" != "no"; then
all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
fi
])
])
AC_DEFUN(KDE_CHECK_MICO,
[
AC_REQUIRE([KDE_CHECK_LIBDL])
AC_REQUIRE([KDE_MISC_TESTS])
AC_MSG_CHECKING(for MICO)
if test -z "$MICODIR"; then
kde_micodir=/usr/local
else
kde_micodir="$MICODIR"
fi
AC_ARG_WITH(micodir,
[ --with-micodir=micodir where mico is installed ],
kde_micodir=$withval,
kde_micodir=$kde_micodir
)
AC_CACHE_VAL(kde_cv_mico_incdir,
[
mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
])
kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
if test ! -r $kde_micodir/include/CORBA.h; then
AC_MSG_ERROR([No CORBA.h found, specify another micodir])
fi
AC_MSG_RESULT($kde_micodir)
MICO_INCLUDES=-I$kde_micodir/include
AC_SUBST(MICO_INCLUDES)
MICO_LDFLAGS=-L$kde_micodir/lib
AC_SUBST(MICO_LDFLAGS)
micodir=$kde_micodir
AC_SUBST(micodir)
AC_MSG_CHECKING([for MICO version])
AC_CACHE_VAL(kde_cv_mico_version,
[
AC_LANG_C
cat >conftest.$ac_ext <
#include
int main() {
printf("MICO_VERSION=%s\n",MICO_VERSION);
return (0);
}
EOF
ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
if AC_TRY_EVAL(ac_compile); then
if eval `./conftest 2>&5`; then
kde_cv_mico_version=$MICO_VERSION
else
AC_MSG_ERROR([your system is not able to execute a small application to
find MICO version! Check $kde_micodir/include/mico/version.h])
fi
else
AC_MSG_ERROR([your system is not able to compile a small application to
find MICO version! Check $kde_micodir/include/mico/version.h])
fi
])
dnl installed MICO version
mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
if test "x$1" = "x"; then
req_version="2.3.0"
else
req_version=$1
fi
dnl required MICO version
req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
if test "$mico_v_maj" -lt "$req_v_maj" || \
( test "$mico_v_maj" -eq "$req_v_maj" && \
test "$mico_v_mid" -lt "$req_v_mid" ) || \
( test "$mico_v_mid" -eq "$req_v_mid" && \
test "$mico_v_min" -lt "$req_v_min" )
then
AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
at least is required. You should upgrade MICO.])
else
AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
fi
LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
AC_SUBST(LIBMICO)
if test -z "$IDL"; then
IDL='$(kde_bindir)/cuteidl'
fi
AC_SUBST(IDL)
IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
AC_SUBST(IDL_DEPENDENCIES)
idldir="\$(includedir)/idl"
AC_SUBST(idldir)
])
AC_DEFUN(KDE_CHECK_MINI_STL,
[
AC_REQUIRE([KDE_CHECK_MICO])
AC_MSG_CHECKING(if we use mico's mini-STL)
AC_CACHE_VAL(kde_cv_have_mini_stl,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
kde_save_cxxflags="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
AC_TRY_COMPILE(
[
#include
],
[
#ifdef HAVE_MINI_STL
#error "nothing"
#endif
],
kde_cv_have_mini_stl=no,
kde_cv_have_mini_stl=yes)
CXXFLAGS="$kde_save_cxxflags"
AC_LANG_RESTORE
])
if test "x$kde_cv_have_mini_stl" = "xyes"; then
AC_MSG_RESULT(yes)
$1
else
AC_MSG_RESULT(no)
$2
fi
])
])
AC_DEFUN(KDE_CHECK_LIBPTHREAD,
[
AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
AC_SUBST(LIBPTHREAD)
])
AC_DEFUN(KDE_CHECK_PTHREAD_OPTION,
[
AC_ARG_ENABLE(kernel-threads, [ --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.],
kde_use_kernthreads=$enableval, kde_use_kernthreads=no)
if test "$kde_use_kernthreads" = "yes"; then
ac_save_CXXFLAGS="$CXXFLAGS"
ac_save_CFLAGS="$CXXFLAGS"
CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h)
CXXFLAGS="$ac_save_CXXFLAGS"
CFLAGS="$ac_save_CFLAGS"
if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
kde_use_kernthreads=no
else
dnl Add proper -I and -l statements
AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD
if test "x$LIBPTHREAD" = "x"; then
kde_use_kernthreads=no
else
USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
fi
fi
else
USE_THREADS=""
if test -z "$LIBPTHREAD"; then
KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] )
fi
fi
case $host_os in
solaris*)
KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
;;
freebsd*)
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
;;
aix*)
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
LIBPTHREAD="$LIBPTHREAD -lc_r"
;;
linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
if test "$CXX" = "KCC"; then
CXXFLAGS="$CXXFLAGS --thread_safe"
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
fi
;;
*)
;;
esac
AC_SUBST(USE_THREADS)
AC_SUBST(LIBPTHREAD)
])
AC_DEFUN(KDE_CHECK_THREADING,
[
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
dnl default is yes if libpthread is found and no if no libpthread is available
if test -z "$LIBPTHREAD"; then
if test -z "$USE_THREADS"; then
kde_check_threading_default=no
else
kde_check_threading_default=yes
fi
else
kde_check_threading_default=yes
fi
AC_ARG_ENABLE(threading, [ --disable-threading disables threading even if libpthread found ],
kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
if test "x$kde_use_threading" = "xyes"; then
AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
fi
])
AC_DEFUN(KDE_TRY_LINK_PYTHON,
[
if test "$kde_python_link_found" = no; then
if test "$1" = normal; then
AC_MSG_CHECKING(if a Python application links)
else
AC_MSG_CHECKING(if Python depends on $2)
fi
AC_CACHE_VAL(kde_cv_try_link_python_$1,
[
AC_LANG_SAVE
AC_LANG_C
kde_save_cflags="$CFLAGS"
CFLAGS="$CFLAGS $PYTHONINC"
kde_save_libs="$LIBS"
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
kde_save_ldflags="$LDFLAGS"
LDFLAGS="$LDFLAGS $PYTHONLIB"
AC_TRY_LINK(
[
#include
],[
PySys_SetArgv(1, 0);
],
[kde_cv_try_link_python_$1=yes],
[kde_cv_try_link_python_$1=no]
)
CFLAGS="$kde_save_cflags"
LIBS="$kde_save_libs"
LDFLAGS="$kde_save_ldflags"
])
if test "$kde_cv_try_link_python_$1" = "yes"; then
AC_MSG_RESULT(yes)
kde_python_link_found=yes
if test ! "$1" = normal; then
LIBPYTHON="$LIBPYTHON $2"
fi
$3
else
AC_MSG_RESULT(no)
$4
fi
AC_LANG_RESTORE
fi
])
AC_DEFUN(KDE_CHECK_PYTHON_DIR,
[
AC_MSG_CHECKING([for Python directory])
AC_CACHE_VAL(kde_cv_pythondir,
[
if test -z "$PYTHONDIR"; then
kde_cv_pythondir=/usr/local
else
kde_cv_pythondir="$PYTHONDIR"
fi
])
AC_ARG_WITH(pythondir,
[ --with-pythondir=pythondir use python installed in pythondir ],
[
ac_python_dir=$withval
], ac_python_dir=$kde_cv_pythondir
)
AC_MSG_RESULT($ac_python_dir)
])
AC_DEFUN(KDE_CHECK_PYTHON_INTERN,
[
AC_REQUIRE([KDE_CHECK_LIBDL])
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
if test -z "$1"; then
version="1.5"
else
version="$1"
fi
AC_MSG_CHECKING([for Python$version])
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
if test ! -r $python_incdir/Python.h; then
AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
python_incdir=$python_incdir/python$version
if test ! -r $python_incdir/Python.h; then
python_incdir=no
fi
fi
PYTHONINC=-I$python_incdir
python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
if test ! -r $python_libdir/libpython$version.a; then
AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
python_libdir=$python_libdir/python$version/config
if test ! -r $python_libdir/libpython$version.a; then
python_libdir=no
fi
fi
PYTHONLIB=-L$python_libdir
kde_orig_LIBPYTHON=$LIBPYTHON
if test -z "$LIBPYTHON"; then
LIBPYTHON=-lpython$version
fi
python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
python_moddir=$python_moddir/python$version
if test ! -r $python_moddir/copy.py; then
python_moddir=no
fi
PYTHONMODDIR=$python_moddir
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then
LIBPYTHON=$kde_orig_LIBPYTHON
test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
$2
else
dnl Note: this test is very weak
kde_python_link_found=no
KDE_TRY_LINK_PYTHON(normal)
KDE_TRY_LINK_PYTHON(m, -lm)
KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
KDE_TRY_LINK_PYTHON(tcl, -ltcl)
KDE_TRY_LINK_PYTHON(db2, -ldb2)
KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
[AC_MSG_WARN([it seems, Python depends on another library.
Pleae set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
and contact the authors to let them know about this problem])
])
LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
AC_SUBST(PYTHONINC)
AC_SUBST(PYTHONLIB)
AC_SUBST(LIBPYTHON)
AC_SUBST(PYTHONMODDIR)
AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
fi
])
AC_DEFUN(KDE_CHECK_PYTHON,
[
KDE_CHECK_PYTHON_INTERN("2.1", [KDE_CHECK_PYTHON_INTERN("2.0",
[ KDE_CHECK_PYTHON_INTERN($1, $2) ])
])
])
AC_DEFUN(KDE_CHECK_STL_SGI,
[
AC_MSG_CHECKING([if STL implementation is SGI like])
AC_CACHE_VAL(kde_cv_stl_type_sgi,
[
AC_TRY_COMPILE([
#include
using namespace std;
],[
string astring="Hallo Welt.";
astring.erase(0, 6); // now astring is "Welt"
return 0;
], kde_cv_stl_type_sgi=yes,
kde_cv_stl_type_sgi=no)
])
AC_MSG_RESULT($kde_cv_stl_type_sgi)
if test "$kde_cv_stl_type_sgi" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
fi
])
AC_DEFUN(KDE_CHECK_STL_HP,
[
AC_MSG_CHECKING([if STL implementation is HP like])
AC_CACHE_VAL(kde_cv_stl_type_hp,
[
AC_TRY_COMPILE([
#include
using namespace std;
],[
string astring="Hello World";
astring.remove(0, 6); // now astring is "World"
return 0;
], kde_cv_stl_type_hp=yes,
kde_cv_stl_type_hp=no)
])
AC_MSG_RESULT($kde_cv_stl_type_hp)
if test "$kde_cv_stl_type_hp" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
fi
])
AC_DEFUN(KDE_CHECK_STL,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
KDE_CHECK_STL_SGI
if test "$kde_cv_stl_type_sgi" = "no"; then
KDE_CHECK_STL_HP
if test "$kde_cv_stl_type_hp" = "no"; then
AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?")
fi
fi
CXXFLAGS="$ac_save_CXXFLAGS"
AC_LANG_RESTORE
])
AC_DEFUN(AC_FIND_QIMGIO,
[AC_REQUIRE([AC_FIND_JPEG])
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
AC_MSG_CHECKING([for qimgio])
AC_CACHE_VAL(ac_cv_lib_qimgio,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_save_LIBS="$LIBS"
ac_save_CXXFLAGS="$CXXFLAGS"
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
AC_TRY_RUN(dnl
[
#include
#include
int main() {
QString t = "hallo";
t.fill('t');
qInitImageIO();
}
],
ac_cv_lib_qimgio=yes,
ac_cv_lib_qimgio=no,
ac_cv_lib_qimgio=no)
LIBS="$ac_save_LIBS"
CXXFLAGS="$ac_save_CXXFLAGS"
AC_LANG_RESTORE
])dnl
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
AC_SUBST(LIBQIMGIO)
else
AC_MSG_RESULT(not found)
fi
])
AC_DEFUN(KDE_CHECK_ANSI,
[
])
AC_DEFUN(KDE_CHECK_INSURE,
[
AC_ARG_ENABLE(insure, [ --enable-insure use insure++ for debugging [default=no]],
[
if test $enableval = "no"; dnl
then ac_use_insure="no"
else ac_use_insure="yes"
fi
], [ac_use_insure="no"])
AC_MSG_CHECKING(if we will use Insure++ to debug)
AC_MSG_RESULT($ac_use_insure)
if test "$ac_use_insure" = "yes"; dnl
then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
fi
])
AC_DEFUN(AM_DISABLE_LIBRARIES,
[
AC_PROVIDE([AM_ENABLE_STATIC])
AC_PROVIDE([AM_ENABLE_SHARED])
enable_static=no
enable_shared=yes
])
AC_DEFUN(AC_CHECK_UTMP_FILE,
[
AC_MSG_CHECKING([for utmp file])
AC_CACHE_VAL(kde_cv_utmp_file,
[
kde_cv_utmp_file=no
for ac_file in \
\
/var/run/utmp \
/var/adm/utmp \
/etc/utmp \
; \
do
if test -r "$ac_file"; then
kde_cv_utmp_file=$ac_file
break
fi
done
])
if test "$kde_cv_utmp_file" != "no"; then
AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
$1
AC_MSG_RESULT($kde_cv_utmp_file)
else
$2
AC_MSG_RESULT([non found])
fi
])
AC_DEFUN(KDE_CREATE_SUBDIRSLIST,
[
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
if test ! -s $srcdir/subdirs; then
dnl Note: Makefile.common creates subdirs, so this is just a fallback
TOPSUBDIRS=""
files=`cd $srcdir && ls -1`
dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
for i in $dirs; do
echo $i >> $srcdir/subdirs
done
fi
if test -s $srcdir/inst-apps; then
ac_topsubdirs="`cat $srcdir/inst-apps`"
else
ac_topsubdirs="`cat $srcdir/subdirs`"
fi
for i in $ac_topsubdirs; do
AC_MSG_CHECKING([if $i should be compiled])
if test -d $srcdir/$i; then
install_it="yes"
for j in $DO_NOT_COMPILE; do
if test $i = $j; then
install_it="no"
fi
done
else
install_it="no"
fi
AC_MSG_RESULT($install_it)
if test $install_it = "yes"; then
TOPSUBDIRS="$TOPSUBDIRS $i"
fi
done
AC_SUBST(TOPSUBDIRS)
])
AC_DEFUN(KDE_CHECK_NAMESPACES,
[
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([
],
[
namespace Foo {
extern int i;
namespace Bar {
extern int i;
}
}
int Foo::i = 0;
int Foo::Bar::i = 1;
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_NAMESPACES)
], [
AC_MSG_RESULT(no)
])
AC_LANG_RESTORE
])
AC_DEFUN(KDE_CHECK_NEWLIBS,
[
])
dnl ------------------------------------------------------------------------
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(AC_CHECK_S_ISSOCK,
[
AC_MSG_CHECKING(for S_ISSOCK)
AC_CACHE_VAL(ac_cv_have_s_issock,
[
AC_LANG_SAVE
AC_LANG_C
AC_TRY_LINK(
[
#include
],
[
struct stat buff;
int b = S_ISSOCK( buff.st_mode );
],
ac_cv_have_s_issock=yes,
ac_cv_have_s_issock=no)
AC_LANG_RESTORE
])
AC_MSG_RESULT($ac_cv_have_s_issock)
if test "$ac_cv_have_s_issock" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
fi
])
dnl ------------------------------------------------------------------------
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
dnl ------------------------------------------------------------------------
dnl
AC_DEFUN(AC_CHECK_KDEMAXPATHLEN,
[
AC_MSG_CHECKING(for MAXPATHLEN)
AC_CACHE_VAL(ac_cv_maxpathlen,
[
AC_LANG_C
cat > conftest.$ac_ext <
#endif
#include
#include
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif
KDE_HELLO MAXPATHLEN
EOF
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
else
ac_cv_maxpathlen=1024
fi
rm conftest.*
])
AC_MSG_RESULT($ac_cv_maxpathlen)
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
])
dnl -------------------------------------------------------------------------
dnl See if the compiler supports a template repository bero@redhat.de
dnl -------------------------------------------------------------------------
AC_DEFUN(KDE_COMPILER_REPO,
[
REPO=""
NOREPO=""
KDE_CHECK_COMPILER_FLAG(frepo,
[
REPO="-frepo"
NOREPO="-fno-repo"
])
if test -z "$REPO"; then
KDE_CHECK_COMPILER_FLAG(instances=explicit,
[
REPO="-instances=explicit"
NOREPO="-instances=extern"
])
fi
if test -n "$REPO"; then
AC_DEFINE_UNQUOTED(HAVE_TEMPLATE_REPOSITORY, 1,
[C++ compiler supports template repository])
$1
fi
AC_SUBST(REPO)
AC_SUBST(NOREPO)
])
AC_DEFUN(KDE_CHECK_HEADER,
[
AC_LANG_SAVE
kde_safe_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $all_includes"
AC_LANG_CPLUSPLUS
AC_CHECK_HEADER($1, $2, $3)
CPPFLAGS=$kde_safe_cppflags
AC_LANG_RESTORE
])
AC_DEFUN(KDE_FAST_CONFIGURE,
[
dnl makes configure fast (needs perl)
AC_ARG_ENABLE(fast-perl, [ --disable-fast-perl disable fast Makefile generation (needs perl)],
with_fast_perl=$enableval, with_fast_perl=yes)
])
AC_DEFUN(KDE_CONF_FILES,
[
val=
if test -f $srcdir/configure.files ; then
val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
fi
CONF_FILES=
if test -n "$val" ; then
for i in $val ; do
CONF_FILES="$CONF_FILES $i"
done
fi
AC_SUBST(CONF_FILES)
])dnl
AC_DEFUN(KDE_SET_PREFIX,
[
unset CDPATH
dnl make $KDEDIR the default for the installation
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
if test "x$prefix" = "xNONE"; then
prefix=$ac_default_prefix
ac_configure_args="$ac_configure_args --prefix $prefix"
fi
KDE_FAST_CONFIGURE
KDE_CONF_FILES
])
pushdef([AC_PROG_INSTALL],
[
dnl our own version, testing for a -p flag
popdef([AC_PROG_INSTALL])
dnl as AC_PROG_INSTALL works as it works we first have
dnl to save if the user didn't specify INSTALL, as the
dnl autoconf one overwrites INSTALL and we have no chance to find
dnl out afterwards
test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
AC_PROG_INSTALL
if test -z "$kde_save_INSTALL_given" ; then
# OK, user hasn't given any INSTALL, autoconf found one for us
# now we test, if it supports the -p flag
AC_MSG_CHECKING(for -p flag to install)
rm -f confinst.$$.* > /dev/null 2>&1
echo "Testtest" > confinst.$$.orig
ac_res=no
if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
if test -f confinst.$$.new ; then
# OK, -p seems to do no harm to install
INSTALL="${INSTALL} -p"
ac_res=yes
fi
fi
rm -f confinst.$$.*
AC_MSG_RESULT($ac_res)
fi
dnl the following tries to resolve some signs and wonders coming up
dnl with different autoconf/automake versions
dnl e.g.:
dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
dnl install-@DIR@PROGRAMS targets to explicitly use that flag
dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
dnl INSTALL_SCRIPT, which breaks with automake <= 1.4
dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure
dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from
dnl automake (due to broken Makefile.am or whatever) to install programs,
dnl and so does not see the -s flag in automake > 1.4
dnl to clean up that mess we:
dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
dnl which cleans KDE's program with automake > 1.4;
dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
dnl with automake<=1.4
dnl note that dues to this sometimes two '-s' flags are used (if KDE
dnl properly uses install-@DIR@PROGRAMS, but I don't care
dnl
dnl And to all this comes, that I even can't write in comments variable
dnl names used by automake, because it is so stupid to think I wanted to
dnl _use_ them, therefor I have written A_M_... instead of AM_
dnl hmm, I wanted to say something ... ahh yes: Arghhh.
if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
fi
if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
INSTALL_SCRIPT='${INSTALL}'
fi
])dnl
AC_DEFUN(KDE_LANG_CPLUSPLUS,
[AC_LANG_CPLUSPLUS
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
])
pushdef([AC_LANG_CPLUSPLUS],
[popdef([AC_LANG_CPLUSPLUS])
KDE_LANG_CPLUSPLUS
])
AC_DEFUN(KDE_CHECK_LONG_LONG,
[
AC_MSG_CHECKING(for long long)
AC_CACHE_VAL(kde_cv_c_long_long,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_LINK([], [
long long foo = 0;
foo = foo+1;
],
kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
AC_LANG_RESTORE
])
AC_MSG_RESULT($kde_cv_c_long_long)
if test "$kde_cv_c_long_long" = yes; then
AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
fi
])
AC_DEFUN(KDE_CHECK_LIB,
[
kde_save_LIBS="$LIBS"
LIBS="$LIBS $all_libraries"
case $host_os in
aix*) LIBS="-brtl $LIBS"
test "$GCC" = yes && LIBS="-Wl,$LIBS"
;;
esac
AC_CHECK_LIB($1, $2, $3, $4, $5)
LIBS="$kde_save_LIBS"
])
AC_DEFUN(KDE_CHECK_INITGROUPS,
[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_CHECK_FUNCS(initgroups)
if test "x$ac_cv_func_initgroups" = "xyes"; then
case $host_os in
aix*) AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_MSG_CHECKING([for initgroups prototype])
AC_CACHE_VAL(kde_cv_check_initgroups_proto,
[ AC_TRY_COMPILE(
[ #include
],
[ char buffer[10];
gid_t id;
int x = initgroups(buffer,id);
],
kde_cv_check_initgroups_proto=yes,
kde_cv_check_initgroups_proto=no)
])
AC_MSG_RESULT($kde_cv_check_initgroups_proto)
AC_LANG_RESTORE
;;
*)
kde_cv_check_initgroups_proto=yes
;;
esac
else
kde_cv_check_initgroups_proto=no
fi
if test "x$kde_cv_check_initgroups_proto" = "xyes"; then
kde_check_initgroups_proto=1
else
kde_check_initgroups_proto=0
fi
AC_DEFINE_UNQUOTED(HAVE_INITGROUPS_PROTO,$kde_check_initgroups_proto,
[initgroups may exist but not its prototype (e.g. AIX<4.3.3:8)])
])
AC_DEFUN(KDE_CHECK_JAVA_DIR,
[
AC_MSG_CHECKING([for Java directory])
AC_ARG_WITH(java,
[ --with-java=javadir use java installed in javadir, --without-java disables ],
[ ac_java_dir=$withval
], ac_java_dir=""
)
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
if test "x$ac_java_dir" = xno; then
kde_cv_java_bindir=no
kde_cv_java_includedir=no
kde_java_libjvmdir=no
kde_java_libhpidir=no
else
if test "x$ac_java_dir" = x; then
dnl No option set -> look in $PATH
AC_CACHE_VAL(kde_cv_java_bindir,
[
dnl First look for javac in $PATH. If not found we'll look at the option.
KDE_FIND_PATH(javac, JAVAC, [], [])
if test -n "$JAVAC"; then
kde_cv_java_bindir=`echo $JAVAC | sed -e 's,/javac$,/,'`
dnl this substitution might not work - well, we test for jni.h below
kde_cv_java_includedir=`echo $kde_cv_java_bindir | sed -e 's,bin/$,include/,'`
else
kde_cv_java_bindir=no
fi
])
else
dnl config option set
kde_cv_java_bindir=$ac_java_dir/bin
kde_cv_java_includedir=$ac_java_dir/include
fi
fi
dnl At this point kde_cv_java_bindir and kde_cv_java_includedir are either set or "no"
if test ! "x$kde_cv_java_bindir" = xno; then
dnl Look for libjvm.so
kde_java_libjvmdir=`find $kde_cv_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
dnl Look for libhpi.so and avoid green threads
kde_java_libhpidir=`find $kde_cv_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,'`
dnl Now check everything's fine under there
if test ! -x "$kde_cv_java_bindir/javac"; then
AC_MSG_ERROR([javac not found under $kde_cv_java_bindir - it seems you passed a wrong --with-java.])
fi
if test ! -x "$kde_cv_java_bindir/javah"; then
AC_MSG_ERROR([javah not found under $kde_cv_java_bindir. javac was found though! Use --with-java or --without-java.])
fi
if test ! -x "$kde_cv_java_bindir/jar"; then
AC_MSG_ERROR([jar not found under $kde_cv_java_bindir. javac was found though! Use --with-java or --without-java.])
fi
if test ! -r "$kde_cv_java_includedir/jni.h"; then
AC_MSG_ERROR([jni.h not found under $kde_cv_java_includedir. Use --with-java or --without-java.])
fi
if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
fi
if test ! -r "$kde_java_libhpidir/libhpi.so"; then
AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
fi
jni_includes="-I$kde_cv_java_includedir"
dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
dnl and under linux here..
test -d "$kde_cv_java_includedir/linux" && jni_includes="$jni_includes -I$kde_cv_java_includedir/linux"
test -d "$kde_cv_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_cv_java_includedir/genunix"
dnl Check for JNI version
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_cxxflags_safe="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
AC_TRY_COMPILE([
#include
],
[
#ifndef JNI_VERSION_1_2
Syntax Error
#endif
],[ kde_jni_works=yes ],
[ kde_jni_works=no ])
if test $kde_jni_works = no; then
AC_MSG_ERROR([Incorrect version of $kde_cv_java_includedir/jni.h.
You need to have Java Development Kit (JDK) version 1.2.
Use --with-java to specify another location.
Use --without-java to configure without java support.
Or download a newer JDK and try again.
See e.g. http://java.sun.com/products/jdk/1.2 ])
fi
CXXFLAGS="$ac_cxxflags_safe"
AC_LANG_RESTORE
dnl All tests ok, inform and subst the variables
AC_MSG_RESULT([javac/javah/jar in $kde_cv_java_bindir, jni.h in $kde_cv_java_includedir])
JAVAC=$kde_cv_java_bindir/javac
AC_SUBST(JAVAC)
JAVAH=$kde_cv_java_bindir/javah
AC_SUBST(JAVAH)
JAR=$kde_cv_java_bindir/jar
AC_SUBST(JAR)
AC_SUBST(jni_includes)
JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_cv_java_libhpidir -lhpi"
AC_SUBST(JVMLIBS)
fi
])
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
dnl big packages, m4_foreach is dog-slow. So use our own version of
dnl it. (matz@kde.org)
m4_define([mm_foreach],
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
m4_define([mm_car], [[$1]])
m4_define([mm_car2], [[$@]])
m4_define([_mm_foreach],
[m4_if(m4_quote($2), [], [],
[m4_define([$1], [mm_car($2)])$3[]_mm_foreach([$1],
mm_car2(m4_shift($2)),
[$3])])])
m4_define([AC_FOREACH],
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
AC_DEFUN(KDE_NEED_FLEX,
[
AC_REQUIRE([AM_PROG_LEX])
if test -z "$LEXLIB"; then
AC_MSG_ERROR([You need to have flex installed.])
fi
AC_SUBST(LEXLIB)
])
AC_DEFUN(AC_PATH_QTOPIA,
[
dnl TODO: use AC_CACHE_VAL
if test -z "$1"; then
qtopia_minver_maj=1
qtopia_minver_min=5
qtopia_minver_pat=0
else
qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
fi
qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
AC_REQUIRE([AC_PATH_QT])
AC_MSG_CHECKING([for Qtopia])
LIB_QTOPIA="-lqpe"
AC_SUBST(LIB_QTOPIA)
kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
ac_qtopia_incdir=NO
AC_ARG_WITH(qtopia-dir,
[ --with-qtopia-dir=DIR where the root of Qtopia is installed ],
[ ac_qtopia_incdir="$withval"/include] )
qtopia_incdirs=""
for dir in $kde_qtopia_dirs; do
qtopia_incdirs="$qtopia_incdirs $dir/include"
done
if test ! "$ac_qtopia_incdir" = "NO"; then
qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
fi
qtopia_incdir=""
AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
ac_qtopia_incdir="$qtopia_incdir"
if test -z "$qtopia_incdir"; then
AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
fi
qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
if test "$qtopia_ver" -lt "$qtopia_minver"; then
AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
is required.])
fi
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_cxxflags_safe="$CXXFLAGS"
ac_ldflags_safe="$LDFLAGS"
ac_libs_safe="$LIBS"
CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
LIBS="$LIBS $LIB_QTOPIA $LIBQT"
cat > conftest.$ac_ext <
#include
int main( int argc, char **argv )
{
QPEApplication app( argc, argv );
return 0;
}
EOF
if AC_TRY_EVAL(ac_link) && test -s conftest; then
rm -f conftest*
else
rm -f conftest*
AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
the end of config.log])
fi
CXXFLAGS="$ac_cxxflags_safe"
LDFLAGS="$ac_ldflags_safe"
LIBS="$ac_libs_safe"
AC_LANG_RESTORE
QTOPIA_INCLUDES="-I$qtopia_incdir"
AC_SUBST(QTOPIA_INCLUDES)
AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
])
ed2k_hash-0.3.3/admin/mkinstalldirs 0000755 0001750 0001750 00000001332 07535440723 016243 0 ustar tiago tiago #! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman
# Created: 1993-05-16
# Public domain
# $Id: mkinstalldirs,v 1.1.1.1 2002/09/04 17:24:35 uberdork Exp $
errstatus=0
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# mkinstalldirs ends here
ed2k_hash-0.3.3/admin/install-sh 0000755 0001750 0001750 00000012736 07535440725 015455 0 ustar tiago tiago #!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# 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}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
chmodcmd=""
else
instcmd=mkdir
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -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 [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# 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 $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0
ed2k_hash-0.3.3/admin/ltmain.sh 0000644 0001750 0001750 00000454306 11257516374 015274 0 ustar tiago tiago # ltmain.sh - Provide generalized library-building support services.
# NOTE: Changing this file will not affect anything until you rerun ltconfig.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit , 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 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# 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.
# Check that we have a working $echo.
if test "X$1" = X--no-reexec; then
# Discard the --no-reexec flag, and continue.
shift
elif test "X$1" = X--fallback-echo; then
# Avoid inline document here, it may be left over
:
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
# Yippee, $echo works!
:
else
# Restart under the correct shell, and then maybe $echo will work.
exec $SHELL "$0" --no-reexec ${1+"$@"}
fi
if test "X$1" = X--fallback-echo; then
# used as fallback echo
shift
cat <&2
echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
exit 1
fi
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
echo "$modename: not configured to build any kind of library" 1>&2
echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
exit 1
fi
# Global variables.
mode=$default_mode
nonopt=
prev=
prevopt=
run=
show="$echo"
show_help=
execute_dlfiles=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
# Parse our command line options once, thoroughly.
while test $# -gt 0
do
arg="$1"
shift
case $arg in
-*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
# If the previous option needs an argument, assign it.
if test -n "$prev"; then
case $prev in
execute_dlfiles)
execute_dlfiles="$execute_dlfiles $arg"
;;
tag)
tagname="$arg"
# Check whether tagname contains only valid characters
case $tagname in
*[!-_A-Za-z0-9,/]*)
echo "$progname: invalid tag name: $tagname" 1>&2
exit 1
;;
esac
if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then
taglist="$taglist $tagname"
# Evaluate the configuration.
eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
else
echo "$progname: ignoring unknown tag $tagname" 1>&2
fi
;;
*)
eval "$prev=\$arg"
;;
esac
prev=
prevopt=
continue
fi
# Have we seen a non-optional argument yet?
case $arg in
--help)
show_help=yes
;;
--version)
echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
exit 0
;;
--config)
sed -n -e '/^### BEGIN LIBTOOL CONFIG/,/^### END LIBTOOL CONFIG/p' < "$0"
# Now print the configurations for the tags.
for tagname in $taglist; do
sed -n -e "/^### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0"
done
exit 0
;;
--debug)
echo "$progname: enabling shell trace mode"
set -x
;;
--dry-run | -n)
run=:
;;
--features)
echo "host: $host"
if test "$build_libtool_libs" = yes; then
echo "enable shared libraries"
else
echo "disable shared libraries"
fi
if test "$build_old_libs" = yes; then
echo "enable static libraries"
else
echo "disable static libraries"
fi
exit 0
;;
--finish) mode="finish" ;;
--mode) prevopt="--mode" prev=mode ;;
--mode=*) mode="$optarg" ;;
--quiet | --silent)
show=:
;;
--tag) prevopt="--tag" prev=tag ;;
--tag=*)
set tag "$optarg" ${1+"$@"}
shift
prev=tag
;;
-dlopen)
prevopt="-dlopen"
prev=execute_dlfiles
;;
-*)
$echo "$modename: unrecognized option \`$arg'" 1>&2
$echo "$help" 1>&2
exit 1
;;
*)
nonopt="$arg"
break
;;
esac
done
if test -n "$prevopt"; then
$echo "$modename: option \`$prevopt' requires an argument" 1>&2
$echo "$help" 1>&2
exit 1
fi
if test -z "$show_help"; then
# Infer the operation mode.
if test -z "$mode"; then
case $nonopt in
*cc | *++ | gcc* | *-gcc*)
mode=link
for arg
do
case $arg in
-c)
mode=compile
break
;;
esac
done
;;
*db | *dbx | *strace | *truss)
mode=execute
;;
*install*|cp|mv)
mode=install
;;
*rm)
mode=uninstall
;;
*)
# If we have no mode, but dlfiles were specified, then do execute mode.
test -n "$execute_dlfiles" && mode=execute
# Just use the default operation mode.
if test -z "$mode"; then
if test -n "$nonopt"; then
$echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
else
$echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
fi
fi
;;
esac
fi
# Only execute mode is allowed to have -dlopen flags.
if test -n "$execute_dlfiles" && test "$mode" != execute; then
$echo "$modename: unrecognized option \`-dlopen'" 1>&2
$echo "$help" 1>&2
exit 1
fi
# Change the help message to a mode-specific one.
generic_help="$help"
help="Try \`$modename --help --mode=$mode' for more information."
# These modes are in order of execution frequency so that they run quickly.
case $mode in
# libtool compile mode
compile)
modename="$modename: compile"
# Get the compilation command and the source file.
base_compile=
prev=
lastarg=
srcfile="$nonopt"
suppress_output=
user_target=no
for arg
do
case $prev in
"") ;;
xcompiler)
# Aesthetically quote the previous argument.
prev=
lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
# Double-quote args containing other shell metacharacters.
# Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately.
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
# Add the previous argument to base_compile.
if test -z "$base_compile"; then
base_compile="$lastarg"
else
base_compile="$base_compile $lastarg"
fi
continue
;;
esac
# Accept any command-line options.
case $arg in
-o)
if test "$user_target" != "no"; then
$echo "$modename: you cannot specify \`-o' more than once" 1>&2
exit 1
fi
user_target=next
;;
-static)
build_old_libs=yes
continue
;;
-prefer-pic)
pic_mode=yes
continue
;;
-prefer-non-pic)
pic_mode=no
continue
;;
-Xcompiler)
prev=xcompiler
continue
;;
-Wc,*)
args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
lastarg=
IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
for arg in $args; do
IFS="$save_ifs"
# Double-quote args containing other shell metacharacters.
# Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately.
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
lastarg="$lastarg $arg"
done
IFS="$save_ifs"
lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
# Add the arguments to base_compile.
if test -z "$base_compile"; then
base_compile="$lastarg"
else
base_compile="$base_compile $lastarg"
fi
continue
;;
esac
case $user_target in
next)
# The next one is the -o target name
user_target=yes
continue
;;
yes)
# We got the output file
user_target=set
libobj="$arg"
continue
;;
esac
# Accept the current argument as the source file.
lastarg="$srcfile"
srcfile="$arg"
# Aesthetically quote the previous argument.
# Backslashify any backslashes, double quotes, and dollar signs.
# These are the only characters that are still specially
# interpreted inside of double-quoted scrings.
lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
# Double-quote args containing other shell metacharacters.
# Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately.
case $lastarg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
lastarg="\"$lastarg\""
;;
esac
# Add the previous argument to base_compile.
if test -z "$base_compile"; then
base_compile="$lastarg"
else
base_compile="$base_compile $lastarg"
fi
done
case $user_target in
set)
;;
no)
# Get the name of the library object.
libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
;;
*)
$echo "$modename: you must specify a target with \`-o'" 1>&2
exit 1
;;
esac
# Recognize several different file suffixes.
# If the user specifies -o file.o, it is replaced with file.lo
xform='[cCFSfmso]'
case $libobj in
*.ada) xform=ada ;;
*.adb) xform=adb ;;
*.ads) xform=ads ;;
*.asm) xform=asm ;;
*.c++) xform=c++ ;;
*.cc) xform=cc ;;
*.class) xform=class ;;
*.cpp) xform=cpp ;;
*.cxx) xform=cxx ;;
*.f90) xform=f90 ;;
*.for) xform=for ;;
*.java) xform=java ;;
esac
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
case $libobj in
*.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
*)
$echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
exit 1
;;
esac
# Infer tagged configuration to use if any are available and
# if one wasn't chosen via the "--tag" command line option.
# Only attempt this if the compiler in the base compile
# command doesn't match the default compiler.
if test -n "$available_tags" && test -z "$tagname"; then
case $base_compile in
"$CC "*) ;;
# Blanks in the command may have been stripped by the calling shell,
# but not from the CC environment variable when ltconfig was run.
"`$echo $CC` "*) ;;
*)
for z in $available_tags; do
if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
# Evaluate the configuration.
eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
case $base_compile in
"$CC "*)
# The compiler in the base compile command matches
# the one in the tagged configuration.
# Assume this is the tagged configuration we want.
tagname=$z
break
;;
"`$echo $CC` "*)
tagname=$z
break
;;
esac
fi
done
# If $tagname still isn't set, then no tagged configuration
# was found and let the user know that the "--tag" command
# line option must be used.
if test -z "$tagname"; then
echo "$modename: unable to infer tagged configuration"
echo "$modename: specify a tag with \`--tag'" 1>&2
exit 1
# else
# echo "$modename: using $tagname tagged configuration"
fi
;;
esac
fi
objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$obj"; then
xdir=
else
xdir=$xdir/
fi
lobj=${xdir}$objdir/$objname
if test -z "$base_compile"; then
$echo "$modename: you must specify a compilation command" 1>&2
$echo "$help" 1>&2
exit 1
fi
# Delete any leftover library objects.
if test "$build_old_libs" = yes; then
removelist="$obj $lobj $libobj ${libobj}T"
else
removelist="$lobj $libobj ${libobj}T"
fi
$run $rm $removelist
trap "$run $rm $removelist; exit 1" 1 2 15
# On Cygwin there's no "real" PIC flag so we must build both object types
case $host_os in
cygwin* | mingw* | pw32* | os2*)
pic_mode=default
;;
esac
if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
# non-PIC code in shared libraries is not supported
pic_mode=default
fi
# Calculate the filename of the output object if compiler does
# not support -o with -c
if test "$compiler_c_o" = no; then
output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
lockfile="$output_obj.lock"
removelist="$removelist $output_obj $lockfile"
trap "$run $rm $removelist; exit 1" 1 2 15
else
output_obj=
need_locks=no
lockfile=
fi
# Lock this critical section if it is needed
# We use this script file to make the link, it avoids creating a new file
if test "$need_locks" = yes; then
until $run ln "$0" "$lockfile" 2>/dev/null; do
$show "Waiting for $lockfile to be removed"
sleep 2
done
elif test "$need_locks" = warn; then
if test -f "$lockfile"; then
echo "\
*** ERROR, $lockfile exists and contains:
`cat $lockfile 2>/dev/null`
This indicates that another process is trying to use the same
temporary object file, and libtool could not work around it because
your compiler does not support \`-c' and \`-o' together. If you
repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."
$run $rm $removelist
exit 1
fi
echo $srcfile > "$lockfile"
fi
if test -n "$fix_srcfile_path"; then
eval srcfile=\"$fix_srcfile_path\"
fi
$run $rm "$libobj" "${libobj}T"
# Create a libtool object file (analogous to a ".la" file),
# but don't create it if we're doing a dry run.
test -z "$run" && cat > ${libobj}T </dev/null`" != x"$srcfile"; then
echo "\
*** ERROR, $lockfile contains:
`cat $lockfile 2>/dev/null`
but it should contain:
$srcfile
This indicates that another process is trying to use the same
temporary object file, and libtool could not work around it because
your compiler does not support \`-c' and \`-o' together. If you
repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."
$run $rm $removelist
exit 1
fi
# Just move the object if needed, then go on to compile the next one
if test -n "$output_obj" && test "x$output_obj" != "x$lobj"; then
$show "$mv $output_obj $lobj"
if $run $mv $output_obj $lobj; then :
else
error=$?
$run $rm $removelist
exit $error
fi
fi
# Append the name of the PIC object to the libtool object file.
test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != x"$srcfile"; then
echo "\
*** ERROR, $lockfile contains:
`cat $lockfile 2>/dev/null`
but it should contain:
$srcfile
This indicates that another process is trying to use the same
temporary object file, and libtool could not work around it because
your compiler does not support \`-c' and \`-o' together. If you
repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."
$run $rm $removelist
exit 1
fi
# Just move the object if needed
if test -n "$output_obj" && test "x$output_obj" != "x$obj"; then
$show "$mv $output_obj $obj"
if $run $mv $output_obj $obj; then :
else
error=$?
$run $rm $removelist
exit $error
fi
fi
# Append the name of the non-PIC object the libtool object file.
# Only append if the libtool object file exists.
test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2
fi
if test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
else
if test -z "$pic_flag" && test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
fi
build_libtool_libs=no
build_old_libs=yes
prefer_static_libs=yes
break
;;
esac
done
# See if our shared archives depend on static archives.
test -n "$old_archive_from_new_cmds" && build_old_libs=yes
# Go through the arguments, transforming them on the way.
while test $# -gt 0; do
arg="$1"
base_compile="$base_compile $arg"
shift
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
;;
*) qarg=$arg ;;
esac
libtool_args="$libtool_args $qarg"
# If the previous option needs an argument, assign it.
if test -n "$prev"; then
case $prev in
output)
compile_command="$compile_command @OUTPUT@"
finalize_command="$finalize_command @OUTPUT@"
;;
esac
case $prev in
dlfiles|dlprefiles)
if test "$preload" = no; then
# Add the symbol object into the linking commands.
compile_command="$compile_command @SYMFILE@"
finalize_command="$finalize_command @SYMFILE@"
preload=yes
fi
case $arg in
*.la | *.lo) ;; # We handle these cases below.
force)
if test "$dlself" = no; then
dlself=needless
export_dynamic=yes
fi
prev=
continue
;;
self)
if test "$prev" = dlprefiles; then
dlself=yes
elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
dlself=yes
else
dlself=needless
export_dynamic=yes
fi
prev=
continue
;;
*)
if test "$prev" = dlfiles; then
dlfiles="$dlfiles $arg"
else
dlprefiles="$dlprefiles $arg"
fi
prev=
continue
;;
esac
;;
expsyms)
export_symbols="$arg"
if test ! -f "$arg"; then
$echo "$modename: symbol file \`$arg' does not exist"
exit 1
fi
prev=
continue
;;
expsyms_regex)
export_symbols_regex="$arg"
prev=
continue
;;
release)
release="-$arg"
prev=
continue
;;
objectlist)
if test -f "$arg"; then
save_arg=$arg
moreargs=
for fil in `cat $save_arg`
do
# moreargs="$moreargs $fil"
arg=$fil
# A libtool-controlled object.
# Check to see that this really is a libtool object.
if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
pic_object=
non_pic_object=
# Read the .lo file
# If there is no directory component, then add one.
case $arg in
*/* | *\\*) . $arg ;;
*) . ./$arg ;;
esac
if test -z "$pic_object" || \
test -z "$non_pic_object" ||
test "$pic_object" = none && \
test "$non_pic_object" = none; then
$echo "$modename: cannot find name of object for \`$arg'" 1>&2
exit 1
fi
# Extract subdirectory from the argument.
xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$arg"; then
xdir=
else
xdir="$xdir/"
fi
if test "$pic_object" != none; then
# Prepend the subdirectory the object is found in.
pic_object="$xdir$pic_object"
if test "$prev" = dlfiles; then
if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
dlfiles="$dlfiles $pic_object"
prev=
continue
else
# If libtool objects are unsupported, then we need to preload.
prev=dlprefiles
fi
fi
# CHECK ME: I think I busted this. -Ossama
if test "$prev" = dlprefiles; then
# Preload the old-style object.
dlprefiles="$dlprefiles $pic_object"
prev=
fi
# A PIC object.
libobjs="$libobjs $pic_object"
arg="$pic_object"
fi
# Non-PIC object.
if test "$non_pic_object" != none; then
# Prepend the subdirectory the object is found in.
non_pic_object="$xdir$non_pic_object"
# A standard non-PIC object
non_pic_objects="$non_pic_objects $non_pic_object"
if test -z "$pic_object" || test "$pic_object" = none ; then
arg="$non_pic_object"
fi
fi
else
# Only an error if not doing a dry-run.
if test -z "$run"; then
$echo "$modename: \`$arg' is not a valid libtool object" 1>&2
exit 1
else
# Dry-run case.
# Extract subdirectory from the argument.
xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$arg"; then
xdir=
else
xdir="$xdir/"
fi
pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
libobjs="$libobjs $pic_object"
non_pic_objects="$non_pic_objects $non_pic_object"
fi
fi
done
else
$echo "$modename: link input file \`$save_arg' does not exist"
exit 1
fi
arg=$save_arg
prev=
continue
;;
rpath | xrpath)
# We need an absolute path.
case $arg in
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
$echo "$modename: only absolute run-paths are allowed" 1>&2
exit 1
;;
esac
if test "$prev" = rpath; then
case "$rpath " in
*" $arg "*) ;;
*) rpath="$rpath $arg" ;;
esac
else
case "$xrpath " in
*" $arg "*) ;;
*) xrpath="$xrpath $arg" ;;
esac
fi
prev=
continue
;;
xcompiler)
compiler_flags="$compiler_flags $qarg"
prev=
compile_command="$compile_command $qarg"
finalize_command="$finalize_command $qarg"
continue
;;
xlinker)
linker_flags="$linker_flags $qarg"
compiler_flags="$compiler_flags $wl$qarg"
prev=
compile_command="$compile_command $wl$qarg"
finalize_command="$finalize_command $wl$qarg"
continue
;;
*)
eval "$prev=\"\$arg\""
prev=
continue
;;
esac
fi
prevarg="$arg"
case $arg in
-all-static)
if test -n "$link_static_flag"; then
compile_command="$compile_command $link_static_flag"
finalize_command="$finalize_command $link_static_flag"
fi
continue
;;
-allow-undefined)
# FIXME: remove this flag sometime in the future.
$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
continue
;;
-avoid-version)
avoid_version=yes
continue
;;
-dlopen)
prev=dlfiles
continue
;;
-dlpreopen)
prev=dlprefiles
continue
;;
-export-dynamic)
export_dynamic=yes
continue
;;
-export-symbols | -export-symbols-regex)
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
$echo "$modename: not more than one -exported-symbols argument allowed"
exit 1
fi
if test "X$arg" = "X-export-symbols"; then
prev=expsyms
else
prev=expsyms_regex
fi
continue
;;
# The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
# so, if we see these flags be careful not to treat them like -L
-L[A-Z][A-Z]*:*)
case $with_gcc/$host in
no/*-*-irix*)
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
;;
esac
continue
;;
-L*)
dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
# We need an absolute path.
case $dir in
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then
$echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
exit 1
fi
dir="$absdir"
;;
esac
case "$deplibs " in
*" -L$dir "*) ;;
*)
deplibs="$deplibs -L$dir"
lib_search_path="$lib_search_path $dir"
;;
esac
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
case :$dllsearchpath: in
*":$dir:"*) ;;
*) dllsearchpath="$dllsearchpath:$dir";;
esac
;;
esac
continue
;;
-l*)
if test "$arg" = "-lc"; then
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
# These systems don't actually have c library (as such)
continue
;;
*-*-rhapsody* | *-*-darwin1.[012])
# Rhapsody C library is in the System framework
deplibs="$deplibs -framework System"
continue
;;
esac
elif test "$arg" = "-lm"; then
case $host in
*-*-cygwin* | *-*-pw32* | *-*-beos*)
# These systems don't actually have math library (as such)
continue
;;
*-*-rhapsody* | *-*-darwin1.[012])
# Rhapsody math library is in the System framework
deplibs="$deplibs -framework System"
continue
;;
esac
fi
deplibs="$deplibs $arg"
continue
;;
-module)
module=yes
continue
;;
-no-fast-install)
fast_install=no
continue
;;
-no-install)
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
# The PATH hackery in wrapper scripts is required on Windows
# in order for the loader to find any dlls it needs.
$echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
$echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
fast_install=no
;;
*)
no_install=yes
;;
esac
continue
;;
-no-undefined)
allow_undefined=no
continue
;;
-objectlist)
prev=objectlist
continue
;;
-o) prev=output ;;
-release)
prev=release
continue
;;
-rpath)
prev=rpath
continue
;;
-R)
prev=xrpath
continue
;;
-R*)
dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
# We need an absolute path.
case $dir in
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
$echo "$modename: only absolute run-paths are allowed" 1>&2
exit 1
;;
esac
case "$xrpath " in
*" $dir "*) ;;
*) xrpath="$xrpath $dir" ;;
esac
continue
;;
-static)
# The effects of -static are defined in a previous loop.
# We used to do the same as -all-static on platforms that
# didn't have a PIC flag, but the assumption that the effects
# would be equivalent was wrong. It would break on at least
# Digital Unix and AIX.
continue
;;
-thread-safe)
thread_safe=yes
continue
;;
-version-info)
prev=vinfo
continue
;;
-Wc,*)
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
arg=
IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
for flag in $args; do
IFS="$save_ifs"
case $flag in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
flag="\"$flag\""
;;
esac
arg="$arg $wl$flag"
compiler_flags="$compiler_flags $flag"
done
IFS="$save_ifs"
arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
;;
-Wl,*)
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
arg=
IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
for flag in $args; do
IFS="$save_ifs"
case $flag in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
flag="\"$flag\""
;;
esac
arg="$arg $wl$flag"
compiler_flags="$compiler_flags $wl$flag"
linker_flags="$linker_flags $flag"
done
IFS="$save_ifs"
arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
;;
-Xcompiler)
prev=xcompiler
continue
;;
-Xlinker)
prev=xlinker
continue
;;
# Some other compiler flag.
-* | +*)
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
add_flags="$add_flags $arg"
;;
*.$objext)
# A standard object.
objs="$objs $arg"
;;
*.lo)
# A libtool-controlled object.
# Check to see that this really is a libtool object.
if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
pic_object=
non_pic_object=
# Read the .lo file
# If there is no directory component, then add one.
case $arg in
*/* | *\\*) . $arg ;;
*) . ./$arg ;;
esac
if test -z "$pic_object" || \
test -z "$non_pic_object" ||
test "$pic_object" = none && \
test "$non_pic_object" = none; then
$echo "$modename: cannot find name of object for \`$arg'" 1>&2
exit 1
fi
# Extract subdirectory from the argument.
xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$arg"; then
xdir=
else
xdir="$xdir/"
fi
if test "$pic_object" != none; then
# Prepend the subdirectory the object is found in.
pic_object="$xdir$pic_object"
if test "$prev" = dlfiles; then
if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
dlfiles="$dlfiles $pic_object"
prev=
continue
else
# If libtool objects are unsupported, then we need to preload.
prev=dlprefiles
fi
fi
# CHECK ME: I think I busted this. -Ossama
if test "$prev" = dlprefiles; then
# Preload the old-style object.
dlprefiles="$dlprefiles $pic_object"
prev=
fi
# A PIC object.
libobjs="$libobjs $pic_object"
arg="$pic_object"
fi
# Non-PIC object.
if test "$non_pic_object" != none; then
# Prepend the subdirectory the object is found in.
non_pic_object="$xdir$non_pic_object"
# A standard non-PIC object
non_pic_objects="$non_pic_objects $non_pic_object"
if test -z "$pic_object" || test "$pic_object" = none ; then
arg="$non_pic_object"
fi
fi
else
# Only an error if not doing a dry-run.
if test -z "$run"; then
$echo "$modename: \`$arg' is not a valid libtool object" 1>&2
exit 1
else
# Dry-run case.
# Extract subdirectory from the argument.
xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$arg"; then
xdir=
else
xdir="$xdir/"
fi
pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
libobjs="$libobjs $pic_object"
non_pic_objects="$non_pic_objects $non_pic_object"
fi
fi
;;
*.$libext)
# An archive.
deplibs="$deplibs $arg"
old_deplibs="$old_deplibs $arg"
continue
;;
*.la)
# A libtool-controlled library.
if test "$prev" = dlfiles; then
# This library was specified with -dlopen.
dlfiles="$dlfiles $arg"
prev=
elif test "$prev" = dlprefiles; then
# The library was specified with -dlpreopen.
dlprefiles="$dlprefiles $arg"
prev=
else
deplibs="$deplibs $arg"
fi
continue
;;
# Some other compiler argument.
*)
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
add_flags="$add_flags $arg"
;;
esac
# Now actually substitute the argument into the commands.
if test -n "$arg"; then
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
fi
done
if test -n "$prev"; then
$echo "$modename: the \`$prevarg' option requires an argument" 1>&2
$echo "$help" 1>&2
exit 1
fi
# Infer tagged configuration to use if any are available and
# if one wasn't chosen via the "--tag" command line option.
# Only attempt this if the compiler in the base link
# command doesn't match the default compiler.
if test -n "$available_tags" && test -z "$tagname"; then
case $base_compile in
"$CC "*) ;;
# Blanks in the command may have been stripped by the calling shell,
# but not from the CC environment variable when ltconfig was run.
"`$echo $CC` "*) ;;
*)
for z in $available_tags; do
if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
# Evaluate the configuration.
eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
case $base_compile in
"$CC "*)
# The compiler in $compile_command matches
# the one in the tagged configuration.
# Assume this is the tagged configuration we want.
tagname=$z
break
;;
"`$echo $CC` "*)
tagname=$z
break
;;
esac
fi
done
# If $tagname still isn't set, then no tagged configuration
# was found and let the user know that the "--tag" command
# line option must be used.
if test -z "$tagname"; then
echo "$modename: unable to infer tagged configuration"
echo "$modename: specify a tag with \`--tag'" 1>&2
exit 1
# else
# echo "$modename: using $tagname tagged configuration"
fi
;;
esac
fi
if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
eval arg=\"$export_dynamic_flag_spec\"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
fi
oldlibs=
# calculate the name of the file, without its directory
outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
libobjs_save="$libobjs"
if test -n "$shlibpath_var"; then
# get the directories listed in $shlibpath_var
eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
else
shlib_search_path=
fi
eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
if test "X$output_objdir" = "X$output"; then
output_objdir="$objdir"
else
output_objdir="$output_objdir/$objdir"
fi
# Create the object directory.
if test ! -d $output_objdir; then
$show "$mkdir $output_objdir"
$run $mkdir $output_objdir
status=$?
if test $status -ne 0 && test ! -d $output_objdir; then
exit $status
fi
fi
# Determine the type of output
case $output in
"")
$echo "$modename: you must specify an output file" 1>&2
$echo "$help" 1>&2
exit 1
;;
*.$libext) linkmode=oldlib ;;
*.lo | *.$objext) linkmode=obj ;;
*.la) linkmode=lib ;;
*) linkmode=prog ;; # Anything else should be a program.
esac
specialdeplibs=
libs=
# Find all interdependent deplibs by searching for libraries
# that are linked more than once (e.g. -la -lb -la)
for deplib in $deplibs; do
case "$libs " in
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
esac
libs="$libs $deplib"
done
if test $linkmode = lib; then
libs="$predeps $libs $compiler_lib_search_path $postdeps"
fi
deplibs=
newdependency_libs=
newlib_search_path=
need_relink=no # whether we're linking any uninstalled libtool libraries
uninst_deplibs= # uninstalled libtool libraries
uninst_path= # paths that contain uninstalled libtool libraries
case $linkmode in
lib)
passes="conv link"
for file in $dlfiles $dlprefiles; do
case $file in
*.la) ;;
*)
$echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
exit 1
;;
esac
done
;;
prog)
compile_deplibs=
finalize_deplibs=
alldeplibs=no
newdlfiles=
newdlprefiles=
passes="conv scan dlopen dlpreopen link"
;;
*) passes="conv"
;;
esac
for pass in $passes; do
if test "$linkmode,$pass" = "lib,link" ||
test "$linkmode,$pass" = "prog,scan"; then
libs="$deplibs"
deplibs=
fi
if test $linkmode = prog; then
case $pass in
dlopen) libs="$dlfiles" ;;
dlpreopen) libs="$dlprefiles" ;;
link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
esac
fi
if test $pass = dlopen; then
# Collect dlpreopened libraries
save_deplibs="$deplibs"
deplibs=
fi
for deplib in $libs; do
lib=
found=no
case $deplib in
-l*)
if test $linkmode != lib && test $linkmode != prog; then
$echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
continue
fi
if test $pass = conv; then
deplibs="$deplib $deplibs"
continue
fi
name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
# Search the libtool library
lib="$searchdir/lib${name}.la"
if test -f "$lib"; then
found=yes
break
fi
done
if test "$found" != yes; then
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
deplibs="$deplib $deplibs"
test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs"
fi
continue
fi
;;
-L*)
case $linkmode in
lib)
deplibs="$deplib $deplibs"
test $pass = conv && continue
newdependency_libs="$deplib $newdependency_libs"
newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
;;
prog)
if test $pass = conv; then
deplibs="$deplib $deplibs"
continue
fi
if test $pass = scan; then
deplibs="$deplib $deplibs"
newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
else
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
fi
;;
*)
$echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
;;
esac
continue
;;
-R*)
if test $pass = link; then
dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
# Make sure the xrpath contains only unique directories.
case "$xrpath " in
*" $dir "*) ;;
*) xrpath="$xrpath $dir" ;;
esac
fi
deplibs="$deplib $deplibs"
continue
;;
*.la) lib="$deplib" ;;
*.$libext)
if test $pass = conv; then
deplibs="$deplib $deplibs"
continue
fi
case $linkmode in
lib)
if test "$deplibs_check_method" != pass_all; then
echo
echo "*** Warning: This library needs some functionality provided by $deplib."
echo "*** I have the capability to make that library automatically link in when"
echo "*** you link to this library. But I can only do this if you have a"
echo "*** shared version of the library, which you do not appear to have."
else
echo
echo "*** Warning: Linking the shared library $output against the"
echo "*** static library $deplib is not portable!"
deplibs="$deplib $deplibs"
fi
continue
;;
prog)
if test $pass != link; then
deplibs="$deplib $deplibs"
else
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
fi
continue
;;
esac
;;
*.lo | *.$objext)
if test $pass = conv; then
deplibs="$deplib $deplibs"
elif test $linkmode = prog; then
if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
# If there is no dlopen support or we're linking statically,
# we need to preload.
newdlprefiles="$newdlprefiles $deplib"
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
newdlfiles="$newdlfiles $deplib"
fi
fi
continue
;;
%DEPLIBS%)
alldeplibs=yes
continue
;;
esac
if test $found = yes || test -f "$lib"; then :
else
$echo "$modename: cannot find the library \`$lib'" 1>&2
exit 1
fi
# Check to see that this really is a libtool archive.
if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
else
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
exit 1
fi
ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
test "X$ladir" = "X$lib" && ladir="."
dlname=
dlopen=
dlpreopen=
libdir=
library_names=
old_library=
# If the library was installed with an old release of libtool,
# it will not redefine variable installed.
installed=yes
# Read the .la file
case $lib in
*/* | *\\*) . $lib ;;
*) . ./$lib ;;
esac
if test "$linkmode,$pass" = "lib,link" ||
test "$linkmode,$pass" = "prog,scan" ||
{ test $linkmode != prog && test $linkmode != lib; }; then
test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
fi
if test $pass = conv; then
# only check for convenience libraries
deplibs="$lib $deplibs"
if test -z "$libdir"; then
if test -z "$old_library"; then
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
exit 1
fi
# It is a libtool convenience library, so add in its objects.
convenience="$convenience $ladir/$objdir/$old_library"
old_convenience="$old_convenience $ladir/$objdir/$old_library"
tmp_libs=
for deplib in $dependency_libs; do
deplibs="$deplib $deplibs"
case "$tmp_libs " in
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
esac
tmp_libs="$tmp_libs $deplib"
done
elif test $linkmode != prog && test $linkmode != lib; then
$echo "$modename: \`$lib' is not a convenience library" 1>&2
exit 1
fi
continue
fi
# Get the name of the library we link against.
linklib=
for l in $old_library $library_names; do
linklib="$l"
done
if test -z "$linklib"; then
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
exit 1
fi
# This library was specified with -dlopen.
if test $pass = dlopen; then
if test -z "$libdir"; then
$echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
exit 1
fi
if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
# If there is no dlname, no dlopen support or we're linking
# statically, we need to preload. We also need to preload any
# dependent libraries so libltdl's deplib preloader doesn't
# bomb out in the load deplibs phase.
dlprefiles="$dlprefiles $lib $dependency_libs"
else
newdlfiles="$newdlfiles $lib"
fi
continue
fi
# We need an absolute path.
case $ladir in
[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
*)
abs_ladir=`cd "$ladir" && pwd`
if test -z "$abs_ladir"; then
$echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
$echo "$modename: passing it literally to the linker, although it might fail" 1>&2
abs_ladir="$ladir"
fi
;;
esac
laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
# Find the relevant object directory and library name.
if test "X$installed" = Xyes; then
if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
$echo "$modename: warning: library \`$lib' was moved." 1>&2
dir="$ladir"
absdir="$abs_ladir"
libdir="$abs_ladir"
else
dir="$libdir"
absdir="$libdir"
fi
else
dir="$ladir/$objdir"
absdir="$abs_ladir/$objdir"
# Remove this search path later
uninst_path="$uninst_path $abs_ladir"
fi
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
# This library was specified with -dlpreopen.
if test $pass = dlpreopen; then
if test -z "$libdir"; then
$echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
exit 1
fi
# Prefer using a static library (so that no silly _DYNAMIC symbols
# are required to link).
if test -n "$old_library"; then
newdlprefiles="$newdlprefiles $dir/$old_library"
# Otherwise, use the dlname, so that lt_dlopen finds it.
elif test -n "$dlname"; then
newdlprefiles="$newdlprefiles $dir/$dlname"
else
newdlprefiles="$newdlprefiles $dir/$linklib"
fi
fi
if test -z "$libdir"; then
# link the convenience library
if test $linkmode = lib; then
deplibs="$dir/$old_library $deplibs"
elif test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$dir/$old_library $compile_deplibs"
finalize_deplibs="$dir/$old_library $finalize_deplibs"
else
deplibs="$lib $deplibs" # used for prog,scan pass
fi
continue
fi
if test $linkmode = prog && test $pass != link; then
newlib_search_path="$newlib_search_path $ladir"
deplibs="$lib $deplibs"
linkalldeplibs=no
if test "$link_all_deplibs" != no || test -z "$library_names" ||
test "$build_libtool_libs" = no; then
linkalldeplibs=yes
fi
tmp_libs=
for deplib in $dependency_libs; do
case $deplib in
-L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
esac
# Need to link against all dependency_libs?
if test $linkalldeplibs = yes; then
deplibs="$deplib $deplibs"
else
# Need to hardcode shared library paths
# or/and link against static libraries
newdependency_libs="$deplib $newdependency_libs"
fi
case "$tmp_libs " in
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
esac
tmp_libs="$tmp_libs $deplib"
done
continue
fi
if test "$linkmode,$pass" = "prog,link"; then
if test -n "$library_names" &&
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then
# We need to hardcode the library path
if test -n "$shlibpath_var"; then
# Make sure the rpath contains only unique directories.
case "$temp_rpath " in
*" $dir "*) ;;
*" $absdir "*) ;;
*) temp_rpath="$temp_rpath $dir" ;;
esac
fi
# Hardcode the library path.
# Skip directories that are in the system default run-time
# search path.
case " $sys_lib_dlsearch_path " in
*" $absdir "*) ;;
*)
case "$compile_rpath " in
*" $absdir "*) ;;
*) compile_rpath="$compile_rpath $absdir"
esac
;;
esac
case " $sys_lib_dlsearch_path " in
*" $libdir "*) ;;
*)
case "$finalize_rpath " in
*" $libdir "*) ;;
*) finalize_rpath="$finalize_rpath $libdir"
esac
;;
esac
fi
if test "$alldeplibs" = yes &&
{ test "$deplibs_check_method" = pass_all ||
{ test "$build_libtool_libs" = yes &&
test -n "$library_names"; }; }; then
# We only need to search for static libraries
continue
fi
fi
link_static=no # Whether the deplib will be linked statically
if test -n "$library_names" &&
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then
if test "$installed" = no; then
uninst_deplibs="$uninst_deplibs $lib"
need_relink=yes
fi
# This is a shared library
if test $linkmode = lib && test "$hardcode_into_libs" = all; then
# Hardcode the library path.
# Skip directories that are in the system default run-time
# search path.
case " $sys_lib_dlsearch_path " in
*" $absdir "*) ;;
*)
case "$compile_rpath " in
*" $absdir "*) ;;
*) compile_rpath="$compile_rpath $absdir"
esac
;;
esac
case " $sys_lib_dlsearch_path " in
*" $libdir "*) ;;
*)
case "$finalize_rpath " in
*" $libdir "*) ;;
*) finalize_rpath="$finalize_rpath $libdir"
esac
;;
esac
fi
if test -n "$old_archive_from_expsyms_cmds"; then
# figure out the soname
set dummy $library_names
realname="$2"
shift; shift
libname=`eval \\$echo \"$libname_spec\"`
# use dlname if we got it. it's perfectly good, no?
if test -n "$dlname"; then
soname="$dlname"
elif test -n "$soname_spec"; then
# bleh windows
case $host in
*cygwin*)
major=`expr $current - $age`
versuffix="-$major"
;;
esac
eval soname=\"$soname_spec\"
else
soname="$realname"
fi
# Make a new name for the extract_expsyms_cmds to use
soroot="$soname"
soname=`echo $soroot | sed -e 's/^.*\///'`
newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
# If the library has no export list, then create one now
if test -f "$output_objdir/$soname-def"; then :
else
$show "extracting exported symbol list from \`$soname'"
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
eval cmds=\"$extract_expsyms_cmds\"
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
$run eval "$cmd" || exit $?
done
IFS="$save_ifs"
fi
# Create $newlib
if test -f "$output_objdir/$newlib"; then :; else
$show "generating import library for \`$soname'"
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
eval cmds=\"$old_archive_from_expsyms_cmds\"
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
$run eval "$cmd" || exit $?
done
IFS="$save_ifs"
fi
# make sure the library variables are pointing to the new library
dir=$output_objdir
linklib=$newlib
fi
if test $linkmode = prog || test "$mode" != relink; then
add_shlibpath=
add_dir=
add=
lib_linked=yes
case $hardcode_action in
immediate | unsupported)
if test "$hardcode_direct" = no; then
add="$dir/$linklib"
elif test "$hardcode_minus_L" = no; then
case $host in
*-*-sunos*) add_shlibpath="$dir" ;;
esac
add_dir="-L$dir"
add="-l$name"
elif test "$hardcode_shlibpath_var" = no; then
add_shlibpath="$dir"
add="-l$name"
else
lib_linked=no
fi
;;
relink)
if test "$hardcode_direct" = yes; then
add="$dir/$linklib"
elif test "$hardcode_minus_L" = yes; then
add_dir="-L$dir"
add="-l$name"
elif test "$hardcode_shlibpath_var" = yes; then
add_shlibpath="$dir"
add="-l$name"
else
lib_linked=no
fi
;;
*) lib_linked=no ;;
esac
if test "$lib_linked" != yes; then
$echo "$modename: configuration error: unsupported hardcode properties"
exit 1
fi
if test -n "$add_shlibpath"; then
case :$compile_shlibpath: in
*":$add_shlibpath:"*) ;;
*) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
esac
fi
if test $linkmode = prog; then
test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
test -n "$add" && compile_deplibs="$add $compile_deplibs"
else
test -n "$add_dir" && deplibs="$add_dir $deplibs"
test -n "$add" && deplibs="$add $deplibs"
if test "$hardcode_direct" != yes && \
test "$hardcode_minus_L" != yes && \
test "$hardcode_shlibpath_var" = yes; then
case :$finalize_shlibpath: in
*":$libdir:"*) ;;
*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
esac
fi
fi
fi
if test $linkmode = prog || test "$mode" = relink; then
add_shlibpath=
add_dir=
add=
# Finalize command for both is simple: just hardcode it.
if test "$hardcode_direct" = yes; then
add="$libdir/$linklib"
elif test "$hardcode_minus_L" = yes; then
add_dir="-L$libdir"
add="-l$name"
elif test "$hardcode_shlibpath_var" = yes; then
case :$finalize_shlibpath: in
*":$libdir:"*) ;;
*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
esac
add="-l$name"
else
# We cannot seem to hardcode it, guess we'll fake it.
add_dir="-L$libdir"
add="-l$name"
fi
if test $linkmode = prog; then
test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
else
test -n "$add_dir" && deplibs="$add_dir $deplibs"
test -n "$add" && deplibs="$add $deplibs"
fi
fi
elif test $linkmode = prog; then
# Here we assume that one of hardcode_direct or hardcode_minus_L
# is not unsupported. This is valid on all known static and
# shared platforms.
if test "$hardcode_direct" != unsupported; then
test -n "$old_library" && linklib="$old_library"
compile_deplibs="$dir/$linklib $compile_deplibs"
finalize_deplibs="$dir/$linklib $finalize_deplibs"
else
compile_deplibs="-l$name -L$dir $compile_deplibs"
finalize_deplibs="-l$name -L$dir $finalize_deplibs"
fi
elif test "$build_libtool_libs" = yes; then
# Not a shared library
if test "$deplibs_check_method" != pass_all; then
# We're trying link a shared library against a static one
# but the system doesn't support it.
# Just print a warning and add the library to dependency_libs so
# that the program can be linked against the static library.
echo
echo "*** Warning: This library needs some functionality provided by $lib."
echo "*** I have the capability to make that library automatically link in when"
echo "*** you link to this library. But I can only do this if you have a"
echo "*** shared version of the library, which you do not appear to have."
else
convenience="$convenience $dir/$old_library"
old_convenience="$old_convenience $dir/$old_library"
deplibs="$dir/$old_library $deplibs"
link_static=yes
fi
fi
if test $linkmode = lib; then
if test -n "$dependency_libs" &&
{ test $hardcode_into_libs != yes || test $build_old_libs = yes ||
test $link_static = yes; }; then
# Extract -R from dependency_libs
temp_deplibs=
for libdir in $dependency_libs; do
case $libdir in
-R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
case " $xrpath " in
*" $temp_xrpath "*) ;;
*) xrpath="$xrpath $temp_xrpath";;
esac;;
*) temp_deplibs="$temp_deplibs $libdir";;
esac
done
dependency_libs="$temp_deplibs"
fi
newlib_search_path="$newlib_search_path $absdir"
# Link against this library
test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
# ... and its dependency_libs
tmp_libs=
for deplib in $dependency_libs; do
newdependency_libs="$deplib $newdependency_libs"
case "$tmp_libs " in
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
esac
tmp_libs="$tmp_libs $deplib"
done
if test $link_all_deplibs != no; then
# Add the search paths of all dependency libraries
for deplib in $dependency_libs; do
case $deplib in
-L*) path="$deplib" ;;
*.la)
dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
test "X$dir" = "X$deplib" && dir="."
# We need an absolute path.
case $dir in
[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
*)
absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then
$echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
absdir="$dir"
fi
;;
esac
if grep "^installed=no" $deplib > /dev/null; then
path="-L$absdir/$objdir"
else
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
if test -z "$libdir"; then
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
exit 1
fi
if test "$absdir" != "$libdir"; then
$echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
fi
path="-L$absdir"
fi
;;
*) continue ;;
esac
case " $deplibs " in
*" $path "*) ;;
*) deplibs="$path $deplibs" ;;
esac
done
fi
fi
done
dependency_libs="$newdependency_libs"
if test $pass = dlpreopen; then
# Link the dlpreopened libraries before other libraries
for deplib in $save_deplibs; do
deplibs="$deplib $deplibs"
done
fi
if test $pass != dlopen; then
if test $pass != conv; then
# Make sure lib_search_path contains only unique directories.
lib_search_path=
for dir in $newlib_search_path; do
case "$lib_search_path " in
*" $dir "*) ;;
*) lib_search_path="$lib_search_path $dir" ;;
esac
done
newlib_search_path=
fi
if test "$linkmode,$pass" != "prog,link"; then
vars="deplibs"
else
vars="compile_deplibs finalize_deplibs"
fi
for var in $vars dependency_libs; do
# Make sure that $var contains only unique libraries
# and add them in reverse order
eval tmp_libs=\"\$$var\"
new_libs=
for deplib in $tmp_libs; do
case "$deplib" in
-L*) new_libs="$deplib $new_libs" ;;
*)
case " $specialdeplibs " in
*" $deplib "*) new_libs="$deplib $new_libs" ;;
*)
case " $new_libs " in
*" $deplib "*) ;;
*) new_libs="$deplib $new_libs" ;;
esac
;;
esac
;;
esac
done
tmp_libs=
for deplib in $new_libs; do
case $deplib in
-L*)
case " $tmp_libs " in
*" $deplib "*) ;;
*) tmp_libs="$tmp_libs $deplib" ;;
esac
;;
*) tmp_libs="$tmp_libs $deplib" ;;
esac
done
eval $var=\"$tmp_libs\"
done
fi
done
if test $linkmode = prog; then
dlfiles="$newdlfiles"
dlprefiles="$newdlprefiles"
fi
case $linkmode in
oldlib)
if test -n "$deplibs"; then
$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
fi
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
fi
if test -n "$rpath"; then
$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
fi
if test -n "$xrpath"; then
$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
fi
if test -n "$vinfo"; then
$echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
fi
if test -n "$release"; then
$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
fi
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
fi
# Now set the variables for building old libraries.
build_libtool_libs=no
oldlibs="$output"
objs="$objs$old_deplibs"
;;
lib)
# Make sure we only generate libraries of the form `libNAME.la'.
case $outputname in
lib*)
name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
eval libname=\"$libname_spec\"
;;
*)
if test "$module" = no; then
$echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
$echo "$help" 1>&2
exit 1
fi
if test "$need_lib_prefix" != no; then
# Add the "lib" prefix for modules if required
name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
eval libname=\"$libname_spec\"
else
libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
fi
;;
esac
if test -n "$objs"; then
if test "$deplibs_check_method" != pass_all; then
$echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
exit 1
else
echo
echo "*** Warning: Linking the shared library $output against the non-libtool"
echo "*** objects $objs is not portable!"
libobjs="$libobjs $objs"
fi
fi
if test "$dlself" != no; then
$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
fi
set dummy $rpath
if test $# -gt 2; then
$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
fi
install_libdir="$2"
oldlibs=
if test -z "$rpath"; then
if test "$build_libtool_libs" = yes; then
# Building a libtool convenience library.
# Some compilers have problems with a `.al' extension so
# convenience libraries should have the same extension an
# archive normally would.
oldlibs="$output_objdir/$libname.$libext $oldlibs"
build_libtool_libs=convenience
build_old_libs=yes
fi
if test -n "$vinfo"; then
$echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
fi
if test -n "$release"; then
$echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
fi
else
# Parse the version information argument.
IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
set dummy $vinfo 0 0 0
IFS="$save_ifs"
if test -n "$8"; then
$echo "$modename: too many parameters to \`-version-info'" 1>&2
$echo "$help" 1>&2
exit 1
fi
current="$2"
revision="$3"
age="$4"
# Check that each of the things are valid numbers.
case $current in
0 | [1-9] | [1-9][0-9]*) ;;
*)
$echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit 1
;;
esac
case $revision in
0 | [1-9] | [1-9][0-9]*) ;;
*)
$echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit 1
;;
esac
case $age in
0 | [1-9] | [1-9][0-9]*) ;;
*)
$echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit 1
;;
esac
if test $age -gt $current; then
$echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit 1
fi
# Calculate the version variables.
major=
versuffix=
verstring=
case $version_type in
none) ;;
darwin)
# Like Linux, but with the current version available in
# verstring for coding it into the library header
major=.`expr $current - $age`
versuffix="$major.$age.$revision"
# Darwin ld doesn't like 0 for these options...
minor_current=`expr $current + 1`
verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
;;
freebsd-aout)
major=".$current"
versuffix=".$current.$revision";
;;
freebsd-elf)
major=".$current"
versuffix=".$current";
;;
irix)
major=`expr $current - $age + 1`
verstring="sgi$major.$revision"
# Add in all the interfaces that we are compatible with.
loop=$revision
while test $loop != 0; do
iface=`expr $revision - $loop`
loop=`expr $loop - 1`
verstring="sgi$major.$iface:$verstring"
done
# Before this point, $major must not contain `.'.
major=.$major
versuffix="$major.$revision"
;;
linux)
major=.`expr $current - $age`
versuffix="$major.$age.$revision"
;;
osf)
major=`expr $current - $age`
versuffix=".$current.$age.$revision"
verstring="$current.$age.$revision"
# Add in all the interfaces that we are compatible with.
loop=$age
while test $loop != 0; do
iface=`expr $current - $loop`
loop=`expr $loop - 1`
verstring="$verstring:${iface}.0"
done
# Make executables depend on our current version.
verstring="$verstring:${current}.0"
;;
sunos)
major=".$current"
versuffix=".$current.$revision"
;;
windows)
# Use '-' rather than '.', since we only want one
# extension on DOS 8.3 filesystems.
major=`expr $current - $age`
versuffix="-$major"
;;
*)
$echo "$modename: unknown library version type \`$version_type'" 1>&2
echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
exit 1
;;
esac
# Clear the version info if we defaulted, and they specified a release.
if test -z "$vinfo" && test -n "$release"; then
major=
verstring="0.0"
if test "$need_version" = no; then
versuffix=
else
versuffix=".0.0"
fi
fi
# Remove version info from name if versioning should be avoided
if test "$avoid_version" = yes && test "$need_version" = no; then
major=
versuffix=
verstring=""
fi
# Check to see if the archive will have undefined symbols.
if test "$allow_undefined" = yes; then
if test "$allow_undefined_flag" = unsupported; then
$echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
build_libtool_libs=no
build_old_libs=yes
fi
else
# Don't allow undefined symbols.
allow_undefined_flag="$no_undefined_flag"
fi
fi
if test "$mode" != relink; then
# Remove our outputs, but don't remove object files since they
# may have been created when compiling PIC objects.
removelist=
tempremovelist=`echo "$output_objdir/*"`
for p in $tempremovelist; do
case $p in
*.$objext)
;;
$output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
removelist="$removelist $p"
;;
*) ;;
esac
done
if test -n "$removelist"; then
$show "${rm}r $removelist"
$run ${rm}r $removelist
fi
fi
# Now set the variables for building old libraries.
if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
oldlibs="$oldlibs $output_objdir/$libname.$libext"
# Transform .lo files to .o files.
oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
fi
# Eliminate all temporary directories.
for path in $uninst_path; do
lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
done
if test -n "$xrpath"; then
# If the user specified any rpath flags, then add them.
temp_xrpath=
for libdir in $xrpath; do
temp_xrpath="$temp_xrpath -R$libdir"
case "$finalize_rpath " in
*" $libdir "*) ;;
*) finalize_rpath="$finalize_rpath $libdir" ;;
esac
done
if test $hardcode_into_libs != yes || test $build_old_libs = yes; then
dependency_libs="$temp_xrpath $dependency_libs"
fi
fi
# Make sure dlfiles contains only unique files that won't be dlpreopened
old_dlfiles="$dlfiles"
dlfiles=
for lib in $old_dlfiles; do
case " $dlprefiles $dlfiles " in
*" $lib "*) ;;
*) dlfiles="$dlfiles $lib" ;;
esac
done
# Make sure dlprefiles contains only unique files
old_dlprefiles="$dlprefiles"
dlprefiles=
for lib in $old_dlprefiles; do
case "$dlprefiles " in
*" $lib "*) ;;
*) dlprefiles="$dlprefiles $lib" ;;
esac
done
if test "$build_libtool_libs" = yes; then
if test -n "$rpath"; then
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
# these systems don't actually have a c library (as such)!
;;
*-*-rhapsody* | *-*-darwin1.[012])
# Rhapsody C library is in the System framework
deplibs="$deplibs -framework System"
;;
*)
# Add libc to deplibs on all other systems if necessary.
if test $build_libtool_need_lc = "yes"; then
deplibs="$deplibs -lc"
fi
;;
esac
fi
# Transform deplibs into only deplibs that can be linked in shared.
name_save=$name
libname_save=$libname
release_save=$release
versuffix_save=$versuffix
major_save=$major
# I'm not sure if I'm treating the release correctly. I think
# release should show up in the -l (ie -lgmp5) so we don't want to
# add it in twice. Is that correct?
release=""
versuffix=""
major=""
newdeplibs=
droppeddeps=no
case $deplibs_check_method in
pass_all)
# Don't check for shared/static. Everything works.
# This might be a little naive. We might want to check
# whether the library exists or not. But this is on
# osf3 & osf4 and I'm not really sure... Just
# implementing what was already the behaviour.
newdeplibs=$deplibs
;;
test_compile)
# This code stresses the "libraries are programs" paradigm to its
# limits. Maybe even breaks it. We compile a program, linking it
# against the deplibs as a proxy for the library. Then we can check
# whether they linked in statically or dynamically with ldd.
$rm conftest.c
cat > conftest.c </dev/null`
for potent_lib in $potential_libs; do
# Follow soft links.
if ls -lLd "$potent_lib" 2>/dev/null \
| grep " -> " >/dev/null; then
continue
fi
# The statement above tries to avoid entering an
# endless loop below, in case of cyclic links.
# We might still enter an endless loop, since a link
# loop can be closed while we follow links,
# but so what?
potlib="$potent_lib"
while test -h "$potlib" 2>/dev/null; do
potliblink=`ls -ld $potlib | sed 's/.* -> //'`
case $potliblink in
[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
esac
done
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
| sed 10q \
| egrep "$file_magic_regex" > /dev/null; then
newdeplibs="$newdeplibs $a_deplib"
a_deplib=""
break 2
fi
done
done
if test -n "$a_deplib" ; then
droppeddeps=yes
echo
echo "*** Warning: This library needs some functionality provided by $a_deplib."
echo "*** I have the capability to make that library automatically link in when"
echo "*** you link to this library. But I can only do this if you have a"
echo "*** shared version of the library, which you do not appear to have."
fi
else
# Add a -L argument.
newdeplibs="$newdeplibs $a_deplib"
fi
done # Gone through all deplibs.
;;
none | unknown | *)
newdeplibs=""
if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
-e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
grep . >/dev/null; then
echo
if test "X$deplibs_check_method" = "Xnone"; then
echo "*** Warning: inter-library dependencies are not supported in this platform."
else
echo "*** Warning: inter-library dependencies are not known to be supported."
fi
echo "*** All declared inter-library dependencies are being dropped."
droppeddeps=yes
fi
;;
esac
versuffix=$versuffix_save
major=$major_save
release=$release_save
libname=$libname_save
name=$name_save
if test "$droppeddeps" = yes; then
if test "$module" = yes; then
echo
echo "*** Warning: libtool could not satisfy all declared inter-library"
echo "*** dependencies of module $libname. Therefore, libtool will create"
echo "*** a static module, that should work as long as the dlopening"
echo "*** application is linked with the -dlopen flag."
if test -z "$global_symbol_pipe"; then
echo
echo "*** However, this would only work if libtool was able to extract symbol"
echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
echo "*** not find such a program. So, this module is probably useless."
echo "*** \`nm' from GNU binutils and a full rebuild may help."
fi
if test "$build_old_libs" = no; then
oldlibs="$output_objdir/$libname.$libext"
build_libtool_libs=module
build_old_libs=yes
else
build_libtool_libs=no
fi
else
echo "*** The inter-library dependencies that have been dropped here will be"
echo "*** automatically added whenever a program is linked with this library"
echo "*** or is declared to -dlopen it."
if test $allow_undefined = no; then
echo
echo "*** Since this library must not contain undefined symbols,"
echo "*** because either the platform does not support them or"
echo "*** it was explicitly requested with -no-undefined,"
echo "*** libtool will only create a static version of it."
if test "$build_old_libs" = no; then
oldlibs="$output_objdir/$libname.$libext"
build_libtool_libs=module
build_old_libs=yes
else
build_libtool_libs=no
fi
fi
fi
fi
# Done checking deplibs!
deplibs=$newdeplibs
fi
# All the library-specific variables (install_libdir is set above).
library_names=
old_library=
dlname=
# Test again, we may have decided not to build it any more
if test "$build_libtool_libs" = yes; then
if test $hardcode_into_libs = yes; then
# Hardcode the library paths
hardcode_libdirs=
dep_rpath=
rpath="$finalize_rpath"
test "$mode" != relink && rpath="$compile_rpath$rpath"
for libdir in $rpath; do
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
hardcode_libdirs="$libdir"
else
# Just accumulate the unique libdirs.
case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
;;
*)
hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
;;
esac
fi
else
eval flag=\"$hardcode_libdir_flag_spec\"
dep_rpath="$dep_rpath $flag"
fi
elif test -n "$runpath_var"; then
case "$perm_rpath " in
*" $libdir "*) ;;
*) perm_rpath="$perm_rpath $libdir" ;;
esac
fi
done
# Substitute the hardcoded libdirs into the rpath.
if test -n "$hardcode_libdir_separator" &&
test -n "$hardcode_libdirs"; then
libdir="$hardcode_libdirs"
eval dep_rpath=\"$hardcode_libdir_flag_spec\"
fi
if test -n "$runpath_var" && test -n "$perm_rpath"; then
# We should set the runpath_var.
rpath=
for dir in $perm_rpath; do
rpath="$rpath$dir:"
done
eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
fi
test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
fi
shlibpath="$finalize_shlibpath"
test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
if test -n "$shlibpath"; then
eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
fi
# Get the real and link names of the library.
eval library_names=\"$library_names_spec\"
set dummy $library_names
realname="$2"
shift; shift
if test -n "$soname_spec"; then
eval soname=\"$soname_spec\"
else
soname="$realname"
fi
if test x$dlname = x; then
dlname=$soname
fi
lib="$output_objdir/$realname"
for link
do
linknames="$linknames $link"
done
# # Ensure that we have .o objects for linkers which dislike .lo
# # (e.g. aix) in case we are running --disable-static
# for obj in $libobjs; do
# xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
# if test "X$xdir" = "X$obj"; then
# xdir="."
# else
# xdir="$xdir"
# fi
# baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
# oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
# if test ! -f $xdir/$oldobj && test "$baseobj" != "$oldobj"; then
# $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
# $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
# fi
# done
# Use standard objects if they are pic
test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
# Prepare the list of exported symbols
if test -z "$export_symbols"; then
if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
$show "generating symbol list for \`$libname.la'"
export_symbols="$output_objdir/$libname.exp"
$run $rm $export_symbols
eval cmds=\"$export_symbols_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
$run eval "$cmd" || exit $?
done
IFS="$save_ifs"
if test -n "$export_symbols_regex"; then
$show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
$run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
$show "$mv \"${export_symbols}T\" \"$export_symbols\""
$run eval '$mv "${export_symbols}T" "$export_symbols"'
fi
fi
fi
if test -n "$export_symbols" && test -n "$include_expsyms"; then
$run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
fi
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
save_libobjs=$libobjs
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
else
gentop="$output_objdir/${outputname}x"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
status=$?
if test $status -ne 0 && test ! -d "$gentop"; then
exit $status
fi
generated="$generated $gentop"
for xlib in $convenience; do
# Extract the objects.
case $xlib in
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
*) xabs=`pwd`"/$xlib" ;;
esac
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
xdir="$gentop/$xlib"
$show "${rm}r $xdir"
$run ${rm}r "$xdir"
$show "$mkdir $xdir"
$run $mkdir "$xdir"
status=$?
if test $status -ne 0 && test ! -d "$xdir"; then
exit $status
fi
$show "(cd $xdir && $AR x $xabs)"
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
done
fi
fi
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
eval flag=\"$thread_safe_flag_spec\"
linker_flags="$linker_flags $flag"
fi
# Make a backup of the uninstalled library when relinking
if test "$mode" = relink && test "$hardcode_into_libs" = all; then
$run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
fi
# Add all flags from the command line. We here create a library,
# but those flags were only added to compile_command and
# finalize_command, which are only used when creating executables.
# So do it by hand here.
compiler_flags="$compiler_flags $add_flags"
# Only add it to commands which use CC, instead of LD, i.e.
# only to $compiler_flags
#linker_flags="$linker_flags $add_flags"
# Do each of the archive commands.
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
eval cmds=\"$archive_expsym_cmds\"
else
eval cmds=\"$archive_cmds\"
fi
if len=`expr "X$cmds" : ".*"` &&
test $len -le $max_cmd_len; then
:
else
# The command line is too long to link in one step, link piecewise.
$echo "creating reloadable object files..."
# Save the value of $output and $libobjs because we want to
# use them later. If we have whole_archive_flag_spec, we
# want to use save_libobjs as it was before
# whole_archive_flag_spec was expanded, because we can't
# assume the linker understands whole_archive_flag_spec.
# This may have to be revisited, in case too many
# convenience libraries get linked in and end up exceeding
# the spec.
if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
save_libobjs=$libobjs
fi
save_output=$output
# Clear the reloadable object creation command queue and
# initialize k to one.
test_cmds=
concat_cmds=
objlist=
delfiles=
last_robj=
k=1
output=$output_objdir/$save_output-${k}.$objext
# Loop over the list of objects to be linked.
for obj in $save_libobjs
do
eval test_cmds=\"$reload_cmds $objlist $last_robj\"
if test "X$objlist" = X ||
{ len=`expr "X$test_cmds" : ".*"` &&
test $len -le $max_cmd_len; }; then
objlist="$objlist $obj"
else
# The command $test_cmds is almost too long, add a
# command to the queue.
if test $k -eq 1 ; then
# The first file doesn't have a previous command to add.
eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
else
# All subsequent reloadable object files will link in
# the last one created.
eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
fi
last_robj=$output_objdir/$save_output-${k}.$objext
k=`expr $k + 1`
output=$output_objdir/$save_output-${k}.$objext
objlist=$obj
len=1
fi
done
# Handle the remaining objects by creating one last
# reloadable object file. All subsequent reloadable object
# files will link in the last one created.
test -z "$concat_cmds" || concat_cmds=$concat_cmds~
eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
# Set up a command to remove the reloadale object files
# after they are used.
i=0
while test $i -lt $k
do
i=`expr $i + 1`
delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
done
$echo "creating a temporary reloadable object file: $output"
# Loop through the commands generated above and execute them.
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $concat_cmds; do
IFS="$save_ifs"
$show "$cmd"
$run eval "$cmd" || exit $?
done
IFS="$save_ifs"
libobjs=$output
# Restore the value of output.
output=$save_output
if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
fi
# Expand the library linking commands again to reset the
# value of $libobjs for piecewise linking.
# Do each of the archive commands.
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
eval cmds=\"$archive_expsym_cmds\"
else
eval cmds=\"$archive_cmds\"
fi
# Append the command to remove the reloadable object files
# to the just-reset $cmds.
eval cmds=\"\$cmds~$rm $delfiles\"
fi
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
$run eval "$cmd" || exit $?
done
IFS="$save_ifs"
# Restore the uninstalled library and exit
if test "$mode" = relink && test "$hardcode_into_libs" = all; then
$run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
exit 0
fi
# Create links to the real library.
for linkname in $linknames; do
if test "$realname" != "$linkname"; then
$show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
$run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
fi
done
# If -module or -export-dynamic was specified, set the dlname.
if test "$module" = yes || test "$export_dynamic" = yes; then
# On all known operating systems, these are identical.
dlname="$soname"
fi
fi
;;
obj)
if test -n "$deplibs"; then
$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
fi
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
fi
if test -n "$rpath"; then
$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
fi
if test -n "$xrpath"; then
$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
fi
if test -n "$vinfo"; then
$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
fi
if test -n "$release"; then
$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
fi
case $output in
*.lo)
if test -n "$objs$old_deplibs"; then
$echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
exit 1
fi
libobj="$output"
obj=`$echo "X$output" | $Xsed -e "$lo2o"`
;;
*)
libobj=
obj="$output"
;;
esac
# Delete the old objects.
$run $rm $obj $libobj
# Objects from convenience libraries. This assumes
# single-version convenience libraries. Whenever we create
# different ones for PIC/non-PIC, this we'll have to duplicate
# the extraction.
reload_conv_objs=
gentop=
# reload_cmds runs $LD directly, so let us get rid of
# -Wl from whole_archive_flag_spec
wl=
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
else
gentop="$output_objdir/${obj}x"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
status=$?
if test $status -ne 0 && test ! -d "$gentop"; then
exit $status
fi
generated="$generated $gentop"
for xlib in $convenience; do
# Extract the objects.
case $xlib in
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
*) xabs=`pwd`"/$xlib" ;;
esac
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
xdir="$gentop/$xlib"
$show "${rm}r $xdir"
$run ${rm}r "$xdir"
$show "$mkdir $xdir"
$run $mkdir "$xdir"
status=$?
if test $status -ne 0 && test ! -d "$xdir"; then
exit $status
fi
$show "(cd $xdir && $AR x $xabs)"
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
done
fi
fi
# Create the old-style object.
reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
output="$obj"
eval cmds=\"$reload_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
$run eval "$cmd" || exit $?
done
IFS="$save_ifs"
# Exit if we aren't doing a library object file.
if test -z "$libobj"; then
if test -n "$gentop"; then
$show "${rm}r $gentop"
$run ${rm}r $gentop
fi
exit 0
fi
if test "$build_libtool_libs" != yes; then
if test -n "$gentop"; then
$show "${rm}r $gentop"
$run ${rm}r $gentop
fi
# Create an invalid libtool object if no PIC, so that we don't
# accidentally link it into a program.
# $show "echo timestamp > $libobj"
# $run eval "echo timestamp > $libobj" || exit $?
exit 0
fi
if test -n "$pic_flag" || test "$pic_mode" != default; then
# Only do commands if we really have different PIC objects.
reload_objs="$libobjs $reload_conv_objs"
output="$libobj"
eval cmds=\"$reload_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
$run eval "$cmd" || exit $?
done
IFS="$save_ifs"
# else
# # Just create a symlink.
# $show $rm $libobj
# $run $rm $libobj
# xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
# if test "X$xdir" = "X$libobj"; then
# xdir="."
# else
# xdir="$xdir"
# fi
# baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
# oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
# $show "(cd $xdir && $LN_S $oldobj $baseobj)"
# $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
fi
if test -n "$gentop"; then
$show "${rm}r $gentop"
$run ${rm}r $gentop
fi
exit 0
;;
prog)
case $host in
*cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
esac
if test -n "$vinfo"; then
$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
fi
if test -n "$release"; then
$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
fi
if test "$preload" = yes; then
if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
test "$dlopen_self_static" = unknown; then
$echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
fi
fi
compile_command="$compile_command $compile_deplibs"
finalize_command="$finalize_command $finalize_deplibs"
if test -n "$rpath$xrpath"; then
# If the user specified any rpath flags, then add them.
for libdir in $rpath $xrpath; do
# This is the magic to use -rpath.
case "$finalize_rpath " in
*" $libdir "*) ;;
*) finalize_rpath="$finalize_rpath $libdir" ;;
esac
done
fi
# Now hardcode the library paths
rpath=
hardcode_libdirs=
for libdir in $compile_rpath $finalize_rpath; do
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
hardcode_libdirs="$libdir"
else
# Just accumulate the unique libdirs.
case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
;;
*)
hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
;;
esac
fi
else
eval flag=\"$hardcode_libdir_flag_spec\"
rpath="$rpath $flag"
fi
elif test -n "$runpath_var"; then
case "$perm_rpath " in
*" $libdir "*) ;;
*) perm_rpath="$perm_rpath $libdir" ;;
esac
fi
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
case :$dllsearchpath: in
*":$libdir:"*) ;;
*) dllsearchpath="$dllsearchpath:$libdir";;
esac
;;
esac
done
# Substitute the hardcoded libdirs into the rpath.
if test -n "$hardcode_libdir_separator" &&
test -n "$hardcode_libdirs"; then
libdir="$hardcode_libdirs"
eval rpath=\" $hardcode_libdir_flag_spec\"
fi
compile_rpath="$rpath"
rpath=
hardcode_libdirs=
for libdir in $finalize_rpath; do
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
hardcode_libdirs="$libdir"
else
# Just accumulate the unique libdirs.
case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
;;
*)
hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
;;
esac
fi
else
eval flag=\"$hardcode_libdir_flag_spec\"
rpath="$rpath $flag"
fi
elif test -n "$runpath_var"; then
case "$finalize_perm_rpath " in
*" $libdir "*) ;;
*) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
esac
fi
done
# Substitute the hardcoded libdirs into the rpath.
if test -n "$hardcode_libdir_separator" &&
test -n "$hardcode_libdirs"; then
libdir="$hardcode_libdirs"
eval rpath=\" $hardcode_libdir_flag_spec\"
fi
finalize_rpath="$rpath"
dlsyms=
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
if test -n "$NM" && test -n "$global_symbol_pipe"; then
dlsyms="${outputname}S.c"
else
$echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
fi
fi
if test -n "$dlsyms"; then
case $dlsyms in
"") ;;
*.c)
# Discover the nlist of each of the dlfiles.
nlist="$output_objdir/${outputname}.nm"
$show "$rm $nlist ${nlist}S ${nlist}T"
$run $rm "$nlist" "${nlist}S" "${nlist}T"
# Parse the name list into a source file.
$show "creating $output_objdir/$dlsyms"
test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
#ifdef __cplusplus
extern \"C\" {
#endif
/* Prevent the only kind of declaration conflicts we can make. */
#define lt_preloaded_symbols some_other_symbol
/* External symbol declarations for the compiler. */\
"
if test "$dlself" = yes; then
$show "generating symbol list for \`$output'"
test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
# Add our own program objects to the symbol list.
progfiles="$objs$old_deplibs"
for arg in $progfiles; do
$show "extracting global C symbols from \`$arg'"
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
done
if test -n "$exclude_expsyms"; then
$run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
$run eval '$mv "$nlist"T "$nlist"'
fi
if test -n "$export_symbols_regex"; then
$run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
$run eval '$mv "$nlist"T "$nlist"'
fi
# Prepare the list of exported symbols
if test -z "$export_symbols"; then
export_symbols="$output_objdir/$output.exp"
$run $rm $export_symbols
$run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
else
$run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
$run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
$run eval 'mv "$nlist"T "$nlist"'
fi
fi
for arg in $dlprefiles; do
$show "extracting global C symbols from \`$arg'"
name=`echo "$arg" | sed -e 's%^.*/%%'`
$run eval 'echo ": $name " >> "$nlist"'
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
done
if test -z "$run"; then
# Make sure we have at least an empty file.
test -f "$nlist" || : > "$nlist"
if test -n "$exclude_expsyms"; then
egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
$mv "$nlist"T "$nlist"
fi
# Try sorting and uniquifying the output.
if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
:
else
grep -v "^: " < "$nlist" > "$nlist"S
fi
if test -f "$nlist"S; then
eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
else
echo '/* NONE */' >> "$output_objdir/$dlsyms"
fi
$echo >> "$output_objdir/$dlsyms" "\
#undef lt_preloaded_symbols
#if defined (__STDC__) && __STDC__
# define lt_ptr_t void *
#else
# define lt_ptr_t char *
# define const
#endif
/* The mapping between symbol names and symbols. */
const struct {
const char *name;
lt_ptr_t address;
}
lt_preloaded_symbols[] =
{\
"
sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \
-e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
< "$nlist" >> "$output_objdir/$dlsyms"
$echo >> "$output_objdir/$dlsyms" "\
{0, (lt_ptr_t) 0}
};
/* This works around a problem in FreeBSD linker */
#ifdef FREEBSD_WORKAROUND
static const void *lt_preloaded_setup() {
return lt_preloaded_symbols;
}
#endif
#ifdef __cplusplus
}
#endif\
"
fi
pic_flag_for_symtable=
case $host in
# compiling the symbol table file with pic_flag works around
# a FreeBSD bug that causes programs to crash when -lm is
# linked before any other PIC object. But we must not use
# pic_flag when linking with -static. The problem exists in
# FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
*-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
case "$compile_command " in
*" -static "*) ;;
*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
esac;;
*-*-hpux*)
case "$compile_command " in
*" -static "*) ;;
*) pic_flag_for_symtable=" $pic_flag";;
esac
esac
# Now compile the dynamic symbol file.
$show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
$run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
# Clean up the generated files.
$show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
$run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
# Transform the symbol file into the correct name.
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
;;
*)
$echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
exit 1
;;
esac
else
# We keep going just in case the user didn't refer to
# lt_preloaded_symbols. The linker will fail if global_symbol_pipe
# really was required.
# Nullify the symbol file.
compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
fi
# AIX runtime linking requires linking programs with -Wl,-brtl and libs with -Wl,-G
# Also add -bnolibpath to the beginning of the link line, to clear the hardcoded runpath.
# Otherwise, things like the -L path to libgcc.a are accidentally hardcoded by ld.
# This does not apply on AIX for ia64, which uses a SysV linker.
case "$host" in
ia64-*-aix5*) ;;
*-*-aix4* | *-*-aix5*)
compile_command=`$echo "X$compile_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"`
finalize_command=`$echo "X$finalize_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"` ;;
esac
if test $need_relink = no || test "$build_libtool_libs" != yes; then
# Replace the output file specification.
compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
link_command="$compile_command$compile_rpath"
# We have no uninstalled library dependencies, so finalize right now.
$show "$link_command"
$run eval "$link_command"
status=$?
# Delete the generated files.
if test -n "$dlsyms"; then
$show "$rm $output_objdir/${outputname}S.${objext}"
$run $rm "$output_objdir/${outputname}S.${objext}"
fi
exit $status
fi
if test -n "$shlibpath_var"; then
# We should set the shlibpath_var
rpath=
for dir in $temp_rpath; do
case $dir in
[\\/]* | [A-Za-z]:[\\/]*)
# Absolute path.
rpath="$rpath$dir:"
;;
*)
# Relative path: add a thisdir entry.
rpath="$rpath\$thisdir/$dir:"
;;
esac
done
temp_rpath="$rpath"
fi
if test -n "$compile_shlibpath$finalize_shlibpath"; then
compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
fi
if test -n "$finalize_shlibpath"; then
finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
fi
compile_var=
finalize_var=
if test -n "$runpath_var"; then
if test -n "$perm_rpath"; then
# We should set the runpath_var.
rpath=
for dir in $perm_rpath; do
rpath="$rpath$dir:"
done
compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
fi
if test -n "$finalize_perm_rpath"; then
# We should set the runpath_var.
rpath=
for dir in $finalize_perm_rpath; do
rpath="$rpath$dir:"
done
finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
fi
fi
if test "$no_install" = yes; then
# We don't need to create a wrapper script.
link_command="$compile_var$compile_command$compile_rpath"
# Replace the output file specification.
link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
# Delete the old output file.
$run $rm $output
# Link the executable and exit
$show "$link_command"
$run eval "$link_command" || exit $?
exit 0
fi
if test "$hardcode_action" = relink; then
# Fast installation is not supported
link_command="$compile_var$compile_command$compile_rpath"
relink_command="$finalize_var$finalize_command$finalize_rpath"
$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
$echo "$modename: \`$output' will be relinked during installation" 1>&2
else
if test "$fast_install" != no; then
link_command="$finalize_var$compile_command$finalize_rpath"
if test "$fast_install" = yes; then
relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
else
# fast_install is set to needless
relink_command=
fi
else
link_command="$compile_var$compile_command$compile_rpath"
relink_command="$finalize_var$finalize_command$finalize_rpath"
fi
fi
# Replace the output file specification.
link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
# Delete the old output files.
$run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
$show "$link_command"
$run eval "$link_command" || exit $?
# Now create the wrapper script.
$show "creating $output"
# Quote the relink command for shipping.
if test -n "$relink_command"; then
# Preserve any variables that may affect compiler behavior
for var in $variables_saved_for_relink; do
if eval test -z \"\${$var+set}\"; then
relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
elif eval var_value=\$$var; test -z "$var_value"; then
relink_command="$var=; export $var; $relink_command"
else
var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
relink_command="$var=\"$var_value\"; export $var; $relink_command"
fi
done
relink_command="cd `pwd`; $relink_command"
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
fi
# Quote $echo for shipping.
if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
case $0 in
[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
*) qecho="$SHELL `pwd`/$0 --fallback-echo";;
esac
qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
else
qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
fi
# Only actually do things if our run command is non-null.
if test -z "$run"; then
# win32 will think the script is a binary if it has
# a .exe suffix, so we strip it off here.
case $output in
*.exe) output=`echo $output|sed 's,.exe$,,'` ;;
esac
# test for cygwin because mv fails w/o .exe extensions
case $host in
*cygwin*) exeext=.exe ;;
*) exeext= ;;
esac
$rm $output
trap "$rm $output; exit 1" 1 2 15
$echo > $output "\
#! $SHELL
# $output - temporary wrapper script for $objdir/$outputname
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
#
# The $output program cannot be directly executed until all the libtool
# libraries that it depends on are installed.
#
# This wrapper script should never be moved out of the build directory.
# If it is, it will not operate correctly.
# Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings.
Xsed='sed -e 1s/^X//'
sed_quote_subst='$sed_quote_subst'
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
relink_command=\"$relink_command\"
# This environment variable determines our operation mode.
if test \"\$libtool_install_magic\" = \"$magic\"; then
# install mode needs the following variable:
uninst_deplibs='$uninst_deplibs'
else
# When we are sourced in execute mode, \$file and \$echo are already set.
if test \"\$libtool_execute_magic\" != \"$magic\"; then
echo=\"$qecho\"
file=\"\$0\"
# Make sure echo works.
if test \"X\$1\" = X--no-reexec; then
# Discard the --no-reexec flag, and continue.
shift
elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
# Yippee, \$echo works!
:
else
# Restart under the correct shell, and then maybe \$echo will work.
exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
fi
fi\
"
$echo >> $output "\
# Find the directory that this script lives in.
thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
test \"x\$thisdir\" = \"x\$file\" && thisdir=.
# Follow symbolic links until we get to the real thisdir.
file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
while test -n \"\$file\"; do
destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
# If there was a directory component, then change thisdir.
if test \"x\$destdir\" != \"x\$file\"; then
case \"\$destdir\" in
[\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
*) thisdir=\"\$thisdir/\$destdir\" ;;
esac
fi
file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
done
# Try to get the absolute directory name.
absdir=\`cd \"\$thisdir\" && pwd\`
test -n \"\$absdir\" && thisdir=\"\$absdir\"
"
if test "$fast_install" = yes; then
echo >> $output "\
program=lt-'$outputname'$exeext
progdir=\"\$thisdir/$objdir\"
if test ! -f \"\$progdir/\$program\" || \\
{ file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
test \"X\$file\" != \"X\$progdir/\$program\"; }; then
file=\"\$\$-\$program\"
if test ! -d \"\$progdir\"; then
$mkdir \"\$progdir\"
else
$rm \"\$progdir/\$file\"
fi"
echo >> $output "\
# relink executable if necessary
if test -n \"\$relink_command\"; then
if (eval \$relink_command); then :
else
$rm \"\$progdir/\$file\"
exit 1
fi
fi
$mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
{ $rm \"\$progdir/\$program\";
$mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
$rm \"\$progdir/\$file\"
fi"
else
echo >> $output "\
program='$outputname'
progdir=\"\$thisdir/$objdir\"
"
fi
echo >> $output "\
if test -f \"\$progdir/\$program\"; then"
# Export our shlibpath_var if we have one.
if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
$echo >> $output "\
# Add our own library path to $shlibpath_var
$shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
# Some systems cannot cope with colon-terminated $shlibpath_var
# The second colon is a workaround for a bug in BeOS R4 sed
$shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
export $shlibpath_var
"
fi
# fixup the dll searchpath if we need to.
if test -n "$dllsearchpath"; then
$echo >> $output "\
# Add the dll search path components to the executable PATH
PATH=$dllsearchpath:\$PATH
"
fi
$echo >> $output "\
if test \"\$libtool_execute_magic\" != \"$magic\"; then
# Run the actual program with our arguments.
"
case $host in
# win32 systems need to use the prog path for dll
# lookup to work
*-*-cygwin* | *-*-pw32*)
$echo >> $output "\
exec \$progdir/\$program \${1+\"\$@\"}
"
;;
# Backslashes separate directories on plain windows
*-*-mingw | *-*-os2*)
$echo >> $output "\
exec \$progdir\\\\\$program \${1+\"\$@\"}
"
;;
*)
$echo >> $output "\
# Export the path to the program.
PATH=\"\$progdir:\$PATH\"
export PATH
exec \$program \${1+\"\$@\"}
"
;;
esac
$echo >> $output "\
\$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
exit 1
fi
else
# The program doesn't exist.
\$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
\$echo \"This script is just a wrapper for \$program.\" 1>&2
echo \"See the $PACKAGE documentation for more information.\" 1>&2
exit 1
fi
fi\
"
chmod +x $output
fi
exit 0
;;
esac
# See if we need to build an old-fashioned archive.
for oldlib in $oldlibs; do
if test "$build_libtool_libs" = convenience; then
oldobjs="$libobjs_save"
addlibs="$convenience"
build_libtool_libs=no
else
if test "$build_libtool_libs" = module; then
oldobjs="$libobjs_save"
build_libtool_libs=no
else
oldobjs="$objs$old_deplibs $non_pic_objects"
fi
addlibs="$old_convenience"
fi
if test -n "$addlibs"; then
gentop="$output_objdir/${outputname}x"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
status=$?
if test $status -ne 0 && test ! -d "$gentop"; then
exit $status
fi
generated="$generated $gentop"
# Add in members from convenience archives.
for xlib in $addlibs; do
# Extract the objects.
case $xlib in
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
*) xabs=`pwd`"/$xlib" ;;
esac
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
xdir="$gentop/$xlib"
$show "${rm}r $xdir"
$run ${rm}r "$xdir"
$show "$mkdir $xdir"
$run $mkdir "$xdir"
status=$?
if test $status -ne 0 && test ! -d "$xdir"; then
exit $status
fi
$show "(cd $xdir && $AR x $xabs)"
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print | $NL2SP`
done
fi
# Do each command in the archive commands.
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
eval cmds=\"$old_archive_from_new_cmds\"
else
# # Ensure that we have .o objects in place in case we decided
# # not to build a shared library, and have fallen back to building
# # static libs even though --disable-static was passed!
# for oldobj in $oldobjs; do
# if test ! -f $oldobj; then
# xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
# if test "X$xdir" = "X$oldobj"; then
# xdir="."
# else
# xdir="$xdir"
# fi
# baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
# obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
# $show "(cd $xdir && ${LN_S} $obj $baseobj)"
# $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
# fi
# done
compiler_flags="$compiler_flags $add_flags"
eval cmds=\"$old_archive_cmds\"
if len=`expr "X$cmds" : ".*"` &&
test $len -le $max_cmd_len; then
:
else
# the command line is too long to link in one step, link in parts
$echo "using piecewise archive linking..."
save_RANLIB=$RANLIB
RANLIB=:
objlist=
concat_cmds=
save_oldobjs=$oldobjs
for obj in $save_oldobjs
do
oldobjs="$objlist $obj"
objlist="$objlist $obj"
eval test_cmds=\"$old_archive_cmds\"
if len=`expr "X$test_cmds" : ".*"` &&
test $len -le $max_cmd_len; then
:
else
# the above command should be used before it gets too long
oldobjs=$objlist
test -z "$concat_cmds" || concat_cmds=$concat_cmds~
eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
objlist=
fi
done
RANLIB=$save_RANLIB
oldobjs=$objlist
eval cmds=\"\$concat_cmds~$old_archive_cmds\"
fi
fi
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
$run eval "$cmd" || exit $?
done
IFS="$save_ifs"
done
if test -n "$generated"; then
$show "${rm}r$generated"
$run ${rm}r$generated
fi
# Now create the libtool archive.
case $output in
*.la)
old_library=
test "$build_old_libs" = yes && old_library="$libname.$libext"
$show "creating $output"
# Preserve any variables that may affect compiler behavior
for var in $variables_saved_for_relink; do
if eval test -z \"\${$var+set}\"; then
relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
elif eval var_value=\$$var; test -z "$var_value"; then
relink_command="$var=; export $var; $relink_command"
else
var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
relink_command="$var=\"$var_value\"; export $var; $relink_command"
fi
done
# Quote the link command for shipping.
relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
# Only create the output if not a dry run.
if test -z "$run"; then
for installed in no yes; do
if test "$installed" = yes; then
if test -z "$install_libdir"; then
break
fi
output="$output_objdir/$outputname"i
# Replace all uninstalled libtool libraries with the installed ones
newdependency_libs=
for deplib in $dependency_libs; do
case $deplib in
*.la)
name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
if test -z "$libdir"; then
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
exit 1
fi
newdependency_libs="$newdependency_libs $libdir/$name"
;;
*) newdependency_libs="$newdependency_libs $deplib" ;;
esac
done
dependency_libs="$newdependency_libs"
newdlfiles=
for lib in $dlfiles; do
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
if test -z "$libdir"; then
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
exit 1
fi
newdlfiles="$newdlfiles $libdir/$name"
done
dlfiles="$newdlfiles"
newdlprefiles=
for lib in $dlprefiles; do
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
if test -z "$libdir"; then
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
exit 1
fi
newdlprefiles="$newdlprefiles $libdir/$name"
done
dlprefiles="$newdlprefiles"
fi
$rm $output
# place dlname in correct position for cygwin
tdlname=$dlname
case $host,$output,$installed,$module,$dlname in
*cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
esac
$echo > $output "\
# $outputname - a libtool library file
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname='$tdlname'
# Names of this library.
library_names='$library_names'
# The name of the static archive.
old_library='$old_library'
# Libraries that this one depends upon.
dependency_libs='$dependency_libs'
# Version information for $libname.
current=$current
age=$age
revision=$revision
# Is this an already installed library?
installed=$installed
# Files to dlopen/dlpreopen
dlopen='$dlfiles'
dlpreopen='$dlprefiles'
# Directory that this library needs to be installed in:
libdir='$install_libdir'"
if test $hardcode_into_libs = all &&
test "$installed" = no && test $need_relink = yes; then
$echo >> $output "\
relink_command=\"$relink_command\""
fi
done
fi
# Do a symbolic link so that the libtool archive can be found in
# LD_LIBRARY_PATH before the program is installed.
$show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
$run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
;;
esac
exit 0
;;
# libtool install mode
install)
modename="$modename: install"
# There may be an optional sh(1) argument at the beginning of
# install_prog (especially on Windows NT).
if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
# Allow the use of GNU shtool's install command.
$echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
# Aesthetically quote it.
arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
arg="\"$arg\""
;;
esac
install_prog="$arg "
arg="$1"
shift
else
install_prog=
arg="$nonopt"
fi
# The real first argument should be the name of the installation program.
# Aesthetically quote it.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
arg="\"$arg\""
;;
esac
install_prog="$install_prog$arg"
# We need to accept at least all the BSD install flags.
dest=
files=
opts=
prev=
install_type=
isdir=no
stripme=
for arg
do
if test -n "$dest"; then
files="$files $dest"
dest="$arg"
continue
fi
case $arg in
-d) isdir=yes ;;
-f) prev="-f" ;;
-g) prev="-g" ;;
-m) prev="-m" ;;
-o) prev="-o" ;;
-s)
stripme=" -s"
continue
;;
-*) ;;
*)
# If the previous option needed an argument, then skip it.
if test -n "$prev"; then
prev=
else
dest="$arg"
continue
fi
;;
esac
# Aesthetically quote the argument.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
arg="\"$arg\""
;;
esac
install_prog="$install_prog $arg"
done
if test -z "$install_prog"; then
$echo "$modename: you must specify an install program" 1>&2
$echo "$help" 1>&2
exit 1
fi
if test -n "$prev"; then
$echo "$modename: the \`$prev' option requires an argument" 1>&2
$echo "$help" 1>&2
exit 1
fi
if test -z "$files"; then
if test -z "$dest"; then
$echo "$modename: no file or destination specified" 1>&2
else
$echo "$modename: you must specify a destination" 1>&2
fi
$echo "$help" 1>&2
exit 1
fi
# Strip any trailing slash from the destination.
dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
# Check to see that the destination is a directory.
test -d "$dest" && isdir=yes
if test "$isdir" = yes; then
destdir="$dest"
destname=
else
destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
test "X$destdir" = "X$dest" && destdir=.
destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
# Not a directory, so check to see that there is only one file specified.
set dummy $files
if test $# -gt 2; then
$echo "$modename: \`$dest' is not a directory" 1>&2
$echo "$help" 1>&2
exit 1
fi
fi
case $destdir in
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
for file in $files; do
case $file in
*.lo) ;;
*)
$echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
$echo "$help" 1>&2
exit 1
;;
esac
done
;;
esac
# This variable tells wrapper scripts just to set variables rather
# than running their programs.
libtool_install_magic="$magic"
staticlibs=
future_libdirs=
current_libdirs=
for file in $files; do
# Do each installation.
case $file in
*.$libext)
# Do the static libraries later.
staticlibs="$staticlibs $file"
;;
*.la)
# Check to see that this really is a libtool archive.
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
else
$echo "$modename: \`$file' is not a valid libtool archive" 1>&2
$echo "$help" 1>&2
exit 1
fi
library_names=
old_library=
relink_command=
# If there is no directory component, then add one.
case $file in
*/* | *\\*) . $file ;;
*) . ./$file ;;
esac
# Add the libdir to current_libdirs if it is the destination.
if test "X$destdir" = "X$libdir"; then
case "$current_libdirs " in
*" $libdir "*) ;;
*) current_libdirs="$current_libdirs $libdir" ;;
esac
else
# Note the libdir as a future libdir.
case "$future_libdirs " in
*" $libdir "*) ;;
*) future_libdirs="$future_libdirs $libdir" ;;
esac
fi
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
test "X$dir" = "X$file/" && dir=
dir="$dir$objdir"
if test "$hardcode_into_libs" = all && test -n "$relink_command"; then
$echo "$modename: warning: relinking \`$file'" 1>&2
$show "$relink_command"
if $run eval "$relink_command"; then :
else
$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
continue
fi
fi
# See the names of the shared library.
set dummy $library_names
if test -n "$2"; then
realname="$2"
shift
shift
srcname="$realname"
test "$hardcode_into_libs" = all && test -n "$relink_command" && srcname="$realname"T
# Install the shared library and build the symlinks.
$show "$install_prog $dir/$srcname $destdir/$realname"
$run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
if test -n "$stripme" && test -n "$striplib"; then
$show "$striplib $destdir/$realname"
$run eval "$striplib $destdir/$realname" || exit $?
fi
if test $# -gt 0; then
# Delete the old symlinks, and create new ones.
for linkname
do
if test "$linkname" != "$realname"; then
$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
fi
done
fi
# Do each command in the postinstall commands.
lib="$destdir/$realname"
eval cmds=\"$postinstall_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
$run eval "$cmd" || exit $?
done
IFS="$save_ifs"
fi
# Install the pseudo-library for information purposes.
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
instname="$dir/$name"i
$show "$install_prog $instname $destdir/$name"
$run eval "$install_prog $instname $destdir/$name" || exit $?
# Maybe install the static library, too.
test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
;;
*.lo)
# Install (i.e. copy) a libtool object.
# Figure out destination file name, if it wasn't already specified.
if test -n "$destname"; then
destfile="$destdir/$destname"
else
destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
destfile="$destdir/$destfile"
fi
# Deduce the name of the destination old-style object file.
case $destfile in
*.lo)
staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
;;
*.$objext)
staticdest="$destfile"
destfile=
;;
*)
$echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
$echo "$help" 1>&2
exit 1
;;
esac
# Install the libtool object if requested.
if test -n "$destfile"; then
$show "$install_prog $file $destfile"
$run eval "$install_prog $file $destfile" || exit $?
fi
# Install the old object if enabled.
if test "$build_old_libs" = yes; then
# Deduce the name of the old-style object file.
staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
$show "$install_prog $staticobj $staticdest"
$run eval "$install_prog \$staticobj \$staticdest" || exit $?
fi
exit 0
;;
*)
# Figure out destination file name, if it wasn't already specified.
if test -n "$destname"; then
destfile="$destdir/$destname"
else
destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
destfile="$destdir/$destfile"
fi
# Do a test to see if this is really a libtool program.
if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
uninst_deplibs=
relink_command=
# If there is no directory component, then add one.
case $file in
*/* | *\\*) . $file ;;
*) . ./$file ;;
esac
# Check the variables that should have been set.
if test -z "$uninst_deplibs"; then
$echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
exit 1
fi
finalize=yes
for lib in $uninst_deplibs; do
# Check to see that each library is installed.
libdir=
if test -f "$lib"; then
# If there is no directory component, then add one.
case $lib in
*/* | *\\*) . $lib ;;
*) . ./$lib ;;
esac
fi
libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
if test -n "$libdir" && test ! -f "$libfile"; then
$echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
finalize=no
fi
done
relink_command=
# If there is no directory component, then add one.
case $file in
*/* | *\\*) . $file ;;
*) . ./$file ;;
esac
outputname=
if test "$fast_install" = no && test -n "$relink_command"; then
if test "$finalize" = yes && test -z "$run"; then
tmpdir="/tmp"
test -n "$TMPDIR" && tmpdir="$TMPDIR"
tmpdir="$tmpdir/libtool-$$"
if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
else
$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
continue
fi
file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
outputname="$tmpdir/$file"
# Replace the output file specification.
relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
$show "$relink_command"
if $run eval "$relink_command"; then :
else
$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
${rm}r "$tmpdir"
continue
fi
file="$outputname"
else
$echo "$modename: warning: cannot relink \`$file'" 1>&2
fi
else
# Install the binary that we compiled earlier.
file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
fi
fi
# remove .exe since cygwin /usr/bin/install will append another
# one anyways
case $install_prog,$host in
*/usr/bin/install*,*cygwin*)
case $file:$destfile in
*.exe:*.exe)
# this is ok
;;
*.exe:*)
destfile=$destfile.exe
;;
*:*.exe)
destfile=`echo $destfile | sed -e 's,.exe$,,'`
;;
esac
;;
esac
$show "$install_prog$stripme $file $destfile"
$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
test -n "$outputname" && ${rm}r "$tmpdir"
;;
esac
done
for file in $staticlibs; do
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
# Set up the ranlib parameters.
oldlib="$destdir/$name"
$show "$install_prog $file $oldlib"
$run eval "$install_prog \$file \$oldlib" || exit $?
if test -n "$stripme" && test -n "$striplib"; then
$show "$old_striplib $oldlib"
$run eval "$old_striplib $oldlib" || exit $?
fi
# Do each command in the postinstall commands.
eval cmds=\"$old_postinstall_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
$run eval "$cmd" || exit $?
done
IFS="$save_ifs"
done
if test -n "$future_libdirs"; then
$echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
fi
if test -n "$current_libdirs"; then
# Maybe just do a dry run.
test -n "$run" && current_libdirs=" -n$current_libdirs"
exec $SHELL $0 --finish$current_libdirs
exit 1
fi
exit 0
;;
# libtool finish mode
finish)
modename="$modename: finish"
libdirs="$nonopt"
admincmds=
if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
for dir
do
libdirs="$libdirs $dir"
done
for libdir in $libdirs; do
if test -n "$finish_cmds"; then
# Do each command in the finish commands.
eval cmds=\"$finish_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
$run eval "$cmd" || admincmds="$admincmds
$cmd"
done
IFS="$save_ifs"
fi
if test -n "$finish_eval"; then
# Do the single finish_eval.
eval cmds=\"$finish_eval\"
$run eval "$cmds" || admincmds="$admincmds
$cmds"
fi
done
fi
# Exit here if they wanted silent mode.
exit 0
echo "----------------------------------------------------------------------"
echo "Libraries have been installed in:"
for libdir in $libdirs; do
echo " $libdir"
done
echo
echo "If you ever happen to want to link against installed libraries"
echo "in a given directory, LIBDIR, you must either use libtool, and"
echo "specify the full pathname of the library, or use \`-LLIBDIR'"
echo "flag during linking and do at least one of the following:"
if test -n "$shlibpath_var"; then
echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
echo " during execution"
fi
if test -n "$runpath_var"; then
echo " - add LIBDIR to the \`$runpath_var' environment variable"
echo " during linking"
fi
if test -n "$hardcode_libdir_flag_spec"; then
libdir=LIBDIR
eval flag=\"$hardcode_libdir_flag_spec\"
echo " - use the \`$flag' linker flag"
fi
if test -n "$admincmds"; then
echo " - have your system administrator run these commands:$admincmds"
fi
if test -f /etc/ld.so.conf; then
echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
fi
echo
echo "See any operating system documentation about shared libraries for"
echo "more information, such as the ld(1) and ld.so(8) manual pages."
echo "----------------------------------------------------------------------"
exit 0
;;
# libtool execute mode
execute)
modename="$modename: execute"
# The first argument is the command name.
cmd="$nonopt"
if test -z "$cmd"; then
$echo "$modename: you must specify a COMMAND" 1>&2
$echo "$help"
exit 1
fi
# Handle -dlopen flags immediately.
for file in $execute_dlfiles; do
if test ! -f "$file"; then
$echo "$modename: \`$file' is not a file" 1>&2
$echo "$help" 1>&2
exit 1
fi
dir=
case $file in
*.la)
# Check to see that this really is a libtool archive.
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
else
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
$echo "$help" 1>&2
exit 1
fi
# Read the libtool library.
dlname=
library_names=
# If there is no directory component, then add one.
case $file in
*/* | *\\*) . $file ;;
*) . ./$file ;;
esac
# Skip this library if it cannot be dlopened.
if test -z "$dlname"; then
# Warn if it was a shared library.
test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
continue
fi
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
test "X$dir" = "X$file" && dir=.
if test -f "$dir/$objdir/$dlname"; then
dir="$dir/$objdir"
else
$echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
exit 1
fi
;;
*.lo)
# Just add the directory containing the .lo file.
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
test "X$dir" = "X$file" && dir=.
;;
*)
$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
continue
;;
esac
# Get the absolute pathname.
absdir=`cd "$dir" && pwd`
test -n "$absdir" && dir="$absdir"
# Now add the directory to shlibpath_var.
if eval "test -z \"\$$shlibpath_var\""; then
eval "$shlibpath_var=\"\$dir\""
else
eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
fi
done
# This variable tells wrapper scripts just to set shlibpath_var
# rather than running their programs.
libtool_execute_magic="$magic"
# Check if any of the arguments is a wrapper script.
args=
for file
do
case $file in
-*) ;;
*)
# Do a test to see if this is really a libtool program.
if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
# If there is no directory component, then add one.
case $file in
*/* | *\\*) . $file ;;
*) . ./$file ;;
esac
# Transform arg to wrapped name.
file="$progdir/$program"
fi
;;
esac
# Quote arguments (to preserve shell metacharacters).
file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
args="$args \"$file\""
done
if test -z "$run"; then
if test -n "$shlibpath_var"; then
# Export the shlibpath_var.
eval "export $shlibpath_var"
fi
# Restore saved enviroment variables
if test "${save_LC_ALL+set}" = set; then
LC_ALL="$save_LC_ALL"; export LC_ALL
fi
if test "${save_LANG+set}" = set; then
LANG="$save_LANG"; export LANG
fi
# Now actually exec the command.
eval "exec \$cmd$args"
$echo "$modename: cannot exec \$cmd$args"
exit 1
else
# Display what would be done.
if test -n "$shlibpath_var"; then
eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
$echo "export $shlibpath_var"
fi
$echo "$cmd$args"
exit 0
fi
;;
# libtool clean and uninstall mode
clean | uninstall)
modename="$modename: $mode"
rm="$nonopt"
files=
# This variable tells wrapper scripts just to set variables rather
# than running their programs.
libtool_install_magic="$magic"
for arg
do
case $arg in
-*) rm="$rm $arg" ;;
*) files="$files $arg" ;;
esac
done
if test -z "$rm"; then
$echo "$modename: you must specify an RM program" 1>&2
$echo "$help" 1>&2
exit 1
fi
rmdirs=
for file in $files; do
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
if test "X$dir" = "X$file"; then
dir=.
objdir="$objdir"
else
objdir="$dir/$objdir"
fi
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
test $mode = uninstall && objdir="$dir"
# Remember objdir for removal later, being careful to avoid duplicates
if test $mode = clean; then
case " $rmdirs " in
*" $objdir "*) ;;
*) rmdirs="$rmdirs $objdir" ;;
esac
fi
rmfiles="$file"
case $name in
*.la)
# Possibly a libtool archive, so verify it.
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
. $dir/$name
# Delete the libtool libraries and symlinks.
for n in $library_names; do
rmfiles="$rmfiles $objdir/$n"
done
test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
if test $mode = uninstall; then
if test -n "$library_names"; then
# Do each command in the postuninstall commands.
eval cmds=\"$postuninstall_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
$run eval "$cmd"
done
IFS="$save_ifs"
fi
if test -n "$old_library"; then
# Do each command in the old_postuninstall commands.
eval cmds=\"$old_postuninstall_cmds\"
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
$run eval "$cmd"
done
IFS="$save_ifs"
fi
# FIXME: should reinstall the best remaining shared library.
fi
fi
;;
*.lo)
# Possibly a libtool object, so verify it.
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
# Read the .lo file
. $dir/$name
# Add PIC object to the list of files to remove.
if test -n "$pic_object" \
&& test "$pic_object" != none; then
rmfiles="$rmfiles $dir/$pic_object"
fi
# Add non-PIC object to the list of files to remove.
if test -n "$non_pic_object" \
&& test "$non_pic_object" != none; then
rmfiles="$rmfiles $dir/$non_pic_object"
fi
fi
;;
*)
# Do a test to see if this is a libtool program.
if test $mode = clean &&
(sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
relink_command=
. $dir/$file
rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
if test "$fast_install" = yes && test -n "$relink_command"; then
rmfiles="$rmfiles $objdir/lt-$name"
fi
fi
;;
esac
$show "$rm $rmfiles"
$run $rm $rmfiles
done
# Try to remove the ${objdir}s in the directories where we deleted files
for dir in $rmdirs; do
if test -d "$dir"; then
$show "rmdir $dir"
$run rmdir $dir >/dev/null 2>&1
fi
done
exit 0
;;
"")
$echo "$modename: you must specify a MODE" 1>&2
$echo "$generic_help" 1>&2
exit 1
;;
esac
$echo "$modename: invalid operation mode \`$mode'" 1>&2
$echo "$generic_help" 1>&2
exit 1
fi # test -z "$show_help"
# We need to display help for each of the modes.
case $mode in
"") $echo \
"Usage: $modename [OPTION]... [MODE-ARG]...
Provide generalized library-building support services.
--config show all configuration variables
--debug enable verbose shell tracing
-n, --dry-run display commands without modifying any files
--features display basic configuration information and exit
--finish same as \`--mode=finish'
--help display this help message and exit
--mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
--quiet same as \`--silent'
--silent don't print informational messages
--tag=TAG use configuration variables from tag TAG
--version print version information
MODE must be one of the following:
clean remove files from the build directory
compile compile a source file into a libtool object
execute automatically set library path, then run a program
finish complete the installation of libtool libraries
install install libraries or executables
link create a library or an executable
uninstall remove libraries from an installed directory
MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
a more detailed description of MODE."
exit 0
;;
clean)
$echo \
"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
Remove files from the build directory.
RM is the name of the program to use to delete files associated with each FILE
(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
to RM.
If FILE is a libtool library, object or program, all the files associated
with it are deleted. Otherwise, only FILE itself is deleted using RM."
;;
compile)
$echo \
"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
Compile a source file into a libtool library object.
This mode accepts the following additional options:
-o OUTPUT-FILE set the output file name to OUTPUT-FILE
-static always build a \`.o' file suitable for static linking
COMPILE-COMMAND is a command to be used in creating a \`standard' object file
from the given SOURCEFILE.
The output file name is determined by removing the directory component from
SOURCEFILE, then substituting the C source code suffix \`.c' with the
library object suffix, \`.lo'."
;;
execute)
$echo \
"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
Automatically set library path, then run a program.
This mode accepts the following additional options:
-dlopen FILE add the directory containing FILE to the library path
This mode sets the library path environment variable according to \`-dlopen'
flags.
If any of the ARGS are libtool executable wrappers, then they are translated
into their corresponding uninstalled binary, and any of their required library
directories are added to the library path.
Then, COMMAND is executed, with ARGS as arguments."
;;
finish)
$echo \
"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
Complete the installation of libtool libraries.
Each LIBDIR is a directory that contains libtool libraries.
The commands that this mode executes may require superuser privileges. Use
the \`--dry-run' option if you just want to see what would be executed."
;;
install)
$echo \
"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
Install executables or libraries.
INSTALL-COMMAND is the installation command. The first component should be
either the \`install' or \`cp' program.
The rest of the components are interpreted as arguments to that command (only
BSD-compatible install options are recognized)."
;;
link)
$echo \
"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
Link object files or libraries together to form another library, or to
create an executable program.
LINK-COMMAND is a command using the C compiler that you would use to create
a program from several object files.
The following components of LINK-COMMAND are treated specially:
-all-static do not do any dynamic linking at all
-avoid-version do not add a version suffix if possible
-dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-export-symbols SYMFILE
try to export only the symbols listed in SYMFILE
-export-symbols-regex REGEX
try to export only the symbols matching REGEX
-LLIBDIR search LIBDIR for required installed libraries
-lNAME OUTPUT-FILE requires the installed library libNAME
-module build a library that can dlopened
-no-fast-install disable the fast-install mode
-no-install link a not-installable executable
-no-undefined declare that a library does not refer to external symbols
-o OUTPUT-FILE create OUTPUT-FILE from the specified objects
-objectlist FILE Use a list of object files found in FILE to specify objects
-release RELEASE specify package release information
-rpath LIBDIR the created library will eventually be installed in LIBDIR
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
-static do not do any dynamic linking of libtool libraries
-version-info CURRENT[:REVISION[:AGE]]
specify library version info [each variable defaults to 0]
All other options (arguments beginning with \`-') are ignored.
Every other argument is treated as a filename. Files ending in \`.la' are
treated as uninstalled libtool libraries, other files are standard or library
object files.
If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
only library objects (\`.lo' files) may be specified, and \`-rpath' is
required, except when creating a convenience library.
If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
using \`ar' and \`ranlib', or on Windows using \`lib'.
If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
is created, otherwise an executable program is created."
;;
uninstall)
$echo \
"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
Remove libraries from an installation directory.
RM is the name of the program to use to delete files associated with each FILE
(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
to RM.
If FILE is a libtool library, all the files associated with it are deleted.
Otherwise, only FILE itself is deleted using RM."
;;
*)
$echo "$modename: invalid operation mode \`$mode'" 1>&2
$echo "$help" 1>&2
exit 1
;;
esac
echo
$echo "Try \`$modename --help' for more information about other modes."
exit 0
# The TAGs below are defined such that we never get into a situation
# in which we disable both kinds of libraries. Given conflicting
# choices, we go for a static library, that is the most portable,
# since we can't tell whether shared libraries were disabled because
# the user asked for that or because the platform doesn't support
# them. This is particularly important on AIX, because we don't
# support having both static and shared libraries enabled at the same
# time on that platform, so we default to a shared-only configuration.
# If a disable-shared tag is given, we'll fallback to a static-only
# configuration. But we'll never go from static-only to shared-only.
### BEGIN LIBTOOL TAG CONFIG: disable-shared
build_libtool_libs=no
build_old_libs=yes
### END LIBTOOL TAG CONFIG: disable-shared
### BEGIN LIBTOOL TAG CONFIG: disable-static
build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
### END LIBTOOL TAG CONFIG: disable-static
# Local Variables:
# mode:shell-script
# sh-indentation:2
# End:
ed2k_hash-0.3.3/admin/Makefile.common 0000644 0001750 0001750 00000031711 07535440723 016370 0 ustar tiago tiago
SHELL=/bin/sh
cvs:
@if grep '$$(top_srcdir)/acinclude.m4:' Makefile.am >/dev/null; then \
echo "*** Creating acinclude.m4" ;\
rm -f acinclude.m4 configure.files ;\
$(MAKE) -f Makefile.am top_srcdir=. acinclude.m4 ;\
fi
@echo "!!! If you get recursion errors from autoconf, it is advisable to set the"
@echo " environment variable M4 to something including \"--nesting-limit=500\""
@if test -r configure.in.in; then \
rm -f subdirs configure.in ;\
echo "*** Creating list of subdirectories" ;\
$(MAKE) -f Makefile.am top_srcdir=. subdirs ;\
echo "*** Creating configure.in" ;\
$(MAKE) -f Makefile.am top_srcdir=. configure.in ;\
fi
@echo "*** Creating aclocal.m4"
@aclocal
@echo "*** Creating configure"
@autoconf
@if test -r configure.in.in ; then \
perl -pi -e 'print "if test \"x\$$with_fast_perl\" = \"xyes\" ;\
then\n perl -i.bak \$$ac_aux_dir/conf.change.pl \$$CONFIG_STATUS\
|| mv \$$CONFIG_STATUS.bak \$$CONFIG_STATUS;\
\n rm -f \$$CONFIG_STATUS.bak;\nfi\
\n" if /^\s*chmod\s+.*\+x\s+.*CONFIG_STATUS/;' configure ;\
fi
@if grep '} \$$ac_kw foo' configure >/dev/null 2>&1; then perl -p -i -e "s/ac_kw foo/ac_kw int foo/" configure; fi
#David's hack for autoconf bug when $INSTALL is set
@perl -pi -e 'if (/\[\/\$$\]\*. INSTALL=/) { print $$_ ; $$_ = "\"\") ;;\n"; }' configure
@if egrep "^AM_CONFIG_HEADER" configure.in >/dev/null 2>&1; then \
echo "*** Creating config.h template" ;\
autoheader ;\
fi
@echo "*** Creating Makefile templates"
@automake
@echo "*** Postprocessing Makefile templates"
@perl admin/am_edit
@if egrep "^cvs-local:" Makefile.am >/dev/null; then \
$(MAKE) -f Makefile.am cvs-local ;\
fi
@echo "*** Creating date/time stamp"
@touch stamp-h.in
@echo "*** Finished"
@echo " Don't forget to run ./configure"
@echo " If you haven't done so in a while, run ./configure --help"
dist:
@if grep -e '$$(top_srcdir)/acinclude.m4:' Makefile.am >/dev/null; then \
$(MAKE) -f Makefile.am top_srcdir=. acinclude.m4 ;\
fi
@if test -r configure.in.in; then \
$(MAKE) -f Makefile.am top_srcdir=. subdirs configure.in; \
fi ;\
aclocal; \
autoheader; \
automake --foreign --include-deps; \
perl admin/am_edit; \
autoconf; \
if test -r configure.in.in ; then \
perl -pi -e 'print "if test \"x\$$with_fast_perl\" = \"xyes\" ;\
then\n perl -i.bak \$$ac_aux_dir/conf.change.pl \$$CONFIG_STATUS\
|| mv \$$CONFIG_STATUS.bak \$$CONFIG_STATUS;\
\n rm -f \$$CONFIG_STATUS.bak;\nfi\
\n" if /^\s*chmod\s+.*\+x\s+.*CONFIG_STATUS/;' configure ;\
fi ;\
touch stamp-h.in; \
if grep -e "^cvs-local:" Makefile.am >/dev/null; then \
$(MAKE) -f Makefile.am cvs-local ;\
fi ;\
if grep "ac_kw foo" configure >/dev/null 2>&1; then perl -p -i -e "s/ac_kw foo/ac_kw int foo/" configure; fi ;\
if test -d po; then \
LIST=`find ./po -name "*.po"`; \
for i in $$LIST; do \
file2=`echo $$i | sed -e "s#\.po#\.gmo#"`; \
msgfmt -o $$file2 $$i || touch $$file2; \
done ;\
fi
@if grep -e "^cvs-dist-local:" Makefile.am >/dev/null; then \
$(MAKE) -f Makefile.am cvs-dist-local ;\
fi
cvs-clean:
@if test ! -d CVS; then \
echo "You don't have a toplevel CVS directory."; \
echo "You most certainly didn't use cvs to get these sources."; \
echo "But this function depends on cvs's information."; \
exit 1; \
fi; \
perl -e '\
sub rmrf() \
{ \
my $$fn = shift; \
lstat ($$fn); \
if (-d _) { \
if (opendir (DIR, $$fn)) { \
for my $$efn (grep (!/^\.\.?$$/, readdir (DIR))) { \
&rmrf ($$fn."/".$$efn); \
} \
closedir (DIR); \
rmdir ($$fn); \
} \
} else { \
unlink ($$fn); \
} \
} \
\
sub newfiles() \
{ \
my ($$indir, $$incvs) = @_; \
for my $$n (keys (%$$incvs)) { delete $$$$indir{$$n} } \
return sort (keys (%$$indir)); \
} \
\
sub cvsclean() \
{ \
my $$dir = shift; \
my (%dirsdir, %filesdir, %dirscvs, %filescvs); \
my $$dnam = $$dir ? $$dir : "."; \
if (!opendir (DIR, $$dnam)) { \
print STDERR "Cannot enter \"".$$dnam."\".\n"; \
return; \
} \
for my $$fn (grep (!/^\.\.?$$/, readdir (DIR))) { \
if (-d $$dir.$$fn) { \
$$fn eq "CVS" or $$dirsdir{$$fn} = 1; \
} else { \
$$filesdir{$$fn} = 1; \
} \
} \
closedir (DIR); \
if (!open (FILE, "<".$$dir."CVS/Entries")) { \
print STDERR "No CVS information in \"".$$dnam."\".\n"; \
return; \
} \
while () { \
m%^D/([^/]+)/.*$$% and $$dirscvs{$$1} = 1; \
m%^/([^/]+)/.*$$% and $$filescvs{$$1} = 1; \
} \
close (FILE); \
if (open (FILE, "<".$$dir."CVS/Entries.Log")) { \
while () { \
m%^A D/([^/]+)/.*$$% and $$dirscvs{$$1} = 1; \
m%^A /([^/]+)/.*$$% and $$filescvs{$$1} = 1; \
m%^R D/([^/]+)/.*$$% and delete $$dirscvs{$$1}; \
m%^R /([^/]+)/.*$$% and delete $$filescvs{$$1}; \
} \
close (FILE); \
} \
for my $$fn (&newfiles (\%filesdir, \%filescvs)) { \
print ("F ".$$dir.$$fn."\n"); \
&rmrf ($$dir.$$fn); \
} \
for my $$fn (&newfiles (\%dirsdir, \%dirscvs)) { \
print ("D ".$$dir.$$fn."\n"); \
&rmrf ($$dir.$$fn); \
} \
for my $$fn (sort (keys (%dirscvs))) { \
&cvsclean ($$dir.$$fn."/"); \
} \
} \
\
&cvsclean ("");'
# The Makefiles have to be sorted for slashes, since configure creates
# only one directory per Makefile not the whole hierarchy
configure.in: configure.files $(shell test -f configure.files && cat configure.files) subdirs
@rm -f configure.in configure.in.new ;\
kde_use_qt_param= ; \
cat `cat configure.files | egrep -v "^configure.in.bot"` >> configure.in.new ;\
echo "KDE_CREATE_SUBDIRSLIST" >> configure.in.new ;\
echo "AC_OUTPUT( \\" >> configure.in.new ;\
mfs=`find . -type d -print | fgrep -v "/." | sed -e "s#\./##" -e "/^debian/d" | sort`; \
for i in $$mfs; do \
topleveldir=`echo $$i| sed -e "s#/.*##"`; \
if test -f $$topleveldir/configure.in; then \
continue; \
fi ;\
if test ! -f $$i/Makefile.am; then \
continue; \
fi ;\
if test -s inst-apps; then \
if test -z "`grep \"^$$topleveldir\" inst-apps`"; then \
continue; \
fi ;\
fi ;\
echo "$$i/Makefile \\" >> configure.in.new ;\
done ;\
egrep '^dnl AC_OUTPUT\(.*\)' `cat configure.files` | sed -e "s#^.*dnl AC_OUTPUT(\(.*\))#\1 \\\\#" >> configure.in.new ;\
echo ")" >> configure.in.new
@modulename= ;\
if test -f configure.in.in; then \
if head -2 configure.in.in | egrep "^#MIN_CONFIG\(.*\)$$" > /dev/null; then \
line=`egrep "^#MIN_CONFIG\(" configure.in.in` ;\
if test -n "$$line"; then \
kde_use_qt_param=`echo $$line | sed -e "s/#MIN_CONFIG(\(.*\))/\1/"` ;\
fi ;\
fi ;\
if head -2 configure.in.in | egrep "^#MIN_CONFI(G|G\(.*\))$$" > /dev/null; then \
line=`egrep "^AM_INIT_AUTOMAKE\(" configure.in.in` ;\
if test -n "$$line"; then \
modulename=`echo $$line | sed -e "s#AM_INIT_AUTOMAKE(\([^,]*\),.*#\1#"` ;\
VERSION=`echo $$line | sed -e "s#AM_INIT_AUTOMAKE([^,]*, *\([^)]*\)).*#\1#"` ;\
fi ;\
sed -e "s#AM_INIT_AUTOMAKE([^@].*#dnl PACKAGE set before#" configure.in.new > configure.in \
&& mv configure.in configure.in.new ;\
fi ;\
fi ;\
if test -z "$$modulename" || test "$$modulename" = "@MODULENAME@"; then \
modulename=`pwd`; modulename=`basename $$modulename`; \
fi ;\
if test -z "$$VERSION" || test "$$VERSION" = "@VERSION@"; then \
VERSION="\"2.91\""; \
fi ;\
if test -n "$$kde_use_qt_param"; then \
sed -e "s#^dnl KDE_USE_QT#KDE_USE_QT($$kde_use_qt_param)#" configure.in.new > configure.in \
&& mv configure.in configure.in.new ;\
fi ; \
sed -e "s#@MODULENAME@#$$modulename#" configure.in.new | \
sed -e "s#@VERSION@#$$VERSION#" > configure.in
@if test -f configure.in.bot ; then cat configure.in.bot >> configure.in ; fi
@rm -f configure.in.new
configure.files: subdirs
@admindir=NO ;\
for i in . .. ../.. ../../..; do \
if test -x $$i/admin; then admindir=$$i/admin; break; fi; \
done ;\
rm -rf configure.files ;\
if test -f configure.in.in && head -2 configure.in.in | egrep "^#MIN_CONFI(G|G\(.*\))$$" > /dev/null; then \
echo $$admindir/configure.in.min >> configure.files ;\
fi
@test -f configure.in.in && echo configure.in.in >> configure.files
@list=`find . -name "configure.in.in" | sort`; \
for i in $$list; do if test -f $$i && test ! `dirname $$i` = "." ; then \
echo $$i >> configure.files ;\
fi; done
@if test -f configure.in.mid ; then echo configure.in.mid >> configure.files ; fi
@if test -f configure.in.bot ; then echo configure.in.bot >> configure.files ; fi
subdirs:
@files=`ls -1 | sort`; \
dirs= ;\
lib_dirs= ;\
first_dirs= ;\
last_dirs= ;\
compilefirst=`grep '^COMPILE_FIRST[ ]*=' Makefile.am | \
sed -e 's#^COMPILE_FIRST[ ]*=[ ]*#|#' | sed -e 's#$$#|#' | sed -e 's# #|#g'`;\
compilelast=`grep '^COMPILE_LAST[ ]*=' Makefile.am | \
sed -e 's#^COMPILE_LAST[ ]*=[ ]*#|#' | sed -e 's#$$#|#' | sed -e 's# #|#g'`;\
for i in $$files; do if test -d $$i; then \
if test -f $$i/Makefile.am; then \
if echo $$compilefirst | grep "|$$i|" >/dev/null; then \
first_dirs="$$first_dirs $$i" ;\
elif echo $$compilelast | grep "|$$i|" >/dev/null; then \
last_dirs="$$last_dirs $$i" ; \
else dirs="$$dirs $$i" ;\
fi ;\
fi ;\
fi; \
done ;\
rm -f _SUBDIRS ;\
for i in $$dirs; do \
echo $$i >> ./_SUBDIRS; \
done
@if test -r subdirs && diff subdirs _SUBDIRS > /dev/null; then \
rm -f _SUBDIRS; \
fi
@test -r _SUBDIRS && mv _SUBDIRS subdirs || true
package-merge:
@catalogs='$(POFILES)'; \
for cat in $$catalogs; do \
echo $$cat $$name; \
msgmerge -o $$cat.new $$cat $(PACKAGE).pot ; \
if test -s $$cat.new; then \
grep -v "\"POT-Creation" $$cat.new > $$cat.new.2 ; \
grep -v "\"POT-Creation" $$cat >> $$cat.new.1; \
if diff $$cat.new.1 $$cat.new.2; then \
rm $$cat.new; \
else \
mv $$cat.new $$cat ; \
fi; \
rm -f $$cat.new.1 $$cat.new.2 ;\
fi ;\
done
package-messages:
@rm -rf po.backup ;\
mkdir po.backup ;\
for i in `ls -1 po/*.pot 2>/dev/null | sed -e "s#po/##"`; do \
egrep -v '^#([^:]|$)' po/$$i | egrep '^.*[^ ]+.*$$' | grep -v "\"POT-Creation" > po.backup/$$i ; \
cp po/$$i po.backup/backup_$$i ; \
touch -r po/$$i po.backup/backup_$$i ;\
rm po/$$i ;\
done
@podir=$${podir:-$$PWD/po} ;\
files=`find . -name Makefile.am | xargs egrep -l '^messages:' `; \
dirs=`for i in $$files; do echo \`dirname $$i\`; done`; \
tmpname="$$PWD/messages.log" ;\
if test -z "$$EXTRACTRC"; then EXTRACTRC=extractrc ; fi ;\
if test -z "$$PREPARETIPS"; then PREPARETIPS=preparetips ; fi ;\
export EXTRACTRC PREPARETIPS ;\
for subdir in $$dirs; do \
test -z "$$VERBOSE" || echo "Making messages in $$subdir"; \
(cd $$subdir ;\
if test -n "`grep -e '^messages:.*rc.cpp' Makefile.am`"; then \
$$EXTRACTRC *.rc *.ui > rc.cpp ;\
else \
candidates=`ls -1 *.rc *.ui 2>/dev/null` ;\
if test -n "$$candidates"; then \
echo "$$subdir has *.rc or *.ui files, but not correct messages line" ;\
fi ;\
fi ;\
if test -n "`grep -r KAboutData *.c* *.C* 2>/dev/null`"; then \
echo -e 'i18n("_: NAME OF TRANSLATORS\\n"\n"Your names")\ni18n("_: EMAIL OF TRANSLATORS\\n"\n"Your emails")' > _translatorinfo.cpp ;\
else echo " " > _translatorinfo.cpp ;\
fi; \
perl -e '$$mes=0; while () { if (/^messages:/) { $$mes=1; print $$_; next; } if ($$mes) { if (/$$\\(XGETTEXT\)/ && / -o/) { s/ -o \$$\(podir\)/ _translatorinfo.cpp -o \$$\(podir\)/ } print $$_; } else { print $$_; } }' < Makefile.am > _transMakefile ;\
$(MAKE) -s -f _transMakefile podir=$$podir EXTRACTRC="$$EXTRACTRC" PREPARETIPS="$$PREPARETIPS" \
XGETTEXT="$${XGETTEXT:-xgettext} -C -ki18n -ktr2i18n \
-kI18N_NOOP -ktranslate -kaliasLocale \
-x $${includedir:-$$KDEDIR/include}/kde.pot" \
messages ) 2>&1 | grep -v '^make\[1\]' > $$tmpname; \
test -s $$tmpname && (echo $$subdir ; cat $$tmpname) ;\
test ! -f $$subdir/rc.cpp || rm -f $$subdir/rc.cpp ;\
rm -f $$subdir/_translatorinfo.cpp ;\
rm -f $$subdir/_transMakefile ;\
done
rm -f $$tmpname
@for i in `ls -1 po.backup/*.pot 2>/dev/null | sed -e "s#po.backup/##" | egrep -v '^backup_'`; do \
if test ! -f po/$$i; then echo "disappeared: $$i"; fi ;\
done
@for i in `ls -1 po/*.pot 2>/dev/null | sed -e "s#po/##"`; do \
egrep -v '^#([^:]|$)' po/$$i | egrep '^.*[^ ]+.*$$' | grep -v "\"POT-Creation" > temp.pot ;\
if test -f po.backup/$$i && test -n "`diff temp.pot po.backup/$$i`"; then \
echo "will update $$i"; \
msgmerge -q po.backup/backup_$$i po/$$i > temp.pot ;\
mv temp.pot po/$$i; \
else \
if test -f po.backup/backup_$$i; then \
test -z "$$VERBOSE" || echo "I'm restoring $$i" ;\
mv po.backup/backup_$$i po/$$i; \
rm po.backup/$$i; \
else \
echo "will add $$i" ;\
fi ;\
fi ;\
done
@rm -f temp.pot
@rm -rf po.backup
test:
perl -e '$$mes=0; while () { if (/^messages:/) { $$mes=1; print $$_; next; } if ($$mes) { if (! /^\t/) { exit(0); } if (/$$\\(XGETTEXT\)/ && / -o/) { s/ -o/ _translatorinfo.cpp -o/ } print $$_; } }' < Makefile.am
.SILENT:
.PHONY: cvs test dist cvs-clean package-merge package-messages
ed2k_hash-0.3.3/admin/ltconfig 0000755 0001750 0001750 00000245525 07535440720 015203 0 ustar tiago tiago #! /bin/sh
# ltconfig - Create a system-specific libtool.
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit , 1996
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# 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.
# A lot of this script is taken from autoconf-2.10.
# Check that we are running under the correct shell.
SHELL=${CONFIG_SHELL-/bin/sh}
echo=echo
if test "X$1" = X--no-reexec; then
# Discard the --no-reexec flag, and continue.
shift
elif test "X$1" = X--fallback-echo; then
# Avoid inline document here, it may be left over
:
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
# Yippee, $echo works!
:
else
# Restart under the correct shell.
exec "$SHELL" "$0" --no-reexec ${1+"$@"}
fi
if test "X$1" = X--fallback-echo; then
# used as fallback echo
shift
cat </dev/null`}
case X$UNAME in
*-DOS) PATH_SEPARATOR=';' ;;
*) PATH_SEPARATOR=':' ;;
esac
fi
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
if test "X${echo_test_string+set}" != Xset; then
# find a string as large as possible, as long as the shell can cope with it
for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
echo_test_string="`eval $cmd`" &&
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
break
fi
done
fi
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
test "X$echo_testing_string" = "X$echo_test_string"; then
:
else
# The Solaris, AIX, and Digital Unix default echo programs unquote
# backslashes. This makes it impossible to quote backslashes using
# echo "$something" | sed 's/\\/\\\\/g'
#
# So, first we look for a working echo in the user's PATH.
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
for dir in $PATH /usr/ucb; do
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
test "X$echo_testing_string" = "X$echo_test_string"; then
echo="$dir/echo"
break
fi
done
IFS="$save_ifs"
if test "X$echo" = Xecho; then
# We didn't find a better echo, so look for alternatives.
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
test "X$echo_testing_string" = "X$echo_test_string"; then
# This shell has a builtin print -r that does the trick.
echo='print -r'
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
test "X$CONFIG_SHELL" != X/bin/ksh; then
# If we have ksh, try running ltconfig again with it.
ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
export ORIGINAL_CONFIG_SHELL
CONFIG_SHELL=/bin/ksh
export CONFIG_SHELL
exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
else
# Try using printf.
echo='printf %s\n'
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
test "X$echo_testing_string" = "X$echo_test_string"; then
# Cool, printf works
:
elif echo_testing_string=`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null` &&
test "X$echo_testing_string" = 'X\t' &&
echo_testing_string=`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
test "X$echo_testing_string" = "X$echo_test_string"; then
CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
export CONFIG_SHELL
SHELL="$CONFIG_SHELL"
export SHELL
echo="$CONFIG_SHELL $0 --fallback-echo"
elif echo_testing_string=`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null` &&
test "X$echo_testing_string" = 'X\t' &&
echo_testing_string=`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
test "X$echo_testing_string" = "X$echo_test_string"; then
echo="$CONFIG_SHELL $0 --fallback-echo"
else
# maybe with a smaller string...
prev=:
for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
break
fi
prev="$cmd"
done
if test "$prev" != 'sed 50q "$0"'; then
echo_test_string=`eval $prev`
export echo_test_string
exec "${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}}" "$0" ${1+"$@"}
else
# Oops. We lost completely, so just stick with echo.
echo=echo
fi
fi
fi
fi
fi
# Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings.
Xsed='sed -e s/^X//'
sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
# Same as above, but do not quote variable references.
double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
# Sed substitution to delay expansion of an escaped shell variable in a
# double_quote_subst'ed string.
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
# The name of this program.
progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
# Constants:
PROGRAM=ltconfig
PACKAGE=libtool
VERSION=1.4a
TIMESTAMP=" (1.641.2.206mm 2001/04/03 21:47:47)"
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
rm="rm -f"
help="Try \`$progname --help' for more information."
# Global variables:
default_ofile=libtool
can_build_shared=yes
enable_shared=yes
# All known linkers require a `.a' archive for static linking (except M$VC,
# which needs '.lib').
enable_static=yes
enable_fast_install=yes
enable_dlopen=unknown
enable_win32_dll=no
pic_mode=default
ltmain=
silent=
srcdir=
ac_config_guess=
ac_config_sub=
host=
build=NONE
nonopt=NONE
ofile="$default_ofile"
verify_host=yes
tagname=
with_gcc=no
with_gnu_ld=no
need_locks=yes
ac_ext=c
libext=a
cache_file=
max_cmd_len=
## Dependencies to place before and after the object being linked:
predep_objects=
postdep_objects=
predeps=
postdeps=
compiler_lib_search_path=
## Link characteristics:
allow_undefined_flag=
no_undefined_flag=
need_lib_prefix=unknown
need_version=unknown
# when you set need_version to no, make sure it does not cause -set_version
# flags to be left without arguments
archive_cmds=
archive_expsym_cmds=
old_archive_from_new_cmds=
old_archive_from_expsyms_cmds=
striplib=
old_striplib=
export_dynamic_flag_spec=
whole_archive_flag_spec=
thread_safe_flag_spec=
hardcode_into_libs=no
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
hardcode_minus_L=no
hardcode_shlibpath_var=unsupported
runpath_var=
link_all_deplibs=unknown
always_export_symbols=no
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
# include_expsyms should be a list of space-separated symbols to be *always*
# included in the symbol list
include_expsyms=
# exclude_expsyms can be an egrep regular expression of symbols to exclude
# it will be wrapped by ` (' and `)$', so one must not match beginning or
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
# as well as any symbol that contains `d'.
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
# platforms (ab)use it in PIC code, but their linkers get confused if
# the symbol is explicitly referenced. Since portable code cannot
# rely on this symbol name, it's probably fine to never include it in
# preloaded symbol tables.
extract_expsyms_cmds=
## Tools:
old_AR="$AR"
old_AR_FLAGS="$AR_FLAGS"
old_CC="$CC"
old_CFLAGS="$CFLAGS"
old_CPPFLAGS="$CPPFLAGS"
old_LDFLAGS="$LDFLAGS"
old_LIBS="$LIBS"
old_MAGIC_CMD="$MAGIC_CMD"
old_LD="$LD"
old_LN_S="$LN_S"
old_LTCC="$LTCC"
old_NM="$NM"
old_RANLIB="$RANLIB"
old_STRIP="$STRIP"
old_AS="$AS"
old_DLLTOOL="$DLLTOOL"
old_OBJDUMP="$OBJDUMP"
old_OBJEXT="$OBJEXT"
old_EXEEXT="$EXEEXT"
old_reload_flag="$reload_flag"
old_deplibs_check_method="$deplibs_check_method"
old_file_magic_cmd="$file_magic_cmd"
# Parse the command line options.
args=
prev=
for option
do
case $option in
-*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
# If the previous option needs an argument, assign it.
if test -n "$prev"; then
eval "$prev=\$option"
prev=
continue
fi
case $option in
--help) cat <&2
echo "$help" 1>&2
exit 1
;;
*)
if test -z "$ltmain"; then
ltmain="$option"
elif test -z "$host"; then
# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
# echo "$progname: warning \`$option' is not a valid host type" 1>&2
# fi
host="$option"
else
echo "$progname: too many arguments" 1>&2
echo "$help" 1>&2
exit 1
fi ;;
esac
done
if test -z "$ltmain"; then
echo "$progname: you must specify a LTMAIN file" 1>&2
echo "$help" 1>&2
exit 1
fi
if test ! -f "$ltmain"; then
echo "$progname: \`$ltmain' does not exist" 1>&2
echo "$help" 1>&2
exit 1
fi
if test -n "$tagname"; then
# Check whether tagname contains only valid characters
case `$echo "X$tagname" | $Xsed -e 's/[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]//g'` in
"") ;;
*)
echo "$progname: invalid tag name: $tagname" 1>&2
exit 1
;;
esac
if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$ofile" > /dev/null; then
echo "$progname: tag name $tagname already exists" 1>&2
exit 1
fi
if test ! -f "$ofile"; then
echo "$progname: warning: output file \`$ofile' does not exist" 1>&2
fi
if test -z "$LTCC"; then
eval "`$SHELL $ofile --config | grep '^LTCC='`"
if test -z "$LTCC"; then
echo "$progname: warning: output file \`$ofile' does not look like a libtool script" 1>&2
else
echo "$progname: warning: using \`LTCC=$LTCC', extracted from \`$ofile'" 1>&2
fi
fi
fi
# Quote any args containing shell metacharacters.
ltconfig_args=
for arg
do
case $arg in
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
ltconfig_args="$ltconfig_args '$arg'" ;;
*) ltconfig_args="$ltconfig_args $arg" ;;
esac
done
# A relevant subset of AC_INIT.
# File descriptor usage:
# 0 standard input
# 1 file creation
# 2 errors and warnings
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 5 compiler messages saved in config.log
# 6 checking for... messages and results
if test "$silent" = yes; then
exec 6>/dev/null
else
exec 6>&1
fi
exec 5>>./config.log
# NLS nuisances.
# Only set LANG and LC_ALL to C if already set.
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi
if test -n "$cache_file" && test -r "$cache_file" && test -f "$cache_file"; then
echo "loading cache $cache_file within ltconfig"
. $cache_file
fi
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
ac_n= ac_c='
' ac_t=' '
else
ac_n=-n ac_c= ac_t=
fi
else
ac_n= ac_c='\c' ac_t=
fi
if test -z "$srcdir"; then
# Assume the source directory is the same one as the path to LTMAIN.
srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
test "$srcdir" = "$ltmain" && srcdir=.
fi
trap "$rm conftest*; exit 1" 1 2 15
if test "$verify_host" = yes; then
# Check for config.guess and config.sub.
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/config.guess; then
ac_aux_dir=$ac_dir
break
fi
done
if test -z "$ac_aux_dir"; then
echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
echo "$help" 1>&2
exit 1
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
# Make sure we can run config.sub.
if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
else
echo "$progname: cannot run $ac_config_sub" 1>&2
echo "$help" 1>&2
exit 1
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
host_alias=$host
case $host_alias in
"")
# Force config.guess to use the C compiler.
# CC_FOR_BUILD overrides the CC variable in config.guess but I had
# problems with it so do it this way for now.
CC="$LTCC"
if host_alias=`$SHELL $ac_config_guess`; then :
else
echo "$progname: cannot guess host type; you must specify one" 1>&2
echo "$help" 1>&2
exit 1
fi
# Restore the C compiler.
CC="$old_CC"
;;
esac
host=`$SHELL $ac_config_sub $host_alias`
echo "$ac_t$host" 1>&6
# Make sure the host verified.
test -z "$host" && exit 1
# Check for the build system type
echo $ac_n "checking build system type... $ac_c" 1>&6
build_alias=$build
case $build_alias in
NONE)
case $nonopt in
NONE) build_alias=$host_alias ;;
*) build_alias=$nonopt ;;
esac ;;
esac
build=`$SHELL $ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$build" 1>&6
elif test -z "$host"; then
echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
echo "$help" 1>&2
exit 1
else
host_alias=$host
build_alias=$host_alias
build=$host
fi
if test x"$host" != x"$build"; then
ac_tool_prefix=${host_alias}-
else
ac_tool_prefix=
fi
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
case $host_os in
linux-gnu*) ;;
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
esac
case $host_os in
aix3*)
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
if test "X${COLLECT_NAMES+set}" != Xset; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
;;
esac
# Determine commands to create old-style static archives.
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
old_postinstall_cmds='chmod 644 $oldlib'
old_postuninstall_cmds=
if test -n "$RANLIB"; then
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
fi
# Source the script associated with the $tagname tag configuration.
if test -n "$tagname"; then
. $ltmain
else
# FIXME: We should use a variable here
# Configure for a C compiler
. $srcdir/ltcf-c.sh
fi
# Set sane defaults for various variables
test -z "$AR" && AR=ar
test -z "$AR_FLAGS" && AR_FLAGS=cru
test -z "$AS" && AS=as
test -z "$CC" && CC=cc
test -z "$DLLTOOL" && DLLTOOL=dlltool
test -z "$MAGIC_CMD" && MAGIC_CMD=file
test -z "$LD" && LD=ld
test -z "$LN_S" && LN_S="ln -s"
test -z "$NM" && NM=nm
test -z "$OBJDUMP" && OBJDUMP=objdump
test -z "$RANLIB" && RANLIB=:
test -z "$STRIP" && STRIP=:
test -z "$objext" && objext=o
echo $ac_n "checking for objdir... $ac_c" 1>&6
rm -f .libs 2>/dev/null
mkdir .libs 2>/dev/null
if test -d .libs; then
objdir=.libs
else
# MS-DOS does not allow filenames that begin with a dot.
objdir=_libs
fi
rmdir .libs 2>/dev/null
echo "$ac_t$objdir" 1>&6
# If no C compiler was specified, use CC.
LTCC=${LTCC-"$CC"}
# Allow CC to be a program name with arguments.
set dummy $CC
compiler="$2"
# We assume here that the value for ac_cv_prog_cc_pic will not be cached
# in isolation, and that seeing it set (from the cache) indicates that
# the associated values are set (in the cache) correctly too.
echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
echo "$progname:678:checking for $compiler option to produce PIC" 1>&5
if test -z "$ac_cv_prog_cc_pic"; then
echo "$ac_t"none 1>&6
else
echo "$ac_t""$ac_cv_prog_cc_pic" 1>&6
# Check to make sure the pic_flag actually works.
echo $ac_n "checking if $compiler PIC flag $ac_cv_prog_cc_pic works... $ac_c" 1>&6
echo "$progname:687:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5
if test "X${ac_cv_prog_cc_pic_works+set}" = Xset && \
test "X${ac_cv_prog_cc_pic_works}" != X; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_prog_cc_pic_works=yes
$rm conftest*
echo $lt_simple_compile_test_code > conftest.$ac_ext
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $ac_cv_prog_cc_pic -DPIC"
if { (eval echo $progname:697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
# Append any warnings to the config.log.
cat conftest.err 1>&5
case $host_os in
hpux9* | hpux10* | hpux11*)
# On HP-UX, both CC and GCC only warn that PIC is supported... then
# they create non-PIC objects. So, if there were any warnings, we
# assume that PIC is not supported.
if test -s conftest.err; then
ac_cv_prog_cc_pic_works=no
ac_cv_prog_cc_can_build_shared=no
ac_cv_prog_cc_pic=
else
ac_cv_prog_cc_pic_works=yes
ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic"
fi
;;
*)
ac_cv_prog_cc_pic_works=yes
ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic"
;;
esac
else
# Append any errors to the config.log.
cat conftest.err 1>&5
ac_cv_prog_cc_pic_works=no
ac_cv_prog_cc_can_build_shared=no
ac_cv_prog_cc_pic=
fi
CFLAGS="$save_CFLAGS"
$rm conftest*
fi
# Belt *and* braces to stop my trousers falling down:
if test "X$ac_cv_prog_cc_pic_works" = Xno; then
ac_cv_prog_cc_pic=
ac_cv_prog_cc_can_build_shared=no
fi
echo "$ac_t""$ac_cv_prog_cc_pic_works" 1>&6
fi
# Check for any special shared library compilation flags.
if test -n "$ac_cv_prog_cc_shlib"; then
echo "$progname: warning: \`$CC' requires \`$ac_cv_prog_cc_shlib' to build shared libraries" 1>&2
if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$ac_cv_prog_cc_shlib[ ]" >/dev/null; then :
else
echo "$progname: add \`$ac_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
ac_cv_prog_cc_can_build_shared=no
fi
fi
echo $ac_n "checking if $compiler static flag $ac_cv_prog_cc_static works... $ac_c" 1>&6
echo "$progname:749: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5
if test "X${ac_cv_prog_cc_static_works+set}" = Xset && \
test "X${ac_cv_prog_cc_static_works}" != X; then
echo $ac_n "(cached) $ac_c" 1>&6
else
$rm conftest*
echo $lt_simple_link_test_code > conftest.$ac_ext
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $ac_cv_prog_cc_static"
if { (eval echo $progname:758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_static_works=yes
else
ac_cv_prog_cc_static_works=no
ac_cv_prog_cc_static=
fi
LDFLAGS="$save_LDFLAGS"
$rm conftest*
fi
# Belt *and* braces to stop my trousers falling down:
if test "X$ac_cv_prog_cc_static_works" = Xno; then
ac_cv_prog_cc_static=
fi
echo "$ac_t""$ac_cv_prog_cc_static_works" 1>&6
pic_flag="$ac_cv_prog_cc_pic"
special_shlib_compile_flags="$ac_cv_prog_cc_shlib"
wl="$ac_cv_prog_cc_wl"
link_static_flag="$ac_cv_prog_cc_static"
no_builtin_flag="$ac_cv_prog_cc_no_builtin"
can_build_shared="$ac_cv_prog_cc_can_build_shared"
# find the maximum length of command line arguments
echo "$progname:780: finding the maximum length of command line arguments" 1>&5
echo $ac_n "finding the maximum length of command line arguments... $ac_c" 1>&6
if test "${lt_cv_sys_max_cmd_len+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
i=0
testring="ABCDEF"
while test `$CONFIG_SHELL $0 --fallback-echo "X$testring" >/dev/null 2>&1` == `echo "X$testring" >/dev/null 2>&1` &&
new_result=`expr "X$testring" : ".*" 2>&1` &&
lt_cv_sys_max_cmd_len=$new_result &&
test $i != 32 # 1 MB should be enough
do
i=`expr $i + 1`
testring=$testring$testring
done
testring=
# add a significant safety factor because C++ compilers can tack on massive amounts
# of additional arguments before passing them to the linker. 1/4 should be good.
len=`expr $lt_cv_sys_max_cmd_len \/ 4`
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len - $len`
fi
echo "$progname:@lineno@: result: $lt_cv_sys_max_cmd_len" 1>&5
echo "${ac_t}$lt_cv_sys_max_cmd_len" 1>&6
if test -n $lt_cv_sys_max_cmd_len ; then
max_cmd_len=$lt_cv_sys_max_cmd_len
else
max_cmd_len=none
fi
# Check to see if options -o and -c are simultaneously supported by compiler
echo $ac_n "checking if $compiler supports -c -o file.$objext... $ac_c" 1>&6
if test "${lt_cv_compiler_c_o+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
$rm -r conftest 2>/dev/null
mkdir conftest
cd conftest
$rm conftest*
echo $lt_simple_compile_test_code > conftest.$ac_ext
mkdir out
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
# that will create temporary files in the current directory regardless of
# the output directory. Thus, making CWD read-only will cause this test
# to fail, enabling locking or at least warning the user not to do parallel
# builds.
chmod -w .
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -o out/conftest2.$objext"
echo "$progname:829: checking if $compiler supports -c -o file.$objext" >&5
if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$objext; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
if test -s out/conftest.err; then
lt_cv_compiler_c_o=no
else
lt_cv_compiler_c_o=yes
fi
else
# Append any errors to the config.log.
cat out/conftest.err 1>&5
lt_cv_compiler_c_o=no
fi
CFLAGS="$save_CFLAGS"
chmod u+w .
$rm conftest* out/*
rmdir out
cd ..
rmdir conftest
$rm -r conftest 2>/dev/null
fi
compiler_c_o=$lt_cv_compiler_c_o
echo "${ac_t}$compiler_c_o" 1>&6
# Check to see if we can do hard links to lock some files if needed
hard_links="nottested"
if test "$compiler_c_o" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user
echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
hard_links=yes
$rm conftest*
ln conftest.a conftest.b 2>/dev/null && hard_links=no
touch conftest.a
ln conftest.a conftest.b 2>&5 || hard_links=no
ln conftest.a conftest.b 2>/dev/null && hard_links=no
echo "$ac_t$hard_links" 1>&6
$rm conftest*
if test "$hard_links" = no; then
echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
need_locks=warn
fi
else
need_locks=no
fi
if test "$with_gcc" = yes; then
# Check to see if options -fno-rtti -fno-exceptions are supported by compiler
echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
$rm conftest*
echo $lt_simple_compile_test_code > conftest.$ac_ext
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
echo "$progname:883: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
if { (eval echo $progname:884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
if test -s conftest.err; then
echo "$ac_t"no 1>&6
compiler_rtti_exceptions=no
else
echo "$ac_t"yes 1>&6
compiler_rtti_exceptions=yes
fi
else
# Append any errors to the config.log.
cat conftest.err 1>&5
compiler_rtti_exceptions=no
echo "$ac_t"no 1>&6
fi
CFLAGS="$save_CFLAGS"
$rm conftest*
if test "$compiler_rtti_exceptions" = "yes"; then
no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
else
no_builtin_flag=' -fno-builtin'
fi
fi
# See if the linker supports building shared libraries.
echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
echo "$ac_t$ld_shlibs" 1>&6
test "$ld_shlibs" = no && can_build_shared=no
# Check hardcoding attributes.
echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
hardcode_action=
if test -n "$hardcode_libdir_flag_spec" || \
test -n "$runpath_var"; then
# We can hardcode non-existant directories.
if test "$hardcode_direct" != no &&
# If the only mechanism to avoid hardcoding is shlibpath_var, we
# have to relink, otherwise we might link with an installed library
# when we should be linking with a yet-to-be-installed one
## test "$hardcode_shlibpath_var" != no &&
test "$hardcode_minus_L" != no; then
# Linking always hardcodes the temporary library directory.
hardcode_action=relink
else
# We can link without hardcoding, and we can hardcode nonexisting dirs.
hardcode_action=immediate
fi
else
# We cannot hardcode anything, or else we can only hardcode existing
# directories.
hardcode_action=unsupported
fi
echo "$ac_t$hardcode_action" 1>&6
echo $ac_n "checking whether stripping libraries is possible... $ac_c" 1>&6
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
echo "${ac_t}yes" 1>&6
else
echo "${ac_t}no" 1>&6
fi
case $reload_flag in
"" | " "*) ;;
*) reload_flag=" $reload_flag" ;;
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
test -z "$deplibs_check_method" && deplibs_check_method=unknown
# PORTME Fill in your ld.so characteristics
library_names_spec=
libname_spec='lib$name'
soname_spec=
postinstall_cmds=
postuninstall_cmds=
finish_cmds=
finish_eval=
shlibpath_var=
shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
case $host_os in
aix3*)
version_type=linux
library_names_spec='${libname}${release}.so$versuffix $libname.a'
shlibpath_var=LIBPATH
# AIX 3 has no versioning support, so we append a major version to the name.
soname_spec='${libname}${release}.so$major'
;;
aix4* | aix5*)
if test "$host_cpu" = ia64; then
# AIX 5 supports IA64
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
shlibpath_var=LD_LIBRARY_PATH
else
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
# soname into executable. Probably we can add versioning support to
# collect2, so additional links can be useful in future.
# We preserve .a as extension for shared libraries though AIX4.2
# and later linker supports .so
if test "$aix_use_runtimelinking" = yes; then
# If using run time linking (on AIX 4.2 or later) use lib.so instead of
# lib.a to let people know that these are not typical AIX shared libraries.
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
# We want symlinks to be created for the different names.
version_type=linux
else
# We preserve .a as extension for shared libraries though AIX4.2
# and later when we are not doing run time linking.
library_names_spec='${libname}${release}.a $libname.a'
soname_spec='${libname}${release}.so$major.o'
fi
# If we're using GNU nm, then we don't want the "-C" option.
# -C means demangle to AIX nm, but means don't demangle with GNU nm
if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
else
export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
fi
shlibpath_var=LIBPATH
deplibs_check_method=pass_all
# Put the right runpath into libraries.
hardcode_into_libs=yes
case $host_os in
aix4 | aix4.[01] | aix4.[01].*)
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
echo ' yes '
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
:
else
# With GCC up to 2.95.x, collect2 would create an import file
# for dependence libraries. The import file would start with
# the line `#! .'. This would cause the generated library to
# depend on `.', always an invalid library. This was fixed in
# development snapshots of GCC prior to 3.0.
can_build_shared=no
fi
;;
esac
fi
;;
amigaos*)
library_names_spec='$libname.ixlibrary $libname.a'
# Create ${libname}_ixlibrary.a entries in /sys/libs.
finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
;;
beos*)
library_names_spec='${libname}.so'
dynamic_linker="$host_os ld.so"
shlibpath_var=LIBRARY_PATH
lt_cv_dlopen="load_add_on"
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
;;
bsdi4*)
version_type=linux
need_version=no
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
soname_spec='${libname}${release}.so$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
export_dynamic_flag_spec=-rdynamic
# the default ld.so.conf also contains /usr/contrib/lib and
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
# libtool to hard-code these into programs
;;
cygwin* | mingw* | pw32*)
version_type=windows
need_version=no
need_lib_prefix=no
case $with_gcc,$host_os in
yes,cygwin*)
library_names_spec='$libname.dll.a'
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'
postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog .libs/$dlname \$dldir/$dlname'
postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
dlpath=$dir/\$dldll; $rm \$dlpath'
;;
yes,mingw*)
library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
;;
yes,pw32*)
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
;;
*)
library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
;;
esac
dynamic_linker='Win32 ld.exe'
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
lt_cv_dlopen="LoadLibrary"
lt_cv_dlopen_libs=
;;
darwin* | rhapsody*)
dynamic_linker="$host_os dyld"
version_type=darwin
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${versuffix}.`test .$module = .yes && echo so || echo dylib` ${libname}${release}${major}.$`test .$module = .yes && echo so || echo dylib` ${libname}.`test .$module = .yes && echo so || echo dylib`'
soname_spec='${libname}${release}${major}.`test .$module = .yes && echo so || echo dylib`'
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
;;
freebsd1*)
dynamic_linker=no
;;
freebsd*)
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
version_type=freebsd-$objformat
case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
need_version=no
need_lib_prefix=no
;;
freebsd-*)
library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
need_version=yes
;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
freebsd2*)
shlibpath_overrides_runpath=yes
;;
*)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
esac
;;
gnu*)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
soname_spec='${libname}${release}.so$major'
shlibpath_var=LD_LIBRARY_PATH
hardcode_into_libs=yes
;;
hpux9* | hpux10* | hpux11*)
# Give a soname corresponding to the major version so that dld.sl refuses to
# link against other versions.
dynamic_linker="$host_os dld.sl"
version_type=sunos
hardcode_into_libs=all
need_lib_prefix=no
need_version=no
shlibpath_var=SHLIB_PATH
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
soname_spec='${libname}${release}.sl$major'
# HP-UX runs *really* slowly unless shared libraries are mode 555.
postinstall_cmds='chmod 555 $lib'
;;
irix5* | irix6*)
version_type=irix
need_lib_prefix=no
need_version=no
soname_spec='${libname}${release}.so$major'
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
case $host_os in
irix5*)
libsuff= shlibsuff=
;;
*)
case $LD in # libtool.m4 will add one of these switches to LD
*-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
*-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
*) libsuff= shlibsuff= libmagic=never-match;;
esac
;;
esac
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
shlibpath_overrides_runpath=no
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
;;
# No shared lib support for Linux oldld, aout, or coff.
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
dynamic_linker=no
;;
# This must be Linux ELF.
linux-gnu*)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
soname_spec='${libname}${release}.so$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
# This implies no fast_install, which is unacceptable.
# Some rework will be needed to allow for fast_install
# before this can be enabled.
hardcode_into_libs=yes
# We used to test for /lib/ld.so.1 and disable shared libraries on
# powerpc, because MkLinux only supported shared libraries with the
# GNU dynamic linker. Since this was broken with cross compilers,
# most powerpc-linux boxes support dynamic linking these days and
# people can always --disable-shared, the test was removed, and we
# assume the GNU/Linux dynamic linker is in use.
dynamic_linker='GNU/Linux ld.so'
;;
netbsd*)
version_type=sunos
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
dynamic_linker='NetBSD (a.out) ld.so'
need_version=yes
else
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
soname_spec='${libname}${release}.so$major'
dynamic_linker='NetBSD ld.elf_so'
fi
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
newsos6)
version_type=linux
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
;;
openbsd*)
version_type=sunos
if test "$with_gnu_ld" = yes; then
need_lib_prefix=no
need_version=no
fi
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
# OpenBSD 2.7 the overriding is needed for fast-install
shlibpath_overrides_runpath=yes
;;
os2*)
libname_spec='$name'
need_lib_prefix=no
library_names_spec='$libname.dll $libname.a'
dynamic_linker='OS/2 ld.exe'
shlibpath_var=LIBPATH
;;
osf3* | osf4* | osf5*)
version_type=osf
need_version=no
soname_spec='${libname}${release}.so'
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
sco3.2v5*)
version_type=osf
soname_spec='${libname}${release}.so$major'
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
shlibpath_var=LD_LIBRARY_PATH
;;
solaris*)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
soname_spec='${libname}${release}.so$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
# ldd complains unless libraries are executable
postinstall_cmds='chmod +x $lib'
;;
sunos4*)
version_type=sunos
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
if test "$with_gnu_ld" = yes; then
need_lib_prefix=no
fi
need_version=yes
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
version_type=linux
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
soname_spec='${libname}${release}.so$major'
shlibpath_var=LD_LIBRARY_PATH
case $host_vendor in
motorola)
need_lib_prefix=no
need_version=no
shlibpath_overrides_runpath=no
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
;;
esac
;;
uts4*)
version_type=linux
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
soname_spec='${libname}${release}.so$major'
shlibpath_var=LD_LIBRARY_PATH
;;
dgux*)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
soname_spec='${libname}${release}.so$major'
shlibpath_var=LD_LIBRARY_PATH
;;
sysv4*MP*)
if test -d /usr/nec ;then
version_type=linux
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
soname_spec='$libname.so.$major'
shlibpath_var=LD_LIBRARY_PATH
fi
;;
*)
dynamic_linker=no
;;
esac
echo "$ac_t$dynamic_linker" 1>&6
test "$dynamic_linker" = no && can_build_shared=no
# Check for command to grab the raw symbol name followed by C symbol from nm.
echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
# These are sane defaults that work on at least a few old systems.
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
# Character class describing NM global symbol codes.
symcode='[BCDEGRST]'
# Regexp to match symbols that can be accessed directly from C.
sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
# Transform the above into a raw symbol and a C symbol.
symxfrm='\1 \2\3 \3'
# Transform an extracted symbol line into a proper C declaration
global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
# Define system-specific variables.
case $host_os in
aix*)
symcode='[BCDT]'
;;
cygwin* | mingw* | pw32*)
symcode='[ABCDGISTW]'
;;
hpux*) # Its linker distinguishes data from code symbols
global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
;;
irix*)
symcode='[BCDEGRST]'
;;
solaris* | sysv5*)
symcode='[BDT]'
;;
sysv4)
symcode='[DFNSTU]'
;;
esac
# Handle CRLF in mingw tool chain
opt_cr=
case $host_os in
mingw*)
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
;;
esac
# If we're using GNU nm, then use its standard symbol codes.
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
symcode='[ABCDGISTW]'
fi
# Try without a prefix undercore, then with it.
for ac_symprfx in "" "_"; do
# Write the raw and C identifiers.
global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
# Check to see that the pipe works correctly.
pipe_works=no
$rm conftest*
cat > conftest.$ac_ext <&5
if { (eval echo $progname:1424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
# Now try to grab the symbols.
nlist=conftest.nm
if { echo "$progname:1427: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
mv -f "$nlist"T "$nlist"
else
rm -f "$nlist"T
fi
# Make sure that we snagged all the symbols we need.
if egrep ' nm_test_var$' "$nlist" >/dev/null; then
if egrep ' nm_test_func$' "$nlist" >/dev/null; then
cat < conftest.$ac_ext
#ifdef __cplusplus
extern "C" {
#endif
EOF
# Now generate the symbol file.
eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
cat <> conftest.$ac_ext
#if defined (__STDC__) && __STDC__
# define lt_ptr_t void *
#else
# define lt_ptr_t char *
# define const
#endif
/* The mapping between symbol names and symbols. */
const struct {
const char *name;
lt_ptr_t address;
}
lt_preloaded_symbols[] =
{
EOF
sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.$ac_ext
cat <<\EOF >> conftest.$ac_ext
{0, (lt_ptr_t) 0}
};
#ifdef __cplusplus
}
#endif
EOF
# Now try linking the two files.
mv conftest.$objext conftstm.$objext
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
LIBS="conftstm.$objext"
CFLAGS="$CFLAGS$no_builtin_flag"
if { (eval echo $progname:1479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
pipe_works=yes
else
echo "$progname: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
LIBS="$save_LIBS"
else
echo "cannot find nm_test_func in $nlist" >&5
fi
else
echo "cannot find nm_test_var in $nlist" >&5
fi
else
echo "cannot run $global_symbol_pipe" >&5
fi
else
echo "$progname: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
$rm conftest* conftst*
# Do not use the global_symbol_pipe unless it works.
if test "$pipe_works" = yes; then
break
else
global_symbol_pipe=
fi
done
if test "$pipe_works" = yes; then
echo "${ac_t}ok" 1>&6
else
echo "${ac_t}failed" 1>&6
fi
if test -z "$global_symbol_pipe"; then
global_symbol_to_cdecl=
fi
# Report the final consequences.
echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
# configure.in, otherwise build static only libraries.
case $host_os in
cygwin* | mingw* | pw32* | os2*)
if test x$can_build_shared = xyes; then
test x$enable_win32_dll = xno && can_build_shared=no
echo "checking if package supports dlls... $can_build_shared" 1>&6
fi
;;
esac
echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
test "$can_build_shared" = "no" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
# are all built from PIC.
case $host_os in
aix3*)
test "$enable_shared" = yes && enable_static=no
if test -n "$RANLIB"; then
archive_cmds="$archive_cmds~\$RANLIB \$lib"
postinstall_cmds='$RANLIB $lib'
fi
;;
aix4* | aix5*)
test "$enable_shared" = yes && enable_static=no
;;
esac
echo "$ac_t$enable_shared" 1>&6
# Make sure either enable_shared or enable_static is yes.
test "$enable_shared" = yes || enable_static=yes
echo "checking whether to build static libraries... $enable_static" 1>&6
if test "$hardcode_action" = relink; then
# Fast installation is not supported
enable_fast_install=no
elif test "$shlibpath_overrides_runpath" = yes ||
test "$enable_shared" = no; then
# Fast installation is not necessary
enable_fast_install=needless
fi
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
if test "$with_gcc" = yes; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
# Check whether we must set pic_mode to default
test -z "$pic_flag" && pic_mode=default
if test "x$enable_dlopen" != xyes; then
enable_dlopen=unknown
enable_dlopen_self=unknown
enable_dlopen_self_static=unknown
else
if test "X${lt_cv_dlopen+set}" != Xset; then
lt_cv_dlopen=no lt_cv_dlopen_libs=
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "$progname:1583: checking for dlopen in -ldl" >&5
if test "X${ac_cv_lib_dl_dlopen+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_lib_dl_dlopen=yes
else
echo "$progname: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_lib_dl_dlopen=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if test "X$ac_cv_lib_dl_dlopen" = Xyes; then
echo "$ac_t""yes" 1>&6
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
echo "$progname:1622: checking for dlopen" >&5
if test "X${ac_cv_func_dlopen+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char dlopen();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_dlopen) || defined (__stub___dlopen)
choke me
#else
dlopen();
#endif
; return 0; }
EOF
if { (eval echo $progname:1652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_dlopen=yes
else
echo "$progname: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_func_dlopen=no
fi
rm -f conftest*
fi
if test "X$ac_cv_func_dlopen" = Xyes; then
echo "$ac_t""yes" 1>&6
lt_cv_dlopen="dlopen"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
echo "$progname:1669: checking for dlopen in -lsvld" >&5
if test "X${ac_cv_lib_svld_dlopen+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lsvld $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_lib_svld_dlopen=yes
else
echo "$progname: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_lib_svld_dlopen=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if test "X$ac_cv_lib_svld_dlopen" = Xyes; then
echo "$ac_t""yes" 1>&6
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
echo "$progname:1708: checking for dld_link in -ldld" >&5
if test "X${ac_cv_lib_dld_dld_link+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_lib_dld_dld_link=yes
else
echo "$progname: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_lib_dld_dld_link=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if test "X$ac_cv_lib_dld_dld_link" = Xyes; then
echo "$ac_t""yes" 1>&6
lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for shl_load""... $ac_c" 1>&6
echo "$progname:1747: checking for shl_load" >&5
if test "X${ac_cv_func_shl_load+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char shl_load();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_shl_load) || defined (__stub___shl_load)
choke me
#else
shl_load();
#endif
; return 0; }
EOF
if { (eval echo $progname:1777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_shl_load=yes
else
echo "$progname: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_func_shl_load=no
fi
rm -f conftest*
fi
if test "X$ac_cv_func_shl_load" = Xyes; then
echo "$ac_t""yes" 1>&6
lt_cv_dlopen="shl_load"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
echo "$progname:1795: checking for shl_load in -ldld" >&5
if test "X${ac_cv_lib_dld_shl_load+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_lib_dld_shl_load=yes
else
echo "$progname: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_lib_dld_shl_load=no
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if test "X$ac_cv_lib_dld_shl_load" = Xyes; then
echo "$ac_t""yes" 1>&6
lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
else
echo "$ac_t""no" 1>&6
fi
fi
fi
fi
fi
fi
fi
if test "x$lt_cv_dlopen" != xno; then
enable_dlopen=yes
else
enable_dlopen=no
fi
case $lt_cv_dlopen in
dlopen)
for ac_hdr in dlfcn.h; do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "$progname:1863: checking for $ac_hdr" >&5
if eval "test \"`echo 'X$''{'ac_cv_header_$ac_safe'+set}'`\" = Xset"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
int fnord = 0;
int main () { return(0); }
EOF
ac_try="$ac_compile >/dev/null 2>conftest.out"
{ (eval echo $progname:1874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "$progname: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
else
echo "$ac_t""no" 1>&6
fi
done
if test "x$ac_cv_header_dlfcn_h" = xyes; then
CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
fi
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
LIBS="$lt_cv_dlopen_libs $LIBS"
echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
echo "$progname:1902: checking whether a program can dlopen itself" >&5
if test "X${lt_cv_dlopen_self+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
lt_cv_dlopen_self=cross
else
cat > conftest.$ac_ext <
#endif
#include
#ifdef RTLD_GLOBAL
# define LTDL_GLOBAL RTLD_GLOBAL
#else
# ifdef DL_GLOBAL
# define LTDL_GLOBAL DL_GLOBAL
# else
# define LTDL_GLOBAL 0
# endif
#endif
/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
find out it does not work in some platform. */
#ifndef LTDL_LAZY_OR_NOW
# ifdef RTLD_LAZY
# define LTDL_LAZY_OR_NOW RTLD_LAZY
# else
# ifdef DL_LAZY
# define LTDL_LAZY_OR_NOW DL_LAZY
# else
# ifdef RTLD_NOW
# define LTDL_LAZY_OR_NOW RTLD_NOW
# else
# ifdef DL_NOW
# define LTDL_LAZY_OR_NOW DL_NOW
# else
# define LTDL_LAZY_OR_NOW 0
# endif
# endif
# endif
# endif
#endif
void fnord() { int i=42; }
int main() {
void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); return 1;}
EOF
if { (eval echo $progname:1957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
lt_cv_dlopen_self=yes
else
echo "$progname: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
lt_cv_dlopen_self=no
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$lt_cv_dlopen_self" 1>&6
if test "$lt_cv_dlopen_self" = yes; then
LDFLAGS="$LDFLAGS $link_static_flag"
echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
echo "$progname:1976: checking whether a statically linked program can dlopen itself" >&5
if test "X${lt_cv_dlopen_self_static+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
lt_cv_dlopen_self_static=cross
else
cat > conftest.$ac_ext <
#endif
#include
#ifdef RTLD_GLOBAL
# define LTDL_GLOBAL RTLD_GLOBAL
#else
# ifdef DL_GLOBAL
# define LTDL_GLOBAL DL_GLOBAL
# else
# define LTDL_GLOBAL 0
# endif
#endif
/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
find out it does not work in some platform. */
#ifndef LTDL_LAZY_OR_NOW
# ifdef RTLD_LAZY
# define LTDL_LAZY_OR_NOW RTLD_LAZY
# else
# ifdef DL_LAZY
# define LTDL_LAZY_OR_NOW DL_LAZY
# else
# ifdef RTLD_NOW
# define LTDL_LAZY_OR_NOW RTLD_NOW
# else
# ifdef DL_NOW
# define LTDL_LAZY_OR_NOW DL_NOW
# else
# define LTDL_LAZY_OR_NOW 0
# endif
# endif
# endif
# endif
#endif
void fnord() { int i=42; }
int main() {
void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); return 1; }
EOF
if { (eval echo $progname:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
lt_cv_dlopen_self_static=yes
else
echo "$progname: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
lt_cv_dlopen_self_static=no
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
fi
;;
esac
case $lt_cv_dlopen_self in
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
*) enable_dlopen_self=unknown ;;
esac
case $lt_cv_dlopen_self_static in
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
*) enable_dlopen_self_static=unknown ;;
esac
fi
# Copy echo and quote the copy, instead of the original, because it is
# used later.
ltecho="$echo"
if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
ltecho="$CONFIG_SHELL \$0 --fallback-echo"
fi
LTSHELL="$SHELL"
LTCONFIG_VERSION="$VERSION"
# Only quote variables if we're using ltmain.sh.
case $ltmain in
*.sh)
# Now quote all the things that may contain metacharacters.
for var in ltecho old_AR old_AR_FLAGS old_CC old_LTCC old_CFLAGS old_CPPFLAGS \
old_MAGIC_CMD old_LD old_LDFLAGS old_LIBS \
old_LN_S old_NM old_RANLIB old_STRIP \
old_AS old_DLLTOOL old_OBJDUMP \
old_OBJEXT old_EXEEXT old_reload_flag \
old_deplibs_check_method old_file_magic_cmd \
AR AR_FLAGS CC LTCC LD LN_S NM LTSHELL LTCONFIG_VERSION \
reload_flag reload_cmds wl \
pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
thread_safe_flag_spec whole_archive_flag_spec libname_spec \
library_names_spec soname_spec \
RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
predep_objects postdep_objects predeps postdeps compiler_lib_search_path \
old_striplib striplib file_magic_cmd export_symbols_cmds \
deplibs_check_method allow_undefined_flag no_undefined_flag \
finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
hardcode_libdir_flag_spec hardcode_libdir_separator \
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
compiler_c_o need_locks exclude_expsyms include_expsyms; do
case $var in
reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
old_postinstall_cmds | old_postuninstall_cmds | \
export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
postinstall_cmds | postuninstall_cmds | \
finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
# Double-quote double-evaled strings.
eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ### testsuite: skip nested quoting test
;;
*)
eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ### testsuite: skip nested quoting test
;;
esac
done
case $ltecho in
*'\$0 --fallback-echo"')
ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
;;
esac
if test -z "$tagname"; then
trap "$rm \"$ofile\"; exit 1" 1 2 15
echo "creating $ofile"
$rm "$ofile"
cat < "$ofile"
#! $SHELL
# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
#
# Copyright (C) 1996-2000 Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit , 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 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# 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.
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
Xsed="sed -e s/^X//"
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
# The names of the tagged configurations supported by this script.
available_tags=
### BEGIN LIBTOOL CONFIG
EOF
else
echo "appending configuration tag \"$tagname\" to $ofile"
echo "### BEGIN LIBTOOL TAG CONFIG: $tagname" >> "$ofile"
fi
cfgfile="$ofile"
;;
*)
# Double-quote the variables that need it (for aesthetics).
for var in old_AR old_AR_FLAGS old_CC old_LTCC old_CFLAGS old_CPPFLAGS \
old_MAGIC_CMD old_LD old_LDFLAGS old_LIBS \
old_LN_S old_NM old_RANLIB old_STRIP \
old_AS old_DLLTOOL old_OBJDUMP \
old_OBJEXT old_EXEEXT old_reload_flag \
old_deplibs_check_method old_file_magic_cmd; do
eval "$var=\\\"\$var\\\""
done
# Just create a config file.
cfgfile="$ofile.cfg"
if test -z "$tagname"; then
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
echo "creating $cfgfile"
$rm "$cfgfile"
cat < "$cfgfile"
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
### BEGIN LIBTOOL CONFIG
EOF
else
echo "appending to $cfgfile"
echo "### BEGIN LIBTOOL TAG CONFIG: $tagname" >> "$ofile"
fi
;;
esac
cat <> "$cfgfile"
# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
# AR=$old_AR AR_FLAGS=$old_AR_FLAGS LTCC=$old_LTCC CC=$old_CC \\
# CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
# MAGIC_CMD=$old_MAGIC_CMD LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
# LN_S=$old_LN_S NM=$old_NM RANLIB=$old_RANLIB STRIP=$old_STRIP \\
# AS=$old_AS DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP \\
# objext=$old_OBJEXT exeext=$old_EXEEXT reload_flag=$old_reload_flag \\
# deplibs_check_method=$old_deplibs_check_method \\
# file_magic_cmd=$old_file_magic_cmd \\
# $0$ltconfig_args
#
# Compiler and other test output produced by $progname, useful for
# debugging $progname, is in ./config.log if it exists.
# The version of $progname that generated this script.
LTCONFIG_VERSION=$LTCONFIG_VERSION
# Shell to use when invoking shell scripts.
SHELL=$LTSHELL
# Whether or not to build shared libraries.
build_libtool_libs=$enable_shared
# Whether or not to add -lc for building shared libraries.
build_libtool_need_lc=$need_lc
# Whether or not to build static libraries.
build_old_libs=$enable_static
# Whether or not to optimize for fast installation.
fast_install=$enable_fast_install
# The host system.
host_alias=$host_alias
host=$host
# An echo program that does not interpret backslashes.
echo=$ltecho
# The archiver.
AR=$AR
AR_FLAGS=$AR_FLAGS
# A C compiler.
LTCC=$LTCC
# A language-specific compiler.
CC=$CC
# Is the compiler the GNU C compiler?
with_gcc=$with_gcc
# The linker used to build libraries.
LD=$LD
# Whether we need hard or soft links.
LN_S=$LN_S
# A BSD-compatible nm program.
NM=$NM
# A symbol stripping program
STRIP=$STRIP
# Used to examine libraries when file_magic_cmd begins "file"
MAGIC_CMD=$MAGIC_CMD
# Used on cygwin: DLL creation program.
DLLTOOL="$DLLTOOL"
# Used on cygwin: object dumper.
OBJDUMP="$OBJDUMP"
# Used on cygwin: assembler.
AS="$AS"
# The name of the directory that contains temporary libtool files.
objdir=$objdir
# How to create reloadable object files.
reload_flag=$reload_flag
reload_cmds=$reload_cmds
# How to pass a linker flag through the compiler.
wl=$wl
# Object file suffix (normally "o").
objext="$objext"
# Old archive suffix (normally "a").
libext="$libext"
# Executable file suffix (normally "").
exeext="$exeext"
# Additional compiler flags for building library objects.
pic_flag=$pic_flag
pic_mode=$pic_mode
# What is the maximum length of a command?
max_cmd_len=$max_cmd_len
# Does compiler simultaneously support -c and -o options?
compiler_c_o=$compiler_c_o
# Must we lock files when doing compilation ?
need_locks=$need_locks
# Do we need the lib prefix for modules?
need_lib_prefix=$need_lib_prefix
# Do we need a version for libraries?
need_version=$need_version
# Whether dlopen is supported.
dlopen_support=$enable_dlopen
# Whether dlopen of programs is supported.
dlopen_self=$enable_dlopen_self
# Whether dlopen of statically linked programs is supported.
dlopen_self_static=$enable_dlopen_self_static
# Compiler flag to prevent dynamic linking.
link_static_flag=$link_static_flag
# Compiler flag to turn off builtin functions.
no_builtin_flag=$no_builtin_flag
# Compiler flag to allow reflexive dlopens.
export_dynamic_flag_spec=$export_dynamic_flag_spec
# Compiler flag to generate shared objects directly from archives.
whole_archive_flag_spec=$whole_archive_flag_spec
# Compiler flag to generate thread-safe objects.
thread_safe_flag_spec=$thread_safe_flag_spec
# Library versioning type.
version_type=$version_type
# Format of library name prefix.
libname_spec=$libname_spec
# List of archive names. First name is the real one, the rest are links.
# The last name is the one that the linker finds with -lNAME.
library_names_spec=$library_names_spec
# The coded name of the library, if different from the real name.
soname_spec=$soname_spec
# Commands used to build and install an old-style archive.
RANLIB=$RANLIB
old_archive_cmds=$old_archive_cmds
old_postinstall_cmds=$old_postinstall_cmds
old_postuninstall_cmds=$old_postuninstall_cmds
# Create an old-style archive from a shared archive.
old_archive_from_new_cmds=$old_archive_from_new_cmds
# Create a temporary old-style archive to link instead of a shared archive.
old_archive_from_expsyms_cmds=$old_archive_from_expsyms_cmds
# Commands used to build and install a shared archive.
archive_cmds=$archive_cmds
archive_expsym_cmds=$archive_expsym_cmds
postinstall_cmds=$postinstall_cmds
postuninstall_cmds=$postuninstall_cmds
# Commands to strip libraries.
old_striplib=$old_striplib
striplib=$striplib
# Dependencies to place before the objects being linked to create a
# shared library.
predep_objects=$predep_objects
# Dependencies to place after the objects being linked to create a
# shared library.
postdep_objects=$postdep_objects
# Dependencies to place before the objects being linked to create a
# shared library.
predeps=$predeps
# Dependencies to place after the objects being linked to create a
# shared library.
postdeps=$postdeps
# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path=$compiler_lib_search_path
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$deplibs_check_method
# Command to use when deplibs_check_method == file_magic.
file_magic_cmd=$file_magic_cmd
# Flag that allows shared libraries with undefined symbols to be built.
allow_undefined_flag=$allow_undefined_flag
# Flag that forces no undefined symbols.
no_undefined_flag=$no_undefined_flag
# Commands used to finish a libtool library installation in a directory.
finish_cmds=$finish_cmds
# Same as above, but a single script fragment to be evaled but not shown.
finish_eval=$finish_eval
# Take the output of nm and produce a listing of raw symbols and C names.
global_symbol_pipe=$global_symbol_pipe
# Transform the output of nm in a proper C declaration
global_symbol_to_cdecl=$global_symbol_to_cdecl
# This is the shared library runtime path variable.
runpath_var=$runpath_var
# This is the shared library path variable.
shlibpath_var=$shlibpath_var
# Is shlibpath searched before the hard-coded library search path?
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
# How to hardcode a shared library path into an executable.
hardcode_action=$hardcode_action
# Whether we should hardcode library paths into libraries.
hardcode_into_libs=$hardcode_into_libs
# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator=$hardcode_libdir_separator
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
# resulting binary.
hardcode_direct=$hardcode_direct
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
hardcode_minus_L=$hardcode_minus_L
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
# the resulting binary.
hardcode_shlibpath_var=$hardcode_shlibpath_var
# Variables whose values should be saved in libtool wrapper scripts and
# restored at relink time.
variables_saved_for_relink="$variables_saved_for_relink"
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
# Compile-time system search path for libraries
sys_lib_search_path_spec=$sys_lib_search_path_spec
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
fix_srcfile_path="$fix_srcfile_path"
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols
# The commands to list exported symbols.
export_symbols_cmds=$export_symbols_cmds
# The commands to extract the exported symbol list from a shared archive.
extract_expsyms_cmds=$extract_expsyms_cmds
# Symbols that should not be listed in the preloaded symbols.
exclude_expsyms=$exclude_expsyms
# Symbols that must always be exported.
include_expsyms=$include_expsyms
EOF
if test -z "$tagname"; then
echo '### END LIBTOOL CONFIG' >> "$ofile"
else
echo "### END LIBTOOL TAG CONFIG: $tagname" >> "$ofile"
fi
case $ltmain in
*.sh)
echo >> "$ofile"
if test -z "$tagname"; then
case $host_os in
aix3*)
cat <<\EOF >> "$ofile"
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
if test "X${COLLECT_NAMES+set}" != Xset; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
EOF
;;
esac
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
cat <<'EOF' >> "$ofile"
# This is a source program that is used to create dlls on Windows
# Don't remove nor modify the starting and closing comments
# /* ltdll.c starts here */
# #define WIN32_LEAN_AND_MEAN
# #include
# #undef WIN32_LEAN_AND_MEAN
# #include
#
# #ifndef __CYGWIN__
# # ifdef __CYGWIN32__
# # define __CYGWIN__ __CYGWIN32__
# # endif
# #endif
#
# #ifdef __cplusplus
# extern "C" {
# #endif
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
# #ifdef __cplusplus
# }
# #endif
#
# #ifdef __CYGWIN__
# #include
# DECLARE_CYGWIN_DLL( DllMain );
# #endif
# HINSTANCE __hDllInstance_base;
#
# BOOL APIENTRY
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
# {
# __hDllInstance_base = hInst;
# return TRUE;
# }
# /* ltdll.c ends here */
# This is a source program that is used to create import libraries
# on Windows for dlls which lack them. Don't remove nor modify the
# starting and closing comments
# /* impgen.c starts here */
# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
#
# This file is part of GNU libtool.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# */
#
# #include /* for printf() */
# #include /* for open(), lseek(), read() */
# #include /* for O_RDONLY, O_BINARY */
# #include /* for strdup() */
#
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
# #ifndef O_BINARY
# #define O_BINARY 0
# #endif
#
# static unsigned int
# pe_get16 (fd, offset)
# int fd;
# int offset;
# {
# unsigned char b[2];
# lseek (fd, offset, SEEK_SET);
# read (fd, b, 2);
# return b[0] + (b[1]<<8);
# }
#
# static unsigned int
# pe_get32 (fd, offset)
# int fd;
# int offset;
# {
# unsigned char b[4];
# lseek (fd, offset, SEEK_SET);
# read (fd, b, 4);
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
# }
#
# static unsigned int
# pe_as32 (ptr)
# void *ptr;
# {
# unsigned char *b = ptr;
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
# }
#
# int
# main (argc, argv)
# int argc;
# char *argv[];
# {
# int dll;
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
# unsigned long export_rva, export_size, nsections, secptr, expptr;
# unsigned long name_rvas, nexp;
# unsigned char *expdata, *erva;
# char *filename, *dll_name;
#
# filename = argv[1];
#
# dll = open(filename, O_RDONLY|O_BINARY);
# if (dll < 1)
# return 1;
#
# dll_name = filename;
#
# for (i=0; filename[i]; i++)
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
# dll_name = filename + i +1;
#
# pe_header_offset = pe_get32 (dll, 0x3c);
# opthdr_ofs = pe_header_offset + 4 + 20;
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
#
# if (num_entries < 1) /* no exports */
# return 1;
#
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
# export_size = pe_get32 (dll, opthdr_ofs + 100);
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
# secptr = (pe_header_offset + 4 + 20 +
# pe_get16 (dll, pe_header_offset + 4 + 16));
#
# expptr = 0;
# for (i = 0; i < nsections; i++)
# {
# char sname[8];
# unsigned long secptr1 = secptr + 40 * i;
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
# lseek(dll, secptr1, SEEK_SET);
# read(dll, sname, 8);
# if (vaddr <= export_rva && vaddr+vsize > export_rva)
# {
# expptr = fptr + (export_rva - vaddr);
# if (export_rva + export_size > vaddr + vsize)
# export_size = vsize - (export_rva - vaddr);
# break;
# }
# }
#
# expdata = (unsigned char*)malloc(export_size);
# lseek (dll, expptr, SEEK_SET);
# read (dll, expdata, export_size);
# erva = expdata - export_rva;
#
# nexp = pe_as32 (expdata+24);
# name_rvas = pe_as32 (expdata+32);
#
# printf ("EXPORTS\n");
# for (i = 0; i> "$ofile" || (rm -f "$ofile"; exit 1)
# We use sed instead of cat because bash on DJGPP gets confused if
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
chmod +x "$ofile"
fi
;;
*)
# Compile the libtool program.
echo "FIXME: would compile $ltmain"
;;
esac
# Update the list of available tags.
if test -n "$tagname"; then
# Extract list of available tagged configurations in $ofile.
# Note that this assumes the entire list is on one line.
available_tags=`grep "^available_tags=" $ofile | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
# Append the new tag name to the list of available tags.
available_tags="$available_tags $tagname"
# Now substitute the updated of available tags.
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' ${ofile} > ${ofile}.new"; then
mv ${ofile}.new ${ofile}
chmod +x "$ofile"
else
rm -f ${ofile}.new
echo "$progname: unable to update list of available tagged configurations."
exit 1
fi
fi
# Don't cache tagged configuration!
test -n "$cache_file" && test -z "$tagname" || exit 0
# AC_CACHE_SAVE
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs. It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already. You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
sed -n \
-e "s/'/'\\\\''/g" \
-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
;;
esac >> confcache
if cmp -s $cache_file confcache; then
:
else
if test -w $cache_file; then
echo "updating cache $cache_file"
cat confcache > $cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
exit 0
# Local Variables:
# mode:shell-script
# sh-indentation:2
# End:
ed2k_hash-0.3.3/admin/conf.change.pl 0000644 0001750 0001750 00000010240 07535440717 016144 0 ustar tiago tiago #!/usr/bin/perl -w
# this script patches a config.status file, to use our own perl script
# in the main loop
# we do it this way to circumvent hacking (and thereby including)
# autoconf function (which are GPL) into our LGPL acinclude.m4.in
# written by Michael Matz
# adapted by Dirk Mueller
# we have to change two places
# 1. the splitting of the substitutions into chunks of 90 (or even 48 in
# later autoconf's
# 2. the big main loop which patches all Makefile.in's
use File::Basename;
my $ac_aux_dir = dirname($0);
my ($flag);
local $ac_version = 0;
my $vpath_seen = 0;
$flag = 0;
while (<>) {
# usage of $flag: 0 -- we have seen nothing yet
# 1 -- we are in (1)
# 2 -- we have ended (1)
# 3 -- we are in (2)
# 4 -- we ended (2)
if ($flag == 4) {
print;
} elsif ($flag == 0) {
# 1. begins with (including): "ac_max_sed_\S+\s*=\s*[0-9]+..."
# ends with (excluding) "CONFIG_FILE=..."
# in later autoconf (2.14.1) there is no CONFIG_FILES= line,
# but instead the (2) directly follow (1)
if (/^\s*ac_max_sed_([a-z]+).*=\s*([0-9]+)/ ) {
$flag = 1;
if ($1 eq 'lines') {
# lets hope its different with 2141,
# wasn't able to verify that
if ($2 eq '48') {
$ac_version = 250;
}
else {
$ac_version = 2141;
}
} elsif ($1 eq 'cmds') {
$ac_version = 213;
}
# hmm, we don't know the autoconf version, but we try anyway
} else {
print;
}
} elsif ($flag == 1) {
if (/^\s*CONFIG_FILES=/ && ($ac_version != 250)) {
print;
$flag = 2;
} elsif (/^\s*for\s+ac_file\s+in\s+.*CONFIG_FILES/ ) {
$flag = 3;
}
} elsif ($flag == 2) {
# 2. begins with: "for ac_file in.*CONFIG_FILES" (the next 'for' after (1))
# end with: "rm -f conftest.s\*"
# on autoconf 250, it ends with '# CONFIG_HEADER section'
if (/^\s*for\s+ac_file\s+in\s+.*CONFIG_FILES/ ) {
$flag = 3;
} else {
print;
}
} elsif ($flag == 3) {
if (/^\s*rm\s+-f\s+conftest/ ) {
$flag = 4;
&insert_main_loop();
} elsif (/^\s*rm\s+-f\s+.*ac_cs_root/ ) {
$flag = 4;
&insert_main_loop();
#die "hhhhhhh";
if ($ac_version != 2141) {
print STDERR "hmm, don't know autoconf version\n";
}
} elsif (/^\#\s*CONFIG_HEADER section.*/) {
$flag = 4;
&insert_main_loop();
if($ac_version != 250) {
print STDERR "hmm, something went wrong :-(\n";
}
} elsif (/VPATH/ ) {
$vpath_seen = 1;
}
}
}
die "wrong input (flag != 4)" unless $flag == 4;
print STDERR "hmm, don't know autoconf version\n" unless $ac_version;
sub insert_main_loop {
if ($ac_version == 250) {
&insert_main_loop_250();
}
else {
&insert_main_loop_213();
}
}
sub insert_main_loop_250 {
print <>\$tmp/subs.sed
EOF
}
print <> \$tmp/subs.files
fi
done
if test -f \$tmp/subs.files ; then
perl $ac_aux_dir/config.pl "\$tmp/subs.sed" "\$tmp/subs.files" "\$srcdir" "\$INSTALL"
fi
rm -f \$tmp/subs.files
fi
EOF
return;
}
sub insert_main_loop_213 {
print <> \$ac_cs_root.subs
EOF
}
print <> \$ac_cs_root.sacfiles
fi
done
if test -f \$ac_cs_root.sacfiles ; then
perl $ac_aux_dir/config.pl "\$ac_cs_root.subs" "\$ac_cs_root.sacfiles" "\$ac_given_srcdir" "\$ac_given_INSTALL"
fi
rm -f \$ac_cs_root.s*
EOF
return;
}
ed2k_hash-0.3.3/admin/configure.in.min 0000644 0001750 0001750 00000003600 07535440717 016533 0 ustar tiago tiago dnl This file is part of the KDE libraries/packages
dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
dnl This file is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Library General Public
dnl License as published by the Free Software Foundation; either
dnl version 2 of the License, or (at your option) any later version.
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Library General Public License for more details.
dnl You should have received a copy of the GNU Library General Public License
dnl along with this library; see the file COPYING.LIB. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
# Original Author was Kalle@kde.org
# I lifted it in some mater. (Stephan Kulow)
# I used much code from Janos Farkas
dnl Process this file with autoconf to produce a configure script.
AC_INIT(acinclude.m4) dnl a source file from your sub dir
dnl This is so we can use kde-common
AC_CONFIG_AUX_DIR(admin)
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
unset CDPATH
dnl Checking host/target/build systems, for make, install etc.
AC_CANONICAL_SYSTEM
dnl Perform program name transformation
AC_ARG_PROGRAM
dnl Automake doc recommends to do this only here. (Janos)
AM_INIT_AUTOMAKE(@MODULENAME@, @VERSION@) dnl searches for some needed programs
KDE_SET_PREFIX
dnl generate the config header
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
dnl Checks for programs.
AC_CHECK_COMPILERS
AC_ENABLE_SHARED(yes)
AC_ENABLE_STATIC(no)
KDE_PROG_LIBTOOL
dnl for NLS support. Call them in this order!
dnl WITH_NLS is for the po files
AM_KDE_WITH_NLS
dnl KDE_USE_QT
AC_PATH_KDE