Commit e33ed6d6 authored by Christoph Berg's avatar Christoph Berg

Import Upstream version 2.3

parent 202eece7
See README for authorship and acknowledgements.
UNIX Morse Code Tutor, Version 2.2
----------------------------------
The source code for UnixCW version 2.3 comes with a 'configure' file. Its job
is to try and decide which features your system offers, and then configure
UnixCW the best way it can for these features.
About the source
----------------
The source code for Unixcw version 2.2 comes with a 'configure' file,
whose job it is to try and decide which features your system offers,
and then configures Unixcw the best way it can for these features.
At minimum, you will need a set of sound card definitions (usually in the file
soundcard.h) and perhaps also a KIOCSOUND console sound ioctl available on your
system; these are used to build the CW library. Note that it's not necessary
for the system doing the build to actually have a sound card, nor for that
matter, a working console speaker, but you will need the definitions from
various header files. Of course, you will need a sound card or console speaker
if you want to run any of the programs once they are built.
At minimum, you will need a set of sound card definitions (usually in
the file soundcard.h) and a KIOCSOUND console sound ioctl available on
your system; this is necessary to build the CW library. Note that
it's not necessary for the system doing the build to actually have a
sound card, nor for that matter, a working console speaker, but you
will need the definitions from various header files. Of course, you
will need a sound card or console speaker if you want to run any of
the programs once they are built.
If you have a Curses library, Unixcw will build 'cwcp'. And if you
have a Qt library and a C++ compiler, it will also build 'xcwcp'. You
need to set the environment variable
If you have a Curses library, UnixCW will build 'cwcp'. And if you have a Qt
library, version 3.1 or later, and a C++ compiler, it will also build 'xcwcp'.
You need to set the environment variable
QTDIR
to indicate the Qt library directory on your system, for example
export QTDIR=/usr/lib/qt-2.1.0
export QTDIR=/usr/lib/qt-3.1
if QTDIR is not already set. The configure script will look for the Qt
'moc' utility on either your current $PATH or in $QTDIR/bin.
if QTDIR is not already set. The configure script will look for the Qt 'moc'
utility on either your current $PATH or in $QTDIR/bin.
Unixcw may port to other platforms, but the primary target systems on
which it should "just build", perhaps with a bit of tweaking as shown
above with environment variables, are:
UnixCW may port to other platforms, but the primary target systems on which it
should "just build", perhaps with a bit of tweaking as shown above with
environment variables, are:
o Linux
o Caldera Open UNIX
o Caldera OpenServer
o FreeBSD
Building Unixcw version 2.2
---------------------------
To build the CW library and the Unixcw applications, you should be
able to type the following commands in the directory where you
unpacked the source code:
To build the CW library and the UnixCW applications, you should be able to type
the following commands in the directory where you unpacked the source code:
./configure
make all
'configure' will tell you of any problems with missing features on
your system. If you lack a Qt library, it will omit building 'xcwcp'.
If you lack a Curses library, it will omit building 'cwcp'. The other
components should still build, however.
'configure' will tell you of any problems with missing features on your system.
If you lack a Qt library, it will omit building 'xcwcp'. If you lack a Curses
library, it will omit building 'cwcp'. The other components should still
build, however.
Installing the library, man pages, and programs
-----------------------------------------------
Assuming the 'make all' succeeded, you can now install the programs
with
Assuming the 'make all' succeeded, you can now install the programs with
make install
By default, this will install everything under /usr/local. You would
probably want to be 'root' to do this, otherwise you may not have the
permissions to do this.
Note that it is not necessary to install the programs in order to run
them. You should be able to run any of them in the directories in
which they built themselves.
If you want icons for xcwcp, there are two Xpm icon files in the
xcwcp subdirectory:
icon_xcwcp.xpm
icon_mini_xcwcp.xpm
By default, this will install everything under /usr/local. You would probably
want to be 'root' to do this, otherwise you may not have the permissions to
write files to the installation directory.
And as you will see if you look at them, I don't have much ability at
all in the area of graphic design.
Note that it is not necessary to install the programs in order to run them.
You should be able to run any of them in the directories in which they built
themselves.
Uninstalling Unixcw
-------------------
To uninstall the programs, use
make uninstall
with the same user/permissions as you used for installing. To clean
out the directory for a rebuild, use
with the same user/permissions as you used for installing. To clean out the
directory for a rebuild, use
make distclean
If you have autoconf installed on your system, you can regenerate the
configure file, if you like, from configure.in, with
If you have autoconf and the other auto* tools installed on your system, you
can regenerate the configure file, if you like, from configure.in, with
make maintainer-clean
autoconf
Notes
-----
Caldera OpenServer does not contain nroff/groff by default. You will
therefore have to handle the man pages manually for this platform.
Caldera OpenServer contains a 'cw' binary as standard, in /usr/bin/cw.
Make sure that /usr/local/bin, or wherever you installed Unixcw, appears
first in your $PATH.
sh autogen.sh
Under some circumstances, Caldera Open UNIX's curses library hijacks the
SIGALRM signal handler vector. This causes cwcp to hang up, normally
just after stopping sending. Until the curses library is changed, the
only current solution is to avoid using cwcp on Open UNIX, or to use the
Linux version of the program under Open UNIX's Linux Kernel Personality.
# vi: set ts=8 shiftwidth=8:
#
# Makefile for G0FRD CW tutor for UNIX flavours
# Copyright (C) 2001, 2002 Simon Baldwin (simonb@caldera.com)
# Copyright (C) 2001-2006 Simon Baldwin (simon_baldwin@yahoo.com)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
......@@ -18,55 +18,41 @@
#
#
SHELL = /bin/sh
SUBDIRS = @SUBDIRS@
include Makefile.inc
DIST = unixcw-2.2
SHELL = /bin/sh
SUBDIRS = src
#
# Portability options
#
GZIP = @GZIP@
DIST = unixcw-2.3
#
# Top level makefile - descends into subdirectories and executes the make in
# these one at a time.
#
# Macro to support descending into selected subdirectories.
DESCEND = for subdir in $(SUBDIRS); do \
( cd $$subdir; $(MAKE) $@ ); \
done
#
# Targets that do nothing other than descend.
#
all install install-strip uninstall clean TAGS info dvi check:
$(DESCEND)
#
# Targets that do just a little more than this.
#
distclean mostlyclean:
rm -f $(DIST).tar $(DIST).tar.gz $(DIST).tgz
rm -f Makefile config.h
rm -f config.status config.cache config.log
$(DESCEND)
maintainer-clean:
rm -f $(DIST).tar $(DIST).tar.gz $(DIST).tgz
rm -f configure
rm -f Makefile config.h
rm -f Makefile.inc src/config.h src/config.h.in~
rm -f config.status config.cache config.log
$(DESCEND)
rm -rf autom4te.cache
maintainer-clean: distclean
rm -f configure src/config.h.in aclocal.m4 configure.scan autoscan.log
rm -f po/UnixCW.po
-rmdir po
dist: distclean
rm -f $(DIST).tar $(DIST).tar.gz $(DIST).tgz
rm -f $(DIST); ln -s . $(DIST)
FILES="`ls -d $(DIST)/* | grep -v '^$(DIST)/$(DIST)$$'`"; \
tar cvf $(DIST).tar $$FILES
tar zcvf $(DIST).tgz $$FILES
rm $(DIST)
$(GZIP) -9 $(DIST).tar
if [ -f $(DIST).tar.gz ]; then \
mv $(DIST).tar.gz $(DIST).tgz; \
fi
# vi: set ts=8 shiftwidth=8:
# vim: set syntax=make:syntax on:
#
# Copyright (C) 2001-2006 Simon Baldwin (simon_baldwin@yahoo.com)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# 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.
#
# Autoconfigure definitions.
AC_CC = @CC@
AC_CFLAGS = @CFLAGS@
AC_CXX = @CXX@
AC_CXXFLAGS = @CXXFLAGS@
AC_DEFS = @DEFS@
AC_GZIP = @GZIP@
AC_LDCONFIG = @LDCONFIG@
AC_LIBS = @LIBS@
AC_AWK = @AWK@
AC_RANLIB = @RANLIB@
AC_QTDIR = @QTDIR@
AC_QTMOC = @QTMOC@
AC_CFLAG_PIC = @CFLAG_PIC@
AC_SUBDIRS = @SUBDIRS@
AC_CC_LINKS_SO = @CC_LINKS_SO@
AC_LD_LINKS_SO = @LD_LINKS_SO@
AC_LD = @LD@
AC_LN_S = @LN_S@
# Portability values.
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
prefix = @prefix@
exec_prefix = @exec_prefix@
includedir = @includedir@
bindir = @bindir@
mandir = @mandir@
libdir = @libdir@
This diff is collapsed.
#!/bin/sh
# vi: set ts=2 shiftwidth=2 expandtab:
#
# Copyright (C) 2001-2006 Simon Baldwin (simon_baldwin@yahoo.com)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# 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.
#
autoheader
touch NEWS README AUTHORS ChangeLog
touch stamp-h
aclocal
autoconf
mkdir -p po
find src \( -name '*.c' -o -name '*.cc' -o -name '*.h' \) -print \
| xargs xgettext -k_ -kN_ -p po -d UnixCW
This diff is collapsed.
# vi: set ts=2 shiftwidth=2 expandtab:
#
# Copyright (C) 2001-2006 Simon Baldwin (simon_baldwin@yahoo.com)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# 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.
#
# General initializations.
AC_PREREQ(2.57)
AC_INIT([UnixCW], 2.3, [simon_baldwin@yahoo.com])
# Specify a configuration header.
AC_CONFIG_HEADERS(src/config.h)
# General checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_AWK
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_LN_S
# Check specifically for gzip and ldconfig, and substitute the harmless ":"
# if absent.
AC_PATH_PROG(GZIP, gzip, ,)
if test -z "$GZIP" ; then
GZIP=":"
fi
AC_PATH_PROG(LDCONFIG, ldconfig, ,)
if test -z "$LDCONFIG" ; then
LDCONFIG=":"
fi
AC_SUBST(GZIP)
AC_SUBST(LDCONFIG)
# Checks for libraries.
AC_CHECK_LIB(curses, initscr)
# Checks for header files, and refuse to go on if no KIOCSOUND is available.
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h strings.h sys/ioctl.h \
sys/param.h sys/time.h unistd.h locale.h libintl.h])
AC_CHECK_HEADERS([sys/kd.h sys/vtkd.h sys/kbio.h])
if test "$ac_cv_header_sys_kd_h" = 'no' \
&& test "$ac_cv_header_sys_vtkd_h" = 'no' \
&& test "$ac_cv_header_sys_kbio_h" = 'no' ; then
AC_MSG_ERROR([Cannot find either sys/kd.h, sys/vtkd.h, or sys/kbio.h])
fi
AC_CHECK_HEADERS([soundcard.h sys/soundcard.h])
if test "$ac_cv_header_soundcard_h" = 'no' \
&& test "$ac_cv_header_sys_soundcard_h" = 'no' ; then
AC_MSG_ERROR([Cannot find either soundcard.h or sys/soundcard.h])
fi
AC_CHECK_HEADERS([getopt.h])
AC_CHECK_HEADERS([string.h strings.h])
if test "$ac_cv_header_string_h" = 'no' \
&& test "$ac_cv_header_strings_h" = 'no' ; then
AC_MSG_WARN([Cannot find either string.h or strings.h])
fi
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_C_VOLATILE
# Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_STRCOLL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([floor gettimeofday memset sqrt strchr strdup strrchr \
strtoul getopt_long setlocale memmove select strerror strspn])
AC_FUNC_SELECT_ARGTYPES
# Decide on which subdirectories to build; substitute into SUBDIRS. Build
# cwcp if curses is available, and xcwcp if Qt is available.
SUBDIRS="cwlib cwutils cw cwgen"
# Simple test for curses based on prior library check.
if test $ac_cv_lib_curses_initscr = 'yes' ; then
SUBDIRS="$SUBDIRS cwcp"
else
AC_MSG_WARN([Cannot find libcurses - unable to build cwcp])
fi
# Look for $QTDIR. If found, then look for moc, either on $PATH, or
# in $QTDIR/bin.
MOC_EARLIEST=3
if test -n "$QTDIR" ; then
AC_PATH_PROG(QTMOC, moc, , $QTDIR/bin:$PATH)
if test -n "$QTMOC" ; then
MOC_VERSION="`$QTMOC -v 2>&1 | sed -e 's;.*(Qt ;;' -e 's;).*;;'`"
if test -n "$MOC_VERSION" ; then
MOC_MAJOR="`echo $MOC_VERSION | sed -e 's;\..*;;'`"
expr "$MOC_MAJOR" + 0 >/dev/null 2>/dev/null
status=$?
if test -n "$MOC_MAJOR" -a $status -eq 0 ; then
if test "$MOC_MAJOR" -ge $MOC_EARLIEST ; then
SUBDIRS="$SUBDIRS xcwcp"
AC_SUBST(QTDIR)
AC_SUBST(QTMOC)
else
AC_MSG_WARN([Found 'moc' $MOC_VERSION - unable to build xcwcp])
AC_MSG_WARN([Hint: xcwcp requires 'moc' version >= $MOC_EARLIEST])
fi
else
AC_MSG_WARN([Cannot find 'moc' version - unable to build xcwcp])
AC_MSG_WARN([Hint: ensure 'moc' is in QTDIR/bin on your PATH])
fi
else
AC_MSG_WARN([Cannot find 'moc' version - unable to build xcwcp])
AC_MSG_WARN([Hint: ensure 'moc' is in QTDIR/bin on your PATH])
fi
else
AC_MSG_WARN([Cannot find 'moc' - unable to build xcwcp])
AC_MSG_WARN([Hint: ensure 'moc' is in QTDIR/bin on your PATH])
fi
else
AC_MSG_WARN([Cannot find libqt - unable to build xcwcp])
AC_MSG_WARN([Hint: try setting a value for the QTDIR variable])
fi
AC_SUBST(SUBDIRS)
# Add -Wall, -W, -pedantic, and other paranoia to gcc command flags, and -Wall
# to with a few suppressions to icc command flags, then similarly, though less
# so, for g++ and icpc.
if test "`basename $CC`" = "gcc" ; then
CFLAGS="$CFLAGS -Wall -W -pedantic -Wfloat-equal -Wpointer-arith"
CFLAGS="$CFLAGS -Wcast-qual -Wwrite-strings -Wmissing-prototypes"
CFLAGS="$CFLAGS -Wstrict-prototypes -Wmissing-declarations -Wredundant-decls"
else
if test "`basename $CC`" = "icc" ; then
CFLAGS="$CFLAGS -Wall -wd181,188,279,383,593,810,981,1469"
fi
fi
if test "`basename $CXX`" = "g++" ; then
CXXFLAGS="$CXXFLAGS -Wall -W -pedantic -Wno-long-long"
else
if test "`basename $CXX`" = "icpc" ; then
CXXFLAGS="$CXXFLAGS -Wall -wd181,188,279,383,593,810,981,1469"
fi
fi
# Determine if -fPIC or -KPIC is available for building .so libraries.
# Because gcc complains about invalid flags, but then continues, we have to
# check by searching the compile stdout and stderr for any output.
if test -z "$CFLAG_PIC" ; then
AC_MSG_CHECKING([for -KPIC or -fPIC compiler options])
cat >conftest.c <<-EOF
int so_test() { return 0; }
EOF
if $CC -fPIC -c conftest.c 2>&1 | egrep -q '.' ; then
if $CC -KPIC -c conftest.c 2>&1 | egrep -q '.' ; then
CFLAG_PIC=""
else
CFLAG_PIC="-KPIC"
fi
else
CFLAG_PIC="-fPIC"
fi
rm -f conftest.c conftest.o
if test -n "$CFLAG_PIC" ; then
AC_MSG_RESULT($CFLAG_PIC)
else
AC_MSG_RESULT(no)
fi
fi
AC_SUBST(CFLAG_PIC)
# Determine if the C compiler builds DSO files, by testing with -shared.
CC_LINKS_SO="no"
if test -n "$CC" ; then
AC_MSG_CHECKING(whether cc builds .so files with -shared)
cat >conftest.c <<-EOF
int so_test() { return 0; }
EOF
$CC -c conftest.c >/dev/null 2>/dev/null
$CC -shared -o conftest.so conftest.o >/dev/null 2>/dev/null
rm -f conftest.c conftest.o
if test -f conftest.so ; then
nm conftest.so | grep -q so_test
if test $? -eq 0 ; then
CC_LINKS_SO="yes"
fi
fi
rm -f conftest.so
if test $CC_LINKS_SO = "yes" ; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
fi
AC_SUBST(CC_LINKS_SO)
# A linker might also build DSO files with -G, but we'll prefer to use the
# compiler if it will cooperate.
LD_LINKS_SO="no"
AC_PATH_PROG(LD, ld, , )
if test -n "$LD" ; then
AC_MSG_CHECKING(whether ld builds .so files with -G)
cat >conftest.c <<-EOF
int so_test() { return 0; }
EOF
$CC -c conftest.c >/dev/null 2>/dev/null
$LD -G -o conftest.so conftest.o >/dev/null 2>/dev/null
rm -f conftest.c conftest.o
if test -f conftest.so ; then
nm conftest.so | grep -q so_test
if test $? -eq 0 ; then
LD_LINKS_SO="yes"
fi
fi
rm -f conftest.so
if test $LD_LINKS_SO = "yes" ; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
else
LD=":"
fi
AC_SUBST(LD)
AC_SUBST(LD_LINKS_SO)
# Write out configuration information to output files.
AC_CONFIG_FILES([Makefile.inc])
AC_OUTPUT
dnl
dnl Configure.in for G0FRD CW tutor for UNIX flavours
dnl Copyright (C) 2001, 2002 Simon Baldwin (simonb@caldera.com)
dnl
dnl This program is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU General Public License
dnl as published by the Free Software Foundation; either version 2
dnl of the License, or (at your option) any later version.
dnl
dnl This program 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
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
dnl
dnl Process this file with autoconf to produce a configure script.
dnl
dnl Initial file to ensure we are in the right place.
AC_INIT(cwlib/cwlib.c)
dnl General checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_AWK
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_PROG_MAKE_SET
dnl Check specifically for gzip, and substitute the harmless ":" if absent.
AC_PATH_PROG(GZIP, gzip, ,)
if test -z "$GZIP" ; then
GZIP=":"
fi
AC_SUBST(GZIP)
dnl Checks for libraries.
AC_CHECK_LIB(curses, initscr)
dnl Checks for header files, and refuse to go on if no KIOCSOUND is available.
AC_HEADER_STDC
dnl AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h sys/time.h unistd.h)
dnl AC_CHECK_HEADERS(signal.h ctype.h errno.h stdio.h sys/types.h sys/stat.h)
dnl AC_CHECK_HEADERS(sys/param.h stdarg.h assert.h time.h curses.h)
AC_CHECK_HEADERS(sys/kd.h sys/vtkd.h)
if test "$ac_cv_header_sys_kd_h" = 'no' \
&& test "$ac_cv_header_sys_vtkd_h" = 'no' ; then
AC_MSG_ERROR(Cannot find either sys/kd.h or sys/vtkd.h)
fi
AC_CHECK_HEADERS(sys/soundcard.h)
if test "$ac_cv_header_sys_soundcard_h" = 'no' ; then
AC_MSG_ERROR(Cannot find sys/soundcard.h)
fi
AC_CHECK_HEADERS(getopt.h)
AC_CHECK_HEADERS(string.h strings.h)
if test "$ac_cv_header_string_h" = 'no' \
&& test "$ac_cv_header_strings_h" = 'no' ; then
AC_MSG_WARN(Cannot find either string.h or strings.h)
fi
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_HEADER_TIME
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_SETPGRP
AC_TYPE_SIGNAL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(gettimeofday select)
AC_CHECK_FUNCS(getopt_long)
dnl Decide on which subdirectories to build; substitute into SUBDIRS.
dnl We build cwcp if curses is available, and xcwcp if Qt is available.
SUBDIRS="cwlib"
SUBDIRS="$SUBDIRS cw"
SUBDIRS="$SUBDIRS cwgen"
dnl Simple test for curses based on prior library check.
if test $ac_cv_lib_curses_initscr = 'yes' ; then
SUBDIRS="$SUBDIRS cwcp"
else
AC_MSG_WARN(Cannot find libcurses - unable to build cwcp)
fi
dnl Look for $QTDIR. If found, then look for moc, either on $PATH, or
dnl in $QTDIR/bin.
if test -n "$QTDIR" ; then
AC_PATH_PROG(QTMOC, moc, ,$QTDIR/bin:$PATH)
if test -n "$QTMOC" ; then
SUBDIRS="$SUBDIRS xcwcp"
AC_SUBST(QTDIR)
AC_SUBST(QTMOC)
else
AC_MSG_WARN(Cannot find 'moc' - unable to build xcwcp)
AC_MSG_WARN(Hint: ensure 'moc' is in QTDIR/bin on your PATH)
fi
else
AC_MSG_WARN(Cannot find libqt - unable to build xcwcp)
AC_MSG_WARN(Hint: try setting a value for the QTDIR variable)
fi
AC_SUBST(SUBDIRS)
dnl Add -Wall and -W to gcc command flags.
if test "$CC" = "gcc" ; then
CFLAGS="$CFLAGS -Wall -W"
fi
dnl Determine if -KPIC or -fPIC is available for building .so libraries.
dnl Since gcc complains about invalid flags, but then continues, we have to
dnl check by searching the compile stdout and stderr for any output.
if test -z "$CFLAG_PIC" ; then
AC_MSG_CHECKING(for -KPIC or -fPIC compiler options)
cat >conftest.c <<-EOF
int so_test() { return 0; }
EOF
if $CC -KPIC -c conftest.c 2>&1 | egrep -q '.' ; then
if $CC -fPIC -c conftest.c 2>&1 | egrep -q '.' ; then
CFLAG_PIC=""
else
CFLAG_PIC="-fPIC"
fi
else
CFLAG_PIC="-KPIC"
fi
rm -f conftest.c conftest.o
if test -n "$CFLAG_PIC" ; then
AC_MSG_RESULT($CFLAG_PIC)
else
AC_MSG_RESULT(no)
fi
fi
AC_SUBST(CFLAG_PIC)
dnl Find the linker, and check that it build .so files with the -G option.
AC_PATH_PROG(LD, ld,,)
LINKS_SO="no"
if test -n "$LD" ; then
AC_MSG_CHECKING(whether ld builds .so files with -G)
cat >conftest.c <<-EOF
int so_test() { return 0; }
EOF
$CC -c conftest.c >/dev/null 2>/dev/null
$LD -G -o conftest.so conftest.o >/dev/null 2>/dev/null
rm -f conftest.c conftest.o
if test -f conftest.so ; then
nm conftest.so | grep -q so_test
if test $? -eq 0 ; then
LINKS_SO="yes"
fi
fi
rm -f conftest.so
if test $LINKS_SO = "yes" ; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
else
LD=":"
fi
AC_SUBST(LD)
AC_SUBST(LINKS_SO)
dnl Write out configuration information to output files.
OUTPUT_FILES="Makefile cwlib/Makefile cw/Makefile cwgen/Makefile"
if echo "$SUBDIRS" | egrep -q '(^| )cwcp( |$)' ; then
OUTPUT_FILES="$OUTPUT_FILES cwcp/Makefile"
fi
if echo "$SUBDIRS" | egrep -q '(^| )xcwcp( |$)' ; then
OUTPUT_FILES="$OUTPUT_FILES xcwcp/Makefile"
fi
AC_OUTPUT($OUTPUT_FILES)
This diff is collapsed.
{
First Prelude in C - J.S. Bach
==============================
The following data is an abuse of the CW sender program, using it to sound
a short piece of music. The output has no charisma.
}{
}[@T523;E@T659;E@T784;E@T1047;E@T1319;E@T784;E@T1047;E@T1319;E]{
}[@T523;E@T659;E@T784;E@T1047;E@T1319;E@T784;E@T1047;E@T1319;E]{
}[@T523;E@T587;E@T880;E@T1175;E@T1397;E@T880;E@T1175;E@T1397;E]{
}[@T523;E@T587;E@T880;E@T1175;E@T1397;E@T880;E@T1175;E@T1397;E]{
}[@T494;E@T587;E@T784;E@T1175;E@T1397;E@T784;E@T1175;E@T1397;E]{
}[@T494;E@T587;E@T784;E@T1175;E@T1397;E@T784;E@T1175;E@T1397;E]{
}[@T523;E@T659;E@T784;E@T1047;E@T1319;E@T784;E@T1047;E@T1319;E]{
}[@T523;E@T659;E@T784;E@T1047;E@T1319;E@T784;E@T1047;E@T1319;E]{
}[@T523;E@T659;E@T880;E@T1319;E@T1760;E@T880;E@T1319;E@T1760;E]{
}[@T523;E@T659;E@T880;E@T1319;E@T1760;E@T880;E@T1319;E@T1760;E]{