add xchat r1489
parent
f16af8be94
commit
4a6ceffb98
@ -0,0 +1,51 @@
|
||||
Just some tips if you're going to help with xchat code (patches etc):
|
||||
|
||||
* Use tabs, not spaces, to indent code.
|
||||
|
||||
* Use a tab size of 3 (most editors will let you choose this).
|
||||
Type :set ts=3 in vim/gvim.
|
||||
|
||||
* Try to stick to the same consistant coding style:
|
||||
|
||||
void
|
||||
routine (void)
|
||||
{
|
||||
if (function (a, b, c))
|
||||
{
|
||||
x = a + 1;
|
||||
}
|
||||
}
|
||||
|
||||
(vertically aligned braces, a space after if, while, functions etc).
|
||||
|
||||
* Don't use "//" C++ style comments, some compilers don't like them.
|
||||
|
||||
* When opening a file with unix level functions (open, read/write, close)
|
||||
as opposed to the C-level functions (fopen, fwrite/fread, fclose), use
|
||||
the OFLAGS macro. This makes sure it'll work on Win32 aswell as unix e.g:
|
||||
|
||||
fh = open ("file", OFLAGS | O_RDONLY);
|
||||
|
||||
* Use closesocket() for sockets, and close() for normal files.
|
||||
|
||||
* Don't read() from sockets, instead use recv().
|
||||
|
||||
* Please provide unified format diffs (run diff -u).
|
||||
|
||||
* Call your patch something more meaningfull than xchat.diff (I get a
|
||||
million of these files!).
|
||||
|
||||
* To make a really nice and clean patch, do something like this:
|
||||
|
||||
Have two directories, unpacked from the original archive:
|
||||
xchat-2.0.0/
|
||||
xchat-2.0.0p1/
|
||||
Then edit/compile the xchat-2.0.0p1 directory. When you're done, make
|
||||
a patch with:
|
||||
|
||||
cd xchat-2.0.0p1
|
||||
make distclean
|
||||
cd ..
|
||||
diff -urN xchat-2.0.0 xchat-2.0.0p1 > xchat-something.diff
|
||||
|
||||
If using nmake (Windows) replace "make distclean" with "nmake -f makefile.msc clean"
|
@ -0,0 +1,49 @@
|
||||
X-Chat Requirements:
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- GTK 2.6+ (it comes with your Linux)
|
||||
|
||||
Optional:
|
||||
|
||||
- Perl (http://www.perl.org)
|
||||
- Python (http://www.python.org)
|
||||
- TCL (http://tcl.activestate.com)
|
||||
- OpenSSL (http://www.openssl.org)
|
||||
|
||||
|
||||
|
||||
X-Chat Compiling and Installation:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Type this:
|
||||
|
||||
./configure
|
||||
make
|
||||
|
||||
Become root and type:
|
||||
|
||||
make install
|
||||
|
||||
|
||||
Other Options
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
To get a full list of compile options, type:
|
||||
|
||||
./configure --help
|
||||
|
||||
|
||||
If you do not have GNU Gettext installed, instead use:
|
||||
|
||||
./configure --disable-nls
|
||||
|
||||
|
||||
If you want to disable Perl you can do:
|
||||
|
||||
./configure --disable-perl
|
||||
|
||||
|
||||
If you want to install a smaller stripped binary (without debug) do:
|
||||
|
||||
make install-strip
|
||||
|
@ -0,0 +1,117 @@
|
||||
COMPILING ON WIN32
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
It is not easy! Be warned! You need either one of these compilers:
|
||||
|
||||
* Mingw (http://www.mingw.org)
|
||||
* MS Visual C
|
||||
|
||||
Note: This source code is meant for Linux/Unix like systems. Compiling this for
|
||||
Windows will produce a below-par quality product. The official XChat for Windows
|
||||
is not built with this unix source code.
|
||||
|
||||
|
||||
Getting GTK
|
||||
~~~~~~~~~~~
|
||||
|
||||
You also need GTK+ 2.10 for win32. Altough the GTK packages from the GIMP
|
||||
website are larger and harder to install they work very well.
|
||||
|
||||
1) Get the following packages from:
|
||||
http://www.gimp.org/~tml/gimp/win32/downloads.html
|
||||
|
||||
- gtk+-2.4.3.tar.gz
|
||||
- gtk+-dev-2.4.3.tar.gz
|
||||
- dirent.zip
|
||||
- gettext-runtime-0.13.1.zip
|
||||
- gettext-tools-0.13.1.zip
|
||||
- atk-1.6.0.zip
|
||||
- atk-dev-1.6.0.zip
|
||||
- pango-1.4.0.zip
|
||||
- pango-dev-1.4.0.zip
|
||||
- libpng (http://gnuwin32.sourceforge.net/packages/libpng.htm) Binaries & Developer files.
|
||||
- GNU libiconv (Not source files)
|
||||
- glib-2.4.2.zip
|
||||
- glib-dev-2.4.2.zip
|
||||
- pkgconfig-0.15.zip
|
||||
- Zlib121-dll.zip
|
||||
|
||||
2) Extract all files to a suitable place such as c:\devtools
|
||||
|
||||
3) Windows 2000, XP & 2003 users:
|
||||
- Start->(Settings->)Control Panel->System Applet
|
||||
- Advanced Tab->Environment Variables
|
||||
- Under "User variables for <user>" append ";C:\devtools" to the end of the PATH Variable
|
||||
- Click Ok twice and close the Control Panel
|
||||
|
||||
For Windows 9x users your basicly on your own for now.
|
||||
|
||||
|
||||
Mingw
|
||||
~~~~~
|
||||
|
||||
I havn't tried this yet, but ./configure --disable-xlib would be a start.
|
||||
|
||||
|
||||
MS Visual C
|
||||
~~~~~~~~~~~
|
||||
|
||||
|
||||
1) Edit src\makeinc.msc
|
||||
|
||||
You need to change the variables GLIB, GTK and LIBS to point
|
||||
the correct paths for your harddrive. Use the program pkg-config
|
||||
to find this information.
|
||||
|
||||
a) paste the output of `pkg-config glib-2.0 --msvc-syntax --cflags`
|
||||
to the GLIB = ... line.
|
||||
|
||||
b) paste the output of `pkg-config gtk+-2.0 --msvc-syntax --cflags`
|
||||
to the GTK = ... line.
|
||||
|
||||
c) paste the output of `pkg-config gtk+-2.0 --msvc-syntax --libs`
|
||||
to the LIBS = ... line.
|
||||
|
||||
2) In MSVC's includes directory, copy io.h to unistd.h.
|
||||
|
||||
MS VC++ 6
|
||||
~~~~~~~~~
|
||||
|
||||
3) Download Platform SDK from http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
|
||||
(you only need Core SDK) - ~200 MB Download (Be warned).
|
||||
4) Open the build enviroment.
|
||||
|
||||
a) If your planning on developing modifications to the xchat code go:
|
||||
Start->Programs->Microsoft Platform SDK...->Open Build Enviroment...->(Choose OS)->... (Debug)
|
||||
|
||||
b) If your compiling just to use xchat and wish to no recieve debug messages:
|
||||
Start->Programs->Microsoft Platform SDK...->Open Build Enviroment...->(Choose OS)->... (Retail)
|
||||
5) Change directory into where you have download the xchat source to and type this:
|
||||
cd src
|
||||
nmake -f makefile.msc clean
|
||||
nmake -f makefile.msc
|
||||
6) Copy fe-gtk\xchat.exe to another place.
|
||||
MS VC++ 7 (.NET)
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
3) Open the Visual Studio .NET Command Prompt
|
||||
|
||||
4) Change directory into where you have download the xchat source to and type this:
|
||||
cd src
|
||||
nmake -f makefile.msc clean
|
||||
nmake -f makefile.msc
|
||||
5) Copy fe-gtk\xchat.exe to another place.
|
||||
|
||||
|
||||
Common problems:
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
* gdk-pixbuf-csource must be in PATH.
|
||||
FIX: See step 3 for setting up GTK
|
||||
|
||||
* You might need to install dirent.zip manually.
|
||||
FIX: Copy C:\devtools\include\dirent.h to C:\devtools\include\glib-2.0\dirent.h
|
||||
|
||||
* Include path to libintl.h should be in GLIB= (makeinc.msc).
|
||||
FIX: Copy C:\devtools\include\libintl.h to C:\devtools\include\glib-2.0\libintl.h
|
||||
|
||||
|
@ -0,0 +1,12 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
SUBDIRS = po intl src plugins
|
||||
|
||||
EXTRA_DIST = autogen.sh HACKING INSTALL.w32 faq.html xchat.png \
|
||||
xchat.desktop xchat.spec config.h.w32 xchat.ico
|
||||
|
||||
icon_DATA = xchat.png
|
||||
icondir = $(datadir)/pixmaps
|
||||
|
||||
util_DATA = xchat.desktop
|
||||
utildir = $(datadir)/applications
|
@ -0,0 +1,103 @@
|
||||
X-Chat README
|
||||
~~~~~~~~~~~~~
|
||||
X-Chat ("xchat") Copyright (c) 1998-2010 By Peter Zelezny.
|
||||
|
||||
This program is released under the GPL v2 with the additional exemption
|
||||
that compiling, linking, and/or using OpenSSL is allowed. You may
|
||||
provide binary packages linked to the OpenSSL libraries, provided that
|
||||
all other requirements of the GPL are met.
|
||||
See file COPYING for details.
|
||||
|
||||
|
||||
What is it?
|
||||
~~~~~~~~~~~
|
||||
X-Chat is an IRC client for UNIX operating systems. I.R.C. is Internet
|
||||
Relay Chat, see http://irchelp.org for more information about IRC in
|
||||
general. Xchat runs on most BSD and POSIX compliant operating systems.
|
||||
|
||||
|
||||
Requirements:
|
||||
~~~~~~~~~~~~~
|
||||
* GTK+ 2.10 (this is available at http://www.gtk.org).
|
||||
|
||||
X-Chat is known to work on, at least:
|
||||
|
||||
* Linux
|
||||
* FreeBSD
|
||||
* OpenBSD
|
||||
* NetBSD
|
||||
* Solaris
|
||||
* AIX
|
||||
* IRIX
|
||||
* DEC/Compaq Tru64 UNIX
|
||||
* HP-UX 10.20 and 11
|
||||
* MacOS X
|
||||
* Windows XP/2000/Vista/7
|
||||
|
||||
|
||||
Notes for packagers:
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
If you need your packages to work on i386, you don't need to compile with
|
||||
--disable-mmx, because it's also checked at run-time.
|
||||
|
||||
|
||||
Python Scripts:
|
||||
~~~~~~~~~~~~~~~
|
||||
Scripts for 1.8.x are not compatible, and a brand new interface has be
|
||||
written. Documentation can be found here: http://xchat.org/docs/.
|
||||
Consider using the Python interface for your scripts, it's a very nice
|
||||
API, allows for loading/unloading individual scripts, and gives you
|
||||
almost all the features of the C-Plugin API.
|
||||
|
||||
|
||||
Perl Scripts:
|
||||
~~~~~~~~~~~~~
|
||||
Scripts for 1.8.x are compatible with the following exceptions:
|
||||
|
||||
* IRC::command will not interpret %C, %B, %U etc.
|
||||
|
||||
* user_list and user_list_short:
|
||||
If a user has both op and voice, only the op flag will be 1.
|
||||
|
||||
* add_user_list/sub_user_list/clear_user_list
|
||||
These functions do nothing.
|
||||
|
||||
* notify_list
|
||||
Not implemented. Always returns an empty list.
|
||||
|
||||
* server_list
|
||||
Lists servers that are not connected aswell.
|
||||
|
||||
* Some print events may have new names and some were added.
|
||||
|
||||
* Text printed by scripts must now be UTF8.
|
||||
|
||||
* Text passed to scripts (via add_message_handler) will be encoded in UTF8.
|
||||
|
||||
|
||||
Autoloading Perl Scripts and Plugins
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
* X-Chat automatically loads, at startup:
|
||||
~/.xchat2/*.pl Perl scripts
|
||||
~/.xchat2/*.py Python scripts
|
||||
~/.xchat2/*.so Plugins
|
||||
$(libdir)/xchat/plugins/*.so plugins
|
||||
(this usually translates to /usr/lib/xchat/plugins/*.so)
|
||||
|
||||
|
||||
Control Codes:
|
||||
~~~~~~~~~~~~~~
|
||||
%% - A single percentage sign
|
||||
%C - Control-C (mIRC color code)
|
||||
%B - Bold Text
|
||||
%U - Underline Text
|
||||
%R - Reverse Text
|
||||
%O - Reset all Text attributes
|
||||
%XXX - ASCII XXX (where XXX is a decimal 3 digit number)
|
||||
(Eg: %007 sends a BEEP)
|
||||
|
||||
%Cforeground,background will produce a color code, eg: %C03,10
|
||||
|
||||
These are now disabled by default (see Settings > Prefs > Input Box).
|
||||
Instead you can insert the real codes via ctrl-k, ctrl-b and ctrl-o.
|
@ -0,0 +1,40 @@
|
||||
dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
|
||||
dnl
|
||||
dnl example
|
||||
dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
|
||||
dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
|
||||
|
||||
AC_DEFUN([AS_AC_EXPAND],
|
||||
[
|
||||
EXP_VAR=[$1]
|
||||
FROM_VAR=[$2]
|
||||
|
||||
dnl first expand prefix and exec_prefix if necessary
|
||||
prefix_save=$prefix
|
||||
exec_prefix_save=$exec_prefix
|
||||
|
||||
dnl if no prefix given, then use /usr/local, the default prefix
|
||||
if test "x$prefix" = "xNONE"; then
|
||||
prefix=$ac_default_prefix
|
||||
fi
|
||||
dnl if no exec_prefix given, then use prefix
|
||||
if test "x$exec_prefix" = "xNONE"; then
|
||||
exec_prefix=$prefix
|
||||
fi
|
||||
|
||||
full_var="$FROM_VAR"
|
||||
dnl loop until it doesn't change anymore
|
||||
while true; do
|
||||
new_full_var="`eval echo $full_var`"
|
||||
if test "x$new_full_var"="x$full_var"; then break; fi
|
||||
full_var=$new_full_var
|
||||
done
|
||||
|
||||
dnl clean up
|
||||
full_var=$new_full_var
|
||||
AC_SUBST([$1], "$full_var")
|
||||
|
||||
dnl restore prefix and exec_prefix
|
||||
prefix=$prefix_save
|
||||
exec_prefix=$exec_prefix_save
|
||||
])
|
@ -0,0 +1,113 @@
|
||||
#!/bin/bash
|
||||
have_automake=false
|
||||
|
||||
if automake --version < /dev/null > /dev/null 2>&1 ; then
|
||||
automake_version=`automake --version | grep 'automake (GNU automake)' | sed 's/^[^0-9]*\(.*\)/\1/'`
|
||||
case $automake_version in
|
||||
1.2*|1.3*|1.4|1.4*|1.5*|1.6*|1.7*|1.8*)
|
||||
;;
|
||||
*)
|
||||
have_automake=true
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if $have_automake ; then
|
||||
AUTOMAKE="automake"
|
||||
ACLOCAL="aclocal"
|
||||
else
|
||||
if automake-1.9 --version < /dev/null > /dev/null 2>&1 ; then
|
||||
AUTOMAKE="automake-1.9"
|
||||
ACLOCAL="aclocal-1.9"
|
||||
else
|
||||
echo "automake missing or too old. This requires atleast automake 1.9"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# ------ START GETTEXT ------
|
||||
|
||||
echo searching for GNU gettext intl directory...
|
||||
|
||||
dirs="/usr/share /usr/local/share /opt/share /usr /usr/local /opt /usr/gnu/share /opt/local /opt/local/share"
|
||||
found=0
|
||||
for try in $dirs; do
|
||||
echo -n " -> $try/gettext/intl... "
|
||||
if test -d $try/gettext/intl; then
|
||||
echo found it
|
||||
found=1
|
||||
break
|
||||
fi
|
||||
echo no
|
||||
done
|
||||
if test "$found" != 1; then
|
||||
echo ERROR: Cannot find gettext/intl directory.
|
||||
echo ERROR: Install GNU gettext in /usr or /usr/local prefix.
|
||||
exit 7
|
||||
fi;
|
||||
|
||||
echo copying gettext intl files...
|
||||
if test -f $try/gettext/mkinstalldirs; then
|
||||
ln -s $try/gettext/mkinstalldirs mkinstalldirs
|
||||
fi
|
||||
intldir="$try/gettext/intl"
|
||||
if test ! -d intl; then
|
||||
mkdir intl
|
||||
fi
|
||||
olddir=`pwd`
|
||||
cd $intldir
|
||||
for file in *; do
|
||||
if test $file != COPYING.LIB-2.0 && test $file != COPYING.LIB-2.1; then
|
||||
rm -f $olddir/intl/$file
|
||||
cp $intldir/$file $olddir/intl/
|
||||
fi
|
||||
done
|
||||
cp -f $try/gettext/po/Makefile.in.in $olddir/po/
|
||||
cd $olddir
|
||||
if test -f intl/plural.c; then
|
||||
sleep 2
|
||||
touch intl/plural.c
|
||||
fi
|
||||
|
||||
# ------ END GETTEXT ------
|
||||
|
||||
|
||||
echo running $ACLOCAL...
|
||||
$ACLOCAL $ACLOCAL_FLAGS
|
||||
if test "$?" != "0"; then
|
||||
echo aclocal failed, stopping.
|
||||
exit 2
|
||||
fi
|
||||
echo running libtoolize...
|
||||
libtoolize --force
|
||||
if test "$?" != "0"; then
|
||||
echo libtoolize failed, stopping.
|
||||
exit 3
|
||||
fi
|
||||
echo running autoheader...
|
||||
autoheader
|
||||
if test "$?" != "0"; then
|
||||
echo autoheader failed, stopping.
|
||||
exit 4
|
||||
fi
|
||||
echo running $AUTOMAKE...
|
||||
$AUTOMAKE -a --foreign
|
||||
if test "$?" != "0"; then
|
||||
echo automake failed, stopping.
|
||||
exit 5
|
||||
fi
|
||||
echo running autoconf...
|
||||
autoconf
|
||||
if test "$?" != "0"; then
|
||||
echo autoconf failed, stopping.
|
||||
exit 6
|
||||
fi
|
||||
|
||||
echo if no errors occured, run ./configure --enable-maintainer-mode
|
||||
exit 0
|
||||
|
||||
#autogen.sh generates:
|
||||
# aclocal.m4 Makefile.in config.guess config.sub ltmain.sh
|
||||
# configure install-sh missing mkinstalldirs depcomp
|
||||
#
|
||||
#configure generates:
|
||||
# config.status libtool Makefile.in
|
@ -0,0 +1,12 @@
|
||||
#define LOCALEDIR "./locale"
|
||||
#define ENABLE_NLS
|
||||
#define USE_GMODULE
|
||||
#define USE_PLUGIN
|
||||
#define PACKAGE_NAME "xchat"
|
||||
#define PACKAGE_VERSION "2.8.8-Unofficial"
|
||||
#define XCHATLIBDIR "."
|
||||
#define XCHATSHAREDIR "."
|
||||
#define OLD_PERL
|
||||
#ifndef USE_IPV6
|
||||
#define socklen_t int
|
||||
#endif
|
@ -0,0 +1,571 @@
|
||||
#! /bin/sh
|
||||
# Output a system dependent set of variables, describing how to set the
|
||||
# run time search path of shared libraries in an executable.
|
||||
#
|
||||
# Copyright 1996-2005 Free Software Foundation, Inc.
|
||||
# Taken from GNU libtool, 2001
|
||||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# The first argument passed to this file is the canonical host specification,
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
# or
|
||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
|
||||
# should be set by the caller.
|
||||
#
|
||||
# The set of defined variables is at the end of this script.
|
||||
|
||||
# Known limitations:
|
||||
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
|
||||
# than 256 bytes, otherwise the compiler driver will dump core. The only
|
||||
# known workaround is to choose shorter directory names for the build
|
||||
# directory and/or the installation directory.
|
||||
|
||||
# All known linkers require a `.a' archive for static linking (except M$VC,
|
||||
# which needs '.lib').
|
||||
libext=a
|
||||
shrext=.so
|
||||
|
||||
host="$1"
|
||||
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
|
||||
cc_basename=`echo "$CC" | sed -e 's%^.*/%%'`
|
||||
|
||||
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
|
||||
|
||||
wl=
|
||||
if test "$GCC" = yes; then
|
||||
wl='-Wl,'
|
||||
else
|
||||
case "$host_os" in
|
||||
aix*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
darwin*)
|
||||
case "$cc_basename" in
|
||||
xlc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
mingw* | pw32* | os2*)
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
newsos6)
|
||||
;;
|
||||
linux*)
|
||||
case $cc_basename in
|
||||
icc* | ecc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
pgcc | pgf77 | pgf90)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
ccc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
como)
|
||||
wl='-lopt='
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sco3.2v5*)
|
||||
;;
|
||||
solaris*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sunos4*)
|
||||
wl='-Qoption ld '
|
||||
;;
|
||||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sysv4*MP*)
|
||||
;;
|
||||
unicos*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
uts4*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
|
||||
|
||||
hardcode_libdir_flag_spec=
|
||||
hardcode_libdir_separator=
|
||||
hardcode_direct=no
|
||||
hardcode_minus_L=no
|
||||
|
||||
case "$host_os" in
|
||||
cygwin* | mingw* | pw32*)
|
||||
# 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 "$GCC" != yes; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
openbsd*)
|
||||
with_gnu_ld=no
|
||||
;;
|
||||
esac
|
||||
|
||||
ld_shlibs=yes
|
||||
if test "$with_gnu_ld" = yes; then
|
||||
case "$host_os" in
|
||||
aix3* | aix4* | aix5*)
|
||||
# On AIX/PPC, the GNU linker is very broken
|
||||
if test "$host_cpu" != ia64; then
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> 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 cannot use
|
||||
# them.
|
||||
ld_shlibs=no
|
||||
;;
|
||||
beos*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
netbsd*)
|
||||
;;
|
||||
solaris* | sysv5*)
|
||||
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
|
||||
ld_shlibs=no
|
||||
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
linux*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "$ld_shlibs" = yes; then
|
||||
# Unlike libtool, we use -rpath here, not --rpath, since the documented
|
||||
# option of GNU ld is called -rpath, not --rpath.
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
fi
|
||||
else
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
# Note: this linker hardcodes the directories in LIBPATH if there
|
||||
# are no directories specified by -L.
|
||||
hardcode_minus_L=yes
|
||||
if test "$GCC" = yes; then
|
||||
# Neither direct hardcoding nor static linking is supported with a
|
||||
# broken collect2.
|
||||
hardcode_direct=unsupported
|
||||
fi
|
||||
;;
|
||||
aix4* | aix5*)
|
||||
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
|
||||
else
|
||||
aix_use_runtimelinking=no
|
||||
# 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 runtime linking.
|
||||
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
|
||||
for ld_flag in $LDFLAGS; do
|
||||
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
|
||||
aix_use_runtimelinking=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
esac
|
||||
fi
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_separator=':'
|
||||
if test "$GCC" = yes; then
|
||||
case $host_os in aix4.[012]|aix4.[012].*)
|
||||
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
|
||||
hardcode_minus_L=yes
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_libdir_separator=
|
||||
fi
|
||||
esac
|
||||
fi
|
||||
# Begin _LT_AC_SYS_LIBPATH_AIX.
|
||||
echo 'int main () { return 0; }' > conftest.c
|
||||
${CC} ${LDFLAGS} conftest.c -o conftest
|
||||
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||
}'`
|
||||
if test -z "$aix_libpath"; then
|
||||
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||
}'`
|
||||
fi
|
||||
if test -z "$aix_libpath"; then
|
||||
aix_libpath="/usr/lib:/lib"
|
||||
fi
|
||||
rm -f conftest.c conftest
|
||||
# End _LT_AC_SYS_LIBPATH_AIX.
|
||||
if test "$aix_use_runtimelinking" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||
else
|
||||
if test "$host_cpu" = ia64; then
|
||||
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
|
||||
else
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# see comment about different semantics on the GNU ld section
|
||||
ld_shlibs=no
|
||||
;;
|
||||
bsdi[45]*)
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
# 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=' '
|
||||
libext=lib
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
hardcode_direct=no
|
||||
if test "$GCC" = yes ; then
|
||||
:
|
||||
else
|
||||
case "$cc_basename" in
|
||||
xlc*)
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
dgux*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
freebsd1*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
freebsd2.2*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
freebsd2*)
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
freebsd* | kfreebsd*-gnu | dragonfly*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
hpux9*)
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
hpux10* | hpux11*)
|
||||
if test "$with_gnu_ld" = no; then
|
||||
case "$host_cpu" in
|
||||
hppa*64*)
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=no
|
||||
;;
|
||||
ia64*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_direct=no
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
*)
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
netbsd*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
newsos6)
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
openbsd*)
|
||||
hardcode_direct=yes
|
||||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
else
|
||||
case "$host_os" in
|
||||
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
os2*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
osf3*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
osf4* | osf5*)
|
||||
if test "$GCC" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
else
|
||||
# Both cc and cxx compiler support -rpath directly
|
||||
hardcode_libdir_flag_spec='-rpath $libdir'
|
||||
fi
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
sco3.2v5*)
|
||||
;;
|
||||
solaris*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
sysv4)
|
||||
case $host_vendor in
|
||||
sni)
|
||||
hardcode_direct=yes # is this really true???
|
||||
;;
|
||||
siemens)
|
||||
hardcode_direct=no
|
||||
;;
|
||||
motorola)
|
||||
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
sysv4.3*)
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
ld_shlibs=yes
|
||||
fi
|
||||
;;
|
||||
sysv4.2uw2*)
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=no
|
||||
;;
|
||||
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
|
||||
;;
|
||||
sysv5*)
|
||||
hardcode_libdir_flag_spec=
|
||||
;;
|
||||
uts4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Check dynamic linker characteristics
|
||||
# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
|
||||
libname_spec='lib$name'
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
;;
|
||||
aix4* | aix5*)
|
||||
;;
|
||||
amigaos*)
|
||||
;;
|
||||
beos*)
|
||||
;;
|
||||
bsdi[45]*)
|
||||
;;
|
||||
cygwin* | mingw* | pw32*)
|
||||
shrext=.dll
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
shrext=.dylib
|
||||
;;
|
||||
dgux*)
|
||||
;;
|
||||
freebsd1*)
|
||||
;;
|
||||
kfreebsd*-gnu)
|
||||
;;
|
||||
freebsd*)
|
||||
;;
|
||||
gnu*)
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
case "$host_cpu" in
|
||||
ia64*)
|
||||
shrext=.so
|
||||
;;
|
||||
hppa*64*)
|
||||
shrext=.sl
|
||||
;;
|
||||
*)
|
||||
shrext=.sl
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
case "$host_os" in
|
||||
irix5* | nonstopux*)
|
||||
libsuff= shlibsuff=
|
||||
;;
|
||||
*)
|
||||
case $LD in
|
||||
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
|
||||
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
|
||||
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
|
||||
*) libsuff= shlibsuff= ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
linux*oldld* | linux*aout* | linux*coff*)
|
||||
;;
|
||||
linux*)
|
||||
;;
|
||||
knetbsd*-gnu)
|
||||
;;
|
||||
netbsd*)
|
||||
;;
|
||||
newsos6)
|
||||
;;
|
||||
nto-qnx*)
|
||||
;;
|
||||
openbsd*)
|
||||
;;
|
||||
os2*)
|
||||
libname_spec='$name'
|
||||
shrext=.dll
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
;;
|
||||
sco3.2v5*)
|
||||
;;
|
||||
solaris*)
|
||||
;;
|
||||
sunos4*)
|
||||
;;
|
||||
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
||||
;;
|
||||
sysv4*MP*)
|
||||
;;
|
||||
uts4*)
|
||||
;;
|
||||
esac
|
||||
|
||||
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
|
||||
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
|
||||
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
|
||||
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
||||
|
||||
# How to pass a linker flag through the compiler.
|
||||
wl="$escaped_wl"
|
||||
|
||||
# Static library suffix (normally "a").
|
||||
libext="$libext"
|
||||
|
||||
# Shared library suffix (normally "so").
|
||||
shlibext="$shlibext"
|
||||
|
||||
# Flag to hardcode \$libdir into a binary during linking.
|
||||
# This must work even if \$libdir does not exist.
|
||||
hardcode_libdir_flag_spec="$escaped_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"
|
||||
|
||||
EOF
|
@ -0,0 +1,837 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT([XChat],[2.8.8],[http://www.xchat.org/],[xchat])
|
||||
|
||||
AC_PREREQ([2.59])
|
||||
AC_COPYRIGHT([Copyright (C) 1998-2010 Peter Zelezny])
|
||||
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_SRCDIR([configure.in])
|
||||
|
||||
AM_INIT_AUTOMAKE([1.9 dist-bzip2 subdir-objects no-define])
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_CPP
|
||||
AM_PROG_AS
|
||||
AM_DISABLE_STATIC
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
dnl -----------------------------------------------------------
|
||||
dnl Language Support
|
||||
dnl -----------------------------------------------------------
|
||||
GETTEXT_PACKAGE=xchat
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
|
||||
|
||||
ALL_LINGUAS="be ca cs de el es fi fr gl hu it ja kn ko lt mk nl pa pl pt ru sq sr sv th uk vi zh_CN zh_TW"
|
||||
AM_GNU_GETTEXT
|
||||
|
||||
dnl displaced from acconfig.h
|
||||
AH_VERBATIM([OLD_PERL],[#undef OLD_PERL])
|
||||
AH_VERBATIM([PREFIX],[#undef PREFIX])
|
||||
AH_VERBATIM([XCHATLIBDIR],[#undef XCHATLIBDIR])
|
||||
AH_VERBATIM([XCHATSHAREDIR],[#undef XCHATSHAREDIR])
|
||||
AH_VERBATIM([SOCKS],[#undef SOCKS])
|
||||
AH_VERBATIM([USE_MSPROXY],[#undef USE_MSPROXY])
|
||||
dnl AH_VERBATIM([USE_GNOME],[#undef USE_GNOME])
|
||||
AH_VERBATIM([USE_SHM],[#undef USE_SHM])
|
||||
AH_VERBATIM([USE_GTKSPELL],[#undef USE_GTKSPELL])
|
||||
AH_VERBATIM([USE_LIBSEXY],[#undef USE_LIBSEXY])
|
||||
AH_VERBATIM([USE_IPV6],[#undef USE_IPV6])
|
||||
AH_VERBATIM([USE_MMX],[#undef USE_MMX])
|
||||
AH_VERBATIM([USE_OPENSSL],[#undef USE_OPENSSL])
|
||||
AH_VERBATIM([USE_PLUGIN],[#undef USE_PLUGIN])
|
||||
AH_VERBATIM([USE_XFT],[#undef USE_XFT])
|
||||
AH_VERBATIM([USE_XLIB],[#undef USE_XLIB])
|
||||
AH_VERBATIM([USE_SIGACTION],[#undef USE_SIGACTION])
|
||||
AH_VERBATIM([USING_FREEBSD],[#undef USING_FREEBSD])
|
||||
AH_VERBATIM([USING_LINUX],[#undef USING_LINUX])
|
||||
AH_VERBATIM([socklen_t],[#undef socklen_t])
|
||||
AH_VERBATIM([USE_DBUS],[#undef USE_DBUS])
|
||||
|
||||
AC_PATH_PROG(sedpath, sed)
|
||||
if test "_$sedpath" = _; then
|
||||
AC_MSG_ERROR("Cannot find sed: I need it\!")
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(unamepath, uname)
|
||||
if test "_$unamepath" = _; then
|
||||
system="unknown"
|
||||
else
|
||||
AC_MSG_CHECKING(system type)
|
||||
system=`$unamepath -s`
|
||||
AC_MSG_RESULT($system)
|
||||
if test "$system" = "Linux"; then
|
||||
AC_DEFINE(USING_LINUX)
|
||||
fi
|
||||
if test "$system" = "FreeBSD"; then
|
||||
AC_DEFINE(USING_FREEBSD)
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl ** configure switches ***********************************************
|
||||
dnl *********************************************************************
|
||||
|
||||
AC_ARG_ENABLE(socks,
|
||||
[ --enable-socks link with SOCKS5 library (default: no)],
|
||||
socks=$enableval, socks=no)
|
||||
|
||||
AC_ARG_ENABLE(ipv6,
|
||||
[ --enable-ipv6 enable IPv6 (default: no)],
|
||||
ipv6=$enableval, ipv6=no)
|
||||
|
||||
AC_ARG_ENABLE(xft,
|
||||
[ --enable-xft enable use of Xft directly (default: no)],
|
||||
xft=$enableval, xft=no)
|
||||
|
||||
AC_ARG_ENABLE(openssl,
|
||||
[ --enable-openssl[=PATH] enable use of openSSL],
|
||||
openssl=$enableval, openssl=yes)
|
||||
|
||||
AC_ARG_ENABLE(gtkfe,
|
||||
[ --disable-gtkfe disable building gtk frontend],
|
||||
gtkfe=$enableval, gtkfe=yes)
|
||||
|
||||
AC_ARG_ENABLE(textfe,
|
||||
[ --enable-textfe build the text frontend (default: no)],
|
||||
textfe=$enableval, textfe=no)
|
||||
|
||||
dnl AC_ARG_ENABLE(gnome,
|
||||
dnl [ --disable-gnome disable use of gnome],
|
||||
dnl gnome=$enableval, gnome=yes)
|
||||
|
||||
AC_ARG_ENABLE(xlib,
|
||||
[ --disable-xlib disable use of xlib (for non X11 systems)],
|
||||
xlib=$enableval, xlib=yes)
|
||||
|
||||
AC_ARG_ENABLE(python,
|
||||
[ --disable-python don't build the python plugin],
|
||||
python=$enableval, python=yes)
|
||||
|
||||
AC_ARG_ENABLE(perl,
|
||||
[ --disable-perl don't build the perl plugin],
|
||||
perl=$enableval, perl=yes)
|
||||
|
||||
AC_ARG_ENABLE(perl_old,
|
||||
[ --disable-perl_old no backwards compatibility for perl plugin],
|
||||
perl_old=$enableval, perl_old=yes)
|
||||
|
||||
AC_ARG_ENABLE(tcl,
|
||||
[ --enable-tcl[=PATH] directory with Tcl config file: tclConfig.sh],
|
||||
tcl=$enableval, tcl=yes)
|
||||
|
||||
AC_ARG_ENABLE(plugin,
|
||||
[ --disable-plugin disable plugin support],
|
||||
plugin=$enableval, plugin=yes)
|
||||
|
||||
AC_ARG_ENABLE(dbus,
|
||||
[ --disable-dbus disable DBUS support],
|
||||
dbus=$enableval, dbus=yes)
|
||||
|
||||
AC_ARG_ENABLE(mmx,
|
||||
[ --disable-mmx disable MMX assembly routines],
|
||||
mmx=$enableval, mmx=yes)
|
||||
|
||||
AC_ARG_ENABLE(shm,
|
||||
[ --enable-shm enable use of XShm for fast tinting (default: no)],
|
||||
shm=$enableval, shm=no)
|
||||
|
||||
AC_ARG_ENABLE(spell,
|
||||
[ --enable-spell=type enable spelling type: none static libsexy gtkspell],
|
||||
spell=$enableval, spell=libsexy)
|
||||
|
||||
AC_ARG_ENABLE(ntlm,
|
||||
[ --enable-ntlm enable Microsoft's NTLM auth (libntlm) library support (default: no)],
|
||||
ntlm=$enableval, ntlm=no)
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl ** GLIB *************************************************************
|
||||
dnl *********************************************************************
|
||||
|
||||
AM_PATH_GLIB_2_0(2.0.3, glib=yes, glib=no)
|
||||
if test "$glib" = no; then
|
||||
AC_MSG_ERROR("Cannot find glib")
|
||||
fi
|
||||
|
||||
COMMON_CFLAGS="$GLIB_CFLAGS"
|
||||
COMMON_LIBS="$GLIB_LIBS"
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl ** GTK **************************************************************
|
||||
dnl *********************************************************************
|
||||
|
||||
AM_PATH_GTK_2_0(2.10.0, havegtk=yes, havegtk=no)
|
||||
|
||||
if test "$havegtk" = no; then
|
||||
gtkfe=no
|
||||
echo
|
||||
echo Cannot find GTK\! Not building GTK FrontEnd.
|
||||
echo
|
||||
fi
|
||||
|
||||
if test "$gtkfe" != yes; then
|
||||
gnome=no
|
||||
COMMON_LIBS="$GLIB_LIBS"
|
||||
COMMON_CFLAGS="$GLIB_CFLAGS"
|
||||
fi
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl ** GNOME ************************************************************
|
||||
dnl *********************************************************************
|
||||
|
||||
GUI_LIBS="$GUI_LIBS $GTK_LIBS"
|
||||
GUI_CFLAGS="$GUI_CFLAGS $GTK_CFLAGS"
|
||||
|
||||
gnome=no
|
||||
#if test "$gnome" = yes; then
|
||||
# AC_PATH_PROG(pkgconfigpath, pkg-config)
|
||||
# AC_MSG_CHECKING(Gnome2 compile flags)
|
||||
# GNOME_CFLAGS="`$pkgconfigpath libgnome-2.0 --cflags 2>/dev/null`"
|
||||
# if test "_$GNOME_CFLAGS" = _ ; then
|
||||
# gnome=no
|
||||
# AC_MSG_RESULT([Gnome not found, building without it.])
|
||||
# else
|
||||
# GNOME_VER="`$pkgconfigpath libgnome-2.0 --modversion`"
|
||||
# GUI_LIBS="$GUI_LIBS `$pkgconfigpath libgnome-2.0 --libs`"
|
||||
# GUI_CFLAGS="$GUI_CFLAGS $GNOME_CFLAGS"
|
||||
# AC_DEFINE(USE_GNOME)
|
||||
# AC_MSG_RESULT(ok)
|
||||
# fi
|
||||
#fi
|
||||
|
||||
# GConf
|
||||
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl ** XFT **************************************************************
|
||||
dnl *********************************************************************
|
||||
|
||||
if test "$xft" = yes; then
|
||||
AC_PATH_PROG(pkgconfigpath, pkg-config)
|
||||
if $pkgconfigpath xft --exists; then
|
||||
GUI_CFLAGS="$GUI_CFLAGS `$pkgconfigpath xft --cflags`"
|
||||
GUI_LIBS="$GUI_LIBS `$pkgconfigpath xft --libs`"
|
||||
else
|
||||
xft=no
|
||||
oldCPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
|
||||
AC_CHECK_HEADERS(X11/Xft/Xft.h, xft=yes)
|
||||
CPPFLAGS=$oldCPPFLAGS
|
||||
fi
|
||||
if test "$xft" = yes; then
|
||||
AC_DEFINE(USE_XFT)
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl ** XLIB *************************************************************
|
||||
dnl *********************************************************************
|
||||
|
||||
if test "$xlib" = yes; then
|
||||
AC_DEFINE(USE_XLIB)
|
||||
if test "$system" = "SunOS"; then
|
||||
LIBS="$LIBS -L/usr/openwin/lib -lX11"
|
||||
else
|
||||
AC_CHECK_LIB(X11, XSetWMHints)
|
||||
fi
|
||||
else
|
||||
shm=no
|
||||
fi
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl ** PERL *************************************************************
|
||||
dnl *********************************************************************
|
||||
|
||||
if test "$perl" = yes; then
|
||||
AC_PATH_PROG(perlpath, perl)
|
||||
AC_MSG_CHECKING(for Perl compile flags)
|
||||
PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
|
||||
if test "_$PERL_CFLAGS" = _ ; then
|
||||
AC_MSG_RESULT([not found, building without perl.])
|
||||
perl=no
|
||||
else
|
||||
PERL_LDFLAGS=`$perlpath -MExtUtils::Embed -e ldopts |$sedpath 's/-lgdbm //'`
|
||||
PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-ldb //'`
|
||||
PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lndbm //'`
|
||||
if test "$system" = "Linux"; then
|
||||
PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lnsl //'`
|
||||
PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lposix //'`
|
||||
fi
|
||||
PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lc //'`
|
||||
AC_MSG_RESULT(ok)
|
||||
|
||||
# oldLIBS=$LIBS
|
||||
# LIBS="$LIBS $PERL_LDFLAGS"
|
||||
# AC_CHECK_FUNC(eval_pv)
|
||||
# AC_CHECK_FUNC(call_pv)
|
||||
# LIBS=$oldLIBS
|
||||
|
||||
AC_MSG_CHECKING(for perl >= 5.8.0)
|
||||
PERL_VER=`$perlpath -e 'print $]>= 5.008?"yes":"no"'`
|
||||
if test "$PERL_VER" = "yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_MSG_CHECKING(if perl plugin will be backward compatible)
|
||||
if test "$perl_old" = "yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(OLD_PERL)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
echo "perl version too old, building without perl."
|
||||
perl=no
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl ** PYTHON ***********************************************************
|
||||
dnl *********************************************************************
|
||||
|
||||
if test "$python" = yes; then
|
||||
AC_PATH_PROG(pythonpath, python2)
|
||||
if test "_$pythonpath" = _ ; then
|
||||
AC_PATH_PROG(pythonpath, python)
|
||||
fi
|
||||
if test "_$pythonpath" = _ ; then
|
||||
python=no
|
||||
else
|
||||
AC_MSG_CHECKING(Python version)
|
||||
changequote(<<, >>)dnl
|
||||
PY_VER=`$pythonpath -c 'import distutils.sysconfig; print distutils.sysconfig.get_config_vars("VERSION")[0];'`
|
||||
PY_LIB=`$pythonpath -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(standard_lib=1);'`
|
||||
PY_INC=`$pythonpath -c 'import distutils.sysconfig; print distutils.sysconfig.get_config_vars("INCLUDEPY")[0];'`
|
||||
$pythonpath -c "import sys; map(int,sys.version[:3].split('.')) >= [2,2] or sys.exit(1)"
|
||||
changequote([, ])dnl
|
||||
AC_MSG_RESULT($PY_VER)
|
||||
if test "$?" != "1"; then
|
||||
AC_MSG_CHECKING(Python compile flags)
|
||||
PY_PREFIX=`$pythonpath -c 'import sys; print sys.prefix'`
|
||||
PY_EXEC_PREFIX=`$pythonpath -c 'import sys; print sys.exec_prefix'`
|
||||
if test -f $PY_INC/Python.h; then
|
||||
PY_LIBS="-L$PY_LIB/config -lpython$PY_VER -lpthread -lutil"
|
||||
PY_CFLAGS="-I$PY_INC"
|
||||
AC_MSG_RESULT(ok)
|
||||
else
|
||||
python=no
|
||||
AC_MSG_RESULT([Can't find Python.h])
|
||||
fi
|
||||
else
|
||||
echo "Python too old. Only 2.2 or above is supported."
|
||||
python=no
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl ** TCL **************************************************************
|
||||
dnl *********************************************************************
|
||||
|
||||
AC_MSG_CHECKING(for location of tclConfig.sh)
|
||||
dirs="$tcl /lib /usr/lib /usr/tcl/lib /usr/lib/tcl8.4 /usr/local/lib /usr/local/tcl-8.4/lib /usr/local/tcl/lib /opt/lib /usr/lib/tcl8.3"
|
||||
found=0
|
||||
if test "$tcl" != "no"; then
|
||||
tcl=no
|
||||
for try in $dirs; do
|
||||
if test -f $try/tclConfig.sh; then
|
||||
found=1
|
||||
. $try/tclConfig.sh
|
||||
TCL_LIBS="$TCL_LIB_SPEC $TCL_LIBS"
|
||||
TCL_CFLAGS="-I${TCL_PREFIX}/include $TCL_INCLUDE_SPEC"
|
||||
tcl=yes
|
||||
AC_MSG_RESULT($try/tclConfig.sh)
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test "$found" -eq 0 ; then
|
||||
AC_MSG_RESULT([tclConfig.sh not found - use the --enable-tcl option])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl ** IPv6 *************************************************************
|
||||
dnl *********************************************************************
|
||||
|
||||
dnl purely for Solaris
|
||||
AC_CHECK_FUNC(select, ,
|
||||
AC_CHECK_LIB(socket, select, ,
|
||||
AC_CHECK_LIB(nsl, select, ,
|
||||
AC_CHECK_LIB(inet, select, ,
|
||||
AC_CHECK_LIB(cposix, select, ,
|
||||
AC_CHECK_LIB(net, select, ,
|
||||
AC_MSG_WARN(i can not find select. you might need to help me)))))))
|
||||
AC_CHECK_LIB(socket, select)
|
||||
|
||||
if test "$ipv6" = yes; then
|
||||
AC_CHECK_FUNCS(getaddrinfo, have_getaddrinfo=yes)
|
||||
AC_MSG_CHECKING(whether to enable IPv6 support)
|
||||
if test "$have_getaddrinfo" = yes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_IPV6)
|
||||
else
|
||||
ipv6=no
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl *********************************************************************
|
||||
dnl ** OPENSSL **********************************************************
|
||||
dnl *********************************************************************
|
||||
|
||||
retry=no
|
||||
if test "$openssl" != no; then
|
||||
AC_PATH_PROG(pkgconfigpath, pkg-config)
|
||||
AC_MSG_CHECKING(for openssl through pkg-config)
|
||||
if $pkgconfigpath openssl --exists; then
|
||||
CPPFLAGS="$CPPFLAGS `$pkgconfigpath openssl --cflags`"
|
||||
LIBS="$LIBS `$pkgconfigpath openssl --libs`"
|
||||
AC_DEFINE(USE_OPENSSL)
|
||||
AC_MSG_RESULT(yes)
|
||||
openssl=yes
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
retry=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$retry" = "yes"; then
|
||||