gpsk31-0.5/0000777000175000017500000000000011031203626007465 500000000000000gpsk31-0.5/AUTHORS0000644000175000017500000000015311031177033010452 00000000000000Luc Langehegermann, LX2GT Hansi Reiser, DL9RDZ Thomas Ries, HB9XAR Joop Stakenborg, PG4I - Code maintainer gpsk31-0.5/gpsk31.10000644000175000017500000000076111026515032010600 00000000000000.TH gpsk31 1 "June 30, 2008" "" "" .SH NAME gpsk31 \- A PSK31 mode communications program .SH SYNOPSIS .B gpsk31 .RI [ options ] .SH DESCRIPTION .B gpsk31 is PSK31 communications program with a nice GTK gui. .SH OPTIONS .TP \fI\-c \fP Load the specific config . .TP \fI\-h\fP Show available options. .TP \fI\-v\fP Output version information and exit. .TP \fI\-d\fP Show some debug information at startup. .SH SEE ALSO The provided README, which can be viewed from the help menu. gpsk31-0.5/install-sh0000755000175000017500000001273610350336635011430 00000000000000#!/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 gpsk31-0.5/configure.in0000644000175000017500000000112511031177034011714 00000000000000AC_INIT(gpsk31, 0.5, pg4i@amsat.org) AM_INIT_AUTOMAKE AC_DEFINE(DATE, "June 27 2008") AC_PROG_INSTALL AC_PROG_CC AC_PROG_CXX AC_CHECK_PROGS(RPMBUILD, rpmbuild, rpm) dnl Checks for libraries. AC_CHECK_LIB(m, main) AC_CHECK_LIB(pthread, main) AC_DEFINE(USE_PTHREAD, 1) if test "${ac_cv_c_compiler_gnu}" = "yes"; then CXXFLAGS="${CXXFLAGS} -Wall" fi dnl Check for GTK+ version 2 pkg_modules="gtk+-2.0 >= 2.4.0" PKG_CHECK_MODULES(GTK, [$pkg_modules]) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) dnl Checks for header files. AC_HEADER_STDC AC_C_CONST AC_C_INLINE AC_OUTPUT(src/Makefile Makefile) gpsk31-0.5/Makefile.in0000644000175000017500000005440211031177263011462 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL TODO acconfig.h config.guess config.sub \ depcomp install-sh missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(appicondir)" \ "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(pkgdatadir)" NROFF = nroff MANS = $(man_MANS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; appiconDATA_INSTALL = $(INSTALL_DATA) desktopDATA_INSTALL = $(INSTALL_DATA) pkgdataDATA_INSTALL = $(INSTALL_DATA) DATA = $(appicon_DATA) $(desktop_DATA) $(pkgdata_DATA) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RPMBUILD = @RPMBUILD@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = src EXTRA_DIST = README \ psk31.cod gpsk31.png gpsk31.desktop gpsk31.1 AUTOMAKE_OPTIONS = foreign pkgdata_DATA = psk31.cod README ChangeLog man_MANS = gpsk31.1 appicondir = $(datadir)/pixmaps appicon_DATA = gpsk31.png desktopdir = $(datadir)/applications desktop_DATA = gpsk31.desktop all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ cd $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) uninstall-info-am: install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done install-appiconDATA: $(appicon_DATA) @$(NORMAL_INSTALL) test -z "$(appicondir)" || $(mkdir_p) "$(DESTDIR)$(appicondir)" @list='$(appicon_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(appiconDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appicondir)/$$f'"; \ $(appiconDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appicondir)/$$f"; \ done uninstall-appiconDATA: @$(NORMAL_UNINSTALL) @list='$(appicon_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(appicondir)/$$f'"; \ rm -f "$(DESTDIR)$(appicondir)/$$f"; \ done install-desktopDATA: $(desktop_DATA) @$(NORMAL_INSTALL) test -z "$(desktopdir)" || $(mkdir_p) "$(DESTDIR)$(desktopdir)" @list='$(desktop_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(desktopDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(desktopdir)/$$f'"; \ $(desktopDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(desktopdir)/$$f"; \ done uninstall-desktopDATA: @$(NORMAL_UNINSTALL) @list='$(desktop_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(desktopdir)/$$f'"; \ rm -f "$(DESTDIR)$(desktopdir)/$$f"; \ done install-pkgdataDATA: $(pkgdata_DATA) @$(NORMAL_INSTALL) test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)" @list='$(pkgdata_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \ $(pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \ done uninstall-pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(pkgdata_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ 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) \ || eval $$failcom; \ 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: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ 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) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(MANS) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(appicondir)" "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(pkgdatadir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-appiconDATA install-desktopDATA install-man \ install-pkgdataDATA install-exec-am: install-info: install-info-recursive install-man: install-man1 installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-appiconDATA uninstall-desktopDATA \ uninstall-info-am uninstall-man uninstall-pkgdataDATA uninstall-info: uninstall-info-recursive uninstall-man: uninstall-man1 .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-recursive ctags \ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ dist-tarZ dist-zip distcheck distclean distclean-generic \ distclean-recursive distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-appiconDATA install-data \ install-data-am install-desktopDATA install-exec \ install-exec-am install-info install-info-am install-man \ install-man1 install-pkgdataDATA install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-recursive pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-appiconDATA uninstall-desktopDATA uninstall-info-am \ uninstall-man uninstall-man1 uninstall-pkgdataDATA rpm: Makefile make dist $(RPMBUILD) -ta $(PACKAGE)-$(VERSION).tar.gz rm $(PACKAGE)-$(VERSION).tar.gz # 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: gpsk31-0.5/configure0000755000175000017500000052756011031177264011337 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for gpsk31 0.5. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='gpsk31' PACKAGE_TARNAME='gpsk31' PACKAGE_VERSION='0.5' PACKAGE_STRING='gpsk31 0.5' PACKAGE_BUGREPORT='pg4i@amsat.org' ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE RPMBUILD PKG_CONFIG GTK_CFLAGS GTK_LIBS CPP GREP EGREP LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC PKG_CONFIG GTK_CFLAGS GTK_LIBS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= 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=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -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_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$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 ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` 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 | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$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 ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 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 | -n) 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 ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$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_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } 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 "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # 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 the parent directory. ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` 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 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # 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 <<_ACEOF \`configure' configures gpsk31 0.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/gpsk31] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --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 _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of gpsk31 0.5:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags PKG_CONFIG path to pkg-config utility GTK_CFLAGS C compiler flags for GTK, overriding pkg-config GTK_LIBS linker flags for GTK, overriding pkg-config CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF gpsk31 configure 0.5 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by gpsk31 $as_me 0.5, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version="1.9" ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; 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 elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # 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 # AmigaOS /C/install, which installs bootblocks on floppy discs # 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" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /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 for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_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. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&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}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # 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 "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } 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" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` 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= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk 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 "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='gpsk31' VERSION='0.5' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # 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 "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' cat >>confdefs.h <<\_ACEOF #define DATE "June 27 2008" _ACEOF # 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 # AmigaOS /C/install, which installs bootblocks on floppy discs # 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" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /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 for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_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. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&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}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi 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 "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_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 $# != 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 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe 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 "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&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 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } 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 | grep -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 "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-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 depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_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 # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 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=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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 "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_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 # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 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=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi for ac_prog in rpmbuild 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 "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RPMBUILD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RPMBUILD"; then ac_cv_prog_RPMBUILD="$RPMBUILD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RPMBUILD="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RPMBUILD=$ac_cv_prog_RPMBUILD if test -n "$RPMBUILD"; then { echo "$as_me:$LINENO: result: $RPMBUILD" >&5 echo "${ECHO_T}$RPMBUILD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$RPMBUILD" && break done test -n "$RPMBUILD" || RPMBUILD="rpm" { echo "$as_me:$LINENO: checking for main in -lm" >&5 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6; } if test "${ac_cv_lib_m_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_m_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5 echo "${ECHO_T}$ac_cv_lib_m_main" >&6; } if test $ac_cv_lib_m_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi { echo "$as_me:$LINENO: checking for main in -lpthread" >&5 echo $ECHO_N "checking for main in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pthread_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_main" >&5 echo "${ECHO_T}$ac_cv_lib_pthread_main" >&6; } if test $ac_cv_lib_pthread_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" fi cat >>confdefs.h <<\_ACEOF #define USE_PTHREAD 1 _ACEOF if test "${ac_cv_c_compiler_gnu}" = "yes"; then CXXFLAGS="${CXXFLAGS} -Wall" fi pkg_modules="gtk+-2.0 >= 2.4.0" if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { echo "$as_me:$LINENO: checking for GTK" >&5 echo $ECHO_N "checking for GTK... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GTK_CFLAGS"; then pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\"") >&5 ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "$pkg_modules" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GTK_LIBS"; then pkg_cv_GTK_LIBS="$GTK_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\"") >&5 ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "$pkg_modules" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$pkg_modules"` else GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$pkg_modules"` fi # Put the nasty error message in config.log where it belongs echo "$GTK_PKG_ERRORS" >&5 { { echo "$as_me:$LINENO: error: Package requirements ($pkg_modules) were not met: $GTK_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTK_CFLAGS and GTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 echo "$as_me: error: Package requirements ($pkg_modules) were not met: $GTK_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTK_CFLAGS and GTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GTK_CFLAGS and GTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&5 echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GTK_CFLAGS and GTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else GTK_CFLAGS=$pkg_cv_GTK_CFLAGS GTK_LIBS=$pkg_cv_GTK_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi { echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6; } if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_inline=$ac_kw else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac ac_config_files="$ac_config_files src/Makefile Makefile" cat >confcache <<\_ACEOF # 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, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # 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. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by gpsk31 $as_me 0.5, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ gpsk31 config.status 0.5 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim ACLOCAL!$ACLOCAL$ac_delim AUTOCONF!$AUTOCONF$ac_delim AUTOMAKE!$AUTOMAKE$ac_delim AUTOHEADER!$AUTOHEADER$ac_delim MAKEINFO!$MAKEINFO$ac_delim install_sh!$install_sh$ac_delim STRIP!$STRIP$ac_delim INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim mkdir_p!$mkdir_p$ac_delim AWK!$AWK$ac_delim SET_MAKE!$SET_MAKE$ac_delim am__leading_dot!$am__leading_dot$ac_delim AMTAR!$AMTAR$ac_delim am__tar!$am__tar$ac_delim am__untar!$am__untar$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim am__quote!$am__quote$ac_delim AMDEP_TRUE!$AMDEP_TRUE$ac_delim AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim CXXDEPMODE!$CXXDEPMODE$ac_delim am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim RPMBUILD!$RPMBUILD$ac_delim PKG_CONFIG!$PKG_CONFIG$ac_delim GTK_CFLAGS!$GTK_CFLAGS$ac_delim GTK_LIBS!$GTK_LIBS$ac_delim CPP!$CPP$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input="Generated from "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi gpsk31-0.5/config.guess0000755000175000017500000012546610350336635011751 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-04-22' # 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. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; amd64:OpenBSD:*:*) echo x86_64-unknown-openbsd${UNAME_RELEASE} exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; cats:OpenBSD:*:*) echo arm-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; luna88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mips64-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit 0 ;; macppc:MirBSD:*:*) echo powerppc-unknown-mirbsd${UNAME_RELEASE} exit 0 ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit 0 ;; *:OS400:*:*) echo powerpc-ibm-os400 exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit 0 ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then # avoid double evaluation of $set_cc_for_build test -n "$CC_FOR_BUILD" || eval $set_cc_for_build if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; amd64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit 0 ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit 0 ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit 0 ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in *86) UNAME_PROCESSOR=i686 ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit 0 ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms && exit 0 ;; I*) echo ia64-dec-vms && exit 0 ;; V*) echo vax-dec-vms && exit 0 ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gpsk31-0.5/depcomp0000755000175000017500000003710010350336635010771 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2005-07-09.11 # Copyright (C) 1999, 2000, 2003, 2004, 2005 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mecanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: gpsk31-0.5/gpsk31.desktop0000644000175000017500000000033610760250067012117 00000000000000[Desktop Entry] Encoding=UTF-8 Name=gpsk31 Comment=psk31 program for hamradio operators Comment[nl]=psk31 programma voor zendamateurs Exec=gpsk31 Icon=gpsk31.png Terminal=false Type=Application Categories=Network;HamRadio gpsk31-0.5/COPYING0000644000175000017500000007733011031177034010451 00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. 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 them 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 prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. 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. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey 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; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If 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 convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU 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 that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. 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. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 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. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS gpsk31-0.5/TODO0000644000175000017500000000010211031177034010065 00000000000000 If you have suggestions, please mail them to me. pg4i@amsat.org gpsk31-0.5/mkinstalldirs0000755000175000017500000000132610350336635012223 00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.1.1.1 2005/07/30 17:00:06 pg4i 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 gpsk31-0.5/aclocal.m40000644000175000017500000010676611031177260011265 00000000000000# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # 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. # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # 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. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], 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 # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 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=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # 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)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # 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 | grep -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 ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # 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= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_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)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR gpsk31-0.5/config.sub0000755000175000017500000007547010350336635011413 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-04-22' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # 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. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | msp430 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | msp430-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16c) basic_machine=cr16c-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gpsk31-0.5/README0000644000175000017500000000346511031177034010274 00000000000000This file contains small hints on using gpsk31. Operation: --------- F-11: TX F-12: RX Ctrl+p: Preferences dialog Logging: -------- During operation you may hit Ctrl-w. You will get a window where you can enter all the information about the current QSO, and also write to xlog. This Information will also be used for the macros (see below). In case you are using start- and end time in xlog: start of a QSO is marked by clicking on the New button and end is marked when you log the QSO. Fixtexts: --------- You may create up to 16 fixtexts in the configuration dialog. You can use macros in your fix texts: ~t --> Transmit ON ~r --> Receive ~~ --> sends '~' ~c --> sends the others Callsign ~n --> sends the others Name ~q --> sends the others QTH ~s --> sends the RST for the other Station ~mn -> sends your name ~mc -> sends your call ~mq -> sends your QTH General: -------- If the Phase Scope is RED, DCD is OFF, and AFC will not work. If the DCD is ON (Phase Scope is YELLOW), AFC is working. You can adjust the DCD-Level with the slider between the Phase Scope and the Spectrum Display. The Spectrum Display can operate in 2 modes - as spectrum analyzer and as waterfall display. A right mouse button click into the Spectrum Display area switches between the two display modes. In waterfall display mode you can switch between a colored and monochrome display with the middle mouse button. You may want to change the AFC/NET options. Simple klick on the buttons you see, or use the ALT-Key shortcuts. You can change the frequencies directly using the 2 spin buttons or +/- keys (arrow block). You can also left-click to a station you see in the spectrum analyzer or waterfall to tune into it. vy 73's de Luc, LX2GT and Joop, PG4I Any questions/suggestions/patches to pg4i@amsat.org gpsk31-0.5/missing0000755000175000017500000002540610350336635011021 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2005-06-08.21 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 # 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case "$1" in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: gpsk31-0.5/gpsk31.png0000644000175000017500000000053211001664424011223 00000000000000‰PNG  IHDR00mÌkÄsRGB®ÎéPLTE·¡ÿ8á÷ŸtRNS@æØfbKGDˆH pHYs  šœtIMEØ ‚þtEXtCommentCreated with The GIMPïd%n—IDATÓMÐA à Ð/.\æ9JŽC/–’E¯aÉ"˺¨‹âôë­(oÄ™¬0<6à,N '\&b@Ęùbä&S%‘„9aÊHA3Ä4¼@å&¬ w²)aUØ;/‘ƒp}ézIÞ]ßmgÿaiüõ‚ûLu”)Sç«ÓF½”.§äa£ó0Ìò:Z¶§šI.WIEND®B`‚gpsk31-0.5/ChangeLog0000644000175000017500000001472711031177034011171 000000000000000.4.2 --> 0.5 - Configuration has changed, gpsk31 now uses the more convenient GKeyFile format. The location of the default configuration file now is at $HOME/.gpsk31/gpsk31.cfg. The global configuration file is no longer used. - Configuration is now handled through the Preferences dialog (ctrl+P or Window->Preferences from the menu). Some changes to the preferences require a restart. - Changing of the font color in the TX window now works correctly. - There was a compilation fix for version 2.4 of GTK+. - gpsk31 is now licensed under the GPL version 3. 0.4.1 --> 0.4.2 - Contributions by Thomas Ries, HB9XAR: - QSO dialog: Empty "Freq" field passes "HAMLIB" to xlog (xlog shall take current frequency from TRX). Can be controlled via new config option "xlog_auto_freq" (1 enabled, 0 disabled) - Filter out CTRL characters from TX Window (currently CTRL-[a-z]) Annoying when trying to clear content of the window (CTRL-a, CTRL-x) Better would be a "Clear Window button or entry in RMB context menu. - Added a TCP socket interface to receive/transmit data from a 3rd party application (contest-bot?). Config option "tcp_listen_port" defines the port number where gpsk31 will listen for a connect. Only one single concurrent connection is supported. Setting tcp_listen_port = 0 disables this feature. - New commandline option (-c ) to load a specific configuration file. If used, the config file name is displayed in the window title. One can pass just the name of the config file (then gpsk31 searches in $HOME/.gpsk31) or including a full (absolute) path name. - Fix: frequency axis (spectrum/waterfall) does now correspond with actual value (which varied with "spectrum_width" setting) - F-Keys also work for sending macros if QSO dialog window has focus 0.4 --> 0.4.1 - Code cleanups. 0.3.4 --> 0.4 - Another contribution by Thomas Ries, HB9XAR. gpsk31 now comes with a waterfall display. See the README on details how to use it. 0.3.2 --> 0.3.3 - The following command line options are now accepted: -v: output version number and exit, -d: enable debugging. - All of the windows and dialogs now have an icon. - There were many code cleanups. gpsk31 now requires version 2.4 of GTK+. - The following changes by Thomas Ries, HB9XAR. - Fixed sending the "~mx" macros over the air. - A line marking the center frequency added. - QSO Details Dialog: immediately convert Call to uppercase (so macros will send it in upercase). - Fixed labeling of the frequency (it was assuming a center frequency of always 1000Hz). - Make ~t~r within the same programmed text work ("~t xxx ~r" did not turn off the sender after finishing). - Set the QSO start time when transferring the QSO to Xlog, not when clicking "New". - If you are using a gpsk.conf in $HOME/.gpsk31, you will need to add a line with 'spectrum_center_line_color = "color"', for example: 'spectrum_center_line_color = "#808000". 0.3.1 --> 0.3.2 - Prevent a buffer overflow when reading the config file. Thanks to Fernando, LU2DFM for reporting. - Several compilation warning fixes for gcc-4.3. - All of the Glib and GTK+ deprecated widgets and commands are removed from the code. 0.3.0 --> 0.3.1 - CW ident should work now. - In order to prevent a clash in the shurtcuts Ctrl+f is now used for "Log to File" and Ctrl+e for "Frequency". 0.2.4a --> 0.3.0 - The program now exits of it can't open the audio device. - gpsk31 is ported to version 2 of the GTK+ libraries. - The config file has been renamed gpsk.conf, so it this version does not read obsolete settings. - The config file now uses fonts strings like "courier 12 bold" instead of "-adobe-courier-bold-r-normal-*-*-120-*-*-m-*-iso8859-1". - We now use the SHIFT key to access the extra fix texts. Pushing the control key plus a function key would conflict with certain window-managers. - GUI cleanups: menus and statusbars have been cleaned up, all non-working items were removed. - The latest psk31 routines are copied from the twpsk-2.2beta1 source tree. - Logging now works with xlog. When the xlog button is clicked in the QSO details window, the QSO data will be sent to xlog. - A help dialog has been added. It displays the README. - Gnome menu entry, rpm spec file and application icon added. - Several minor bugfixes. 0.2.4 --> 0.2.4a - Now I include DL9RDZ's new Version (0.10). - Some bug fixes in the macro_processor function. - Now we have 16 Fix Texts :-). - now, you can fine scroll, even during RX/TX. 0.2.3 --> 0.2.4 - File send now implemented. - Log to file should work. - A new menu: Send (You can send the fields of the qso dialog). - A new menu: Modes (You may use this menu to change the operating mode). - Fixed memory leak. - Phase Scope sensitivity is now increased (makes it easier to tune weak signals (PU1JTE). - Startup size is now 640x440 Pixels. - Modified configure script. Now datadir is configurable. - Removed gtkrc/fx.txt config file. Now we have ONE gpsk31.conf for all settings. - Improved macro_processing. - Some Bug fixes. 0.2 --> 0.2.3 - Ported the while thing to DL9RDZ's new functions. - Betted DCD (DL9RDZ). Level can be adjusted by using the scalebar between the Phase scope and Spectrum. - New RX Sync/Filter (DL9RDZ) See globals.h. - Added PTT over com port (DL9RDZ) See globals.h. - Now we have a statusbar :) . - Removed auto scaling spectrum. Spectrum now configurable (see globals.h). - Added Menus (currently not many options). - Some minor bug fixes. - Size now 640x480 Pixels. - Paste with Middle Mouse Button works now. - New cursor. - Configurable lables on the F-Key-Buttons. - MANY Clean Ups and Bug fixes. - The location of the global configuration file can be changed (see Makefile). - the Fx.txt are now under ~/.gpsk31. - took the phasescope functions from misc.c to phasescope.c. - Now the package comes with configure script :-). 0.1 --> 0.2 - New Spectrum display (with auto scaling). - Some Bug fixes on the Fixtexts (last CR will be erased during read). - Macros (call, qth, ...). - Dialog to enter QSO Data (F10). - When you hit 'ENTER' gpsk31 sended an LF, now a CR is sent. - On RX, LF's are filtered (blank lines of some windows terminals no longer displayed. - Tuning RX Frequency using the +/- Keys (on the right side). gpsk31-0.5/INSTALL0000644000175000017500000000024210350336635010442 00000000000000 Simply type './configure', and then 'make;make install'. There should be no Errors. You must have the gtk+ version 2 libraries and headers correctly installed. gpsk31-0.5/Makefile.am0000644000175000017500000000062711026515031011442 00000000000000SUBDIRS = src EXTRA_DIST = README \ psk31.cod gpsk31.png gpsk31.desktop gpsk31.1 AUTOMAKE_OPTIONS = foreign pkgdata_DATA = psk31.cod README ChangeLog man_MANS = gpsk31.1 appicondir = $(datadir)/pixmaps appicon_DATA = gpsk31.png desktopdir = $(datadir)/applications desktop_DATA = gpsk31.desktop rpm: Makefile make dist $(RPMBUILD) -ta $(PACKAGE)-$(VERSION).tar.gz rm $(PACKAGE)-$(VERSION).tar.gz gpsk31-0.5/src/0000777000175000017500000000000011031203627010255 500000000000000gpsk31-0.5/src/psk31-fft.C0000644000175000017500000000722511031177037012026 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ #include #include "psk31-fft.h" #include "hansis_fft.h" #include void psk31_fft::set_parameters(int len, int _delta, int _mode) { if(len!=N) { if(fft) delete fft; fft = new FFTer(len); N=len; if(Idata) delete[] Idata; Idata = new float[N]; if(Qdata) delete[] Qdata; Qdata = new float[N]; if(rxdata) delete[] rxdata; rxdata = new int[N]; if(window) delete[] window; window = new float[N]; for(int i=0; i=N) cnt=0; if(valid_counter) valid_counter--; } void psk31_fft::add_if_sample(float I, float Q) { if(mode!=MODE_NARROWIF) return; Idata[cnt]=I; Qdata[cnt++]=Q; if(cnt>=N) cnt=0; if(valid_counter) valid_counter--; } int psk31_fft::has_new_data() { return valid_counter==0; } /* Just copy out those values needed for display... * the maximum number of values has been specified by set_paramters * The copy out value starts at start (lower end == 0), * writes count values to data buffer, * where it compines step FFT values to one entry... * condition: start+count*step < MAXVALUES */ int psk31_fft::get_abs_data(float *data, int start, int count, int step) { if( start<0||count<0||step<0 ) return -1; if( start + count*step > N ) return -1; cmplx * fftval; // = new cmplx[N]; //Vector fftval(N); // switch on type; copy source; performe fft if(mode==MODE_RXDATA) { double *mydata = new double[N]; for(int i=0; irfftsr_wrapper(mydata); delete[] mydata; } else { cmplx * input = new cmplx[N]; for(int i=0; ifftsr(input); delete[] input; } int index = start; //fprintf(stderr,"power value results:\n"); for(int i=0; i * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ void qsodata_log(void); gpsk31-0.5/src/misc.C0000644000175000017500000001401311031177035011232 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2008 Thomas Ries * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* * Misc Functions */ #include #include #include #include #include #include "misc.h" #include "spectrum.h" #include "main_screen.h" #include "globals.h" #include "server.h" #include #include #include #include #include #include "text.h" #include "phasescope.h" #include "menu.h" #include "cfg.h" int OPTnew; extern int display_waterfall; /* display - 0: spectrum, 1: waterfall */ extern int waterfall_colored; /* 0 b/w, 1 color mode */ extern char configfile[]; /* explicit config file to be loaded */ gint /* Will be called when we click on the spectrum */ spectrum_motion_event (GtkWidget * widget, GdkEventMotion * event) { // Click on the spectrum GdkModifierType state; GdkEventType type; int x; int know_button=0; float newfreq; type=event->type; if (event->is_hint) { int d1,d2; /* figure out the button pressed - if possible */ gdk_window_get_pointer (event->window, &d1, &d2, &state); know_button=1; } if ((know_button == 0) || ((type == GDK_BUTTON_PRESS) && (state & GDK_BUTTON1_MASK))) { /* left button: set RX freq */ x = (int) event->x; newfreq = spectrum_new_fc (x); commControl (COMM_RXCH, COMM_FREQ, (int) (100 * newfreq)); } else if ((type == GDK_BUTTON_PRESS) && (state & GDK_BUTTON3_MASK)) { /* right button: toggle between Waterfall & spectrum */ if (display_waterfall) { display_waterfall=0; } else { display_waterfall=1; } } else if ((type == GDK_BUTTON_PRESS) && (state & GDK_BUTTON2_MASK)) { /* middle click. toggle b/w - color waterfall */ if (waterfall_colored) { waterfall_colored=0; } else { waterfall_colored=1; } } return 0; } gint display_time (gpointer data) /* Displays the UTC-Date */ { char *c; c = get_time_string (NULL); gtk_statusbar_pop (GTK_STATUSBAR (statusbar.time), 1); gtk_statusbar_push (GTK_STATUSBAR (statusbar.time), 1, c); g_free (c); return TRUE; } /* * This function returns a pointer to the time string * YOU MUST FREE it */ gchar * get_time_string (gchar * format) { time_t calendar_time; struct tm *my_time; char time_string[50]; calendar_time = time (0); my_time = gmtime (&calendar_time); if (format == NULL) strftime (time_string, 50, "%a, %d %b %H:%M:%Sz %Y", my_time); else strftime (time_string, 50, format, my_time); return g_strdup (time_string); } /* * This function parses the configuration file */ void read_config () { char *home = getenv ("HOME"); char conf[strlen (home) + 60]; if (strlen(configfile) == 0) { strcpy (conf, home); strcat (conf, "/.gpsk31/gpsk31.cfg"); } else { /* first try full path as specified */ strcpy (conf, configfile); if (!g_file_test(conf, G_FILE_TEST_EXISTS)) { /* not found, try again in $HOME/.gpsk31 */ strcpy (conf, home); strcat (conf, "/.gpsk31/"); strcat (conf, configfile); } } loadpreferences (conf); } /* * This function set all the things */ void set_config () { int result = 0; static int server_started; phase_scope_init (); /* Build the Phase Scope GCs */ draw_arc (); /* redraw the phase scope circle */ if (server_started == 0) { server_started = 1; if (strlen (ini_settings.ptt_device) != 0) result = server_main (ini_settings.audio_device, ini_settings.ptt_device, DATADIR); /* Start Server */ else result = server_main (ini_settings.audio_device, NULL, DATADIR); } else g_print ("PSK31-Server already started!\n"); if (result == -1) exit (1); /* bail out if server not started */ spectrum_offset (ini_settings.freq); spectrum_setup (); /* init the spectrum */ if (ini_settings.spectrum_width == 0) /* init fft */ fft_setup (1024, ini_settings.spectrum_speed); else if (ini_settings.spectrum_width == 1) fft_setup (2048, ini_settings.spectrum_speed); else fft_setup (4096, ini_settings.spectrum_speed); commControl (COMM_TXCH, COMM_FREQ, 100 * ini_settings.freq); /* TX Freq */ commControl (COMM_RXCH, COMM_FREQ, 100 * ini_settings.freq); /* RX Freq */ gtk_spin_button_set_value (GTK_SPIN_BUTTON (main_screen.tx_freq), ini_settings.freq); /* TX Freq spin button */ gtk_adjustment_set_value (GTK_ADJUSTMENT (main_screen.dcd_adj), (float) (ini_settings.dcd_level * -1)); commControl (COMM_TXCH, COMM_LSB, ini_settings.lsb); /* LSB */ commControl (COMM_RXCH, COMM_LSB, ini_settings.lsb); OPTnew = ini_settings.new_rx; /* Use new rx? */ set_button (0); /* set the buttons labels */ } /* * This functions sets the label in the text-buttons */ void set_button (int x) { int i; for (i = 0; i<= 7; ++i) { if (x == 0) gtk_label_set_text (GTK_LABEL (GTK_BIN (main_screen.f_button[i])->child), ini_settings.label[i]); else gtk_label_set_text (GTK_LABEL (GTK_BIN (main_screen.f_button[i])->child), ini_settings.label[i+8]); } } gpsk31-0.5/src/support.C0000644000175000017500000000622511031177040012015 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ #include #include #include #include #include #include #include "support.h" static GList *pixmaps_directories = NULL; /* Use this function to set the directory containing installed pixmaps. */ void add_pixmap_directory (const gchar *directory) { pixmaps_directories = g_list_prepend (pixmaps_directories, g_strdup (directory)); } /* This is an internally used function to find pixmap files. */ static gchar* find_pixmap_file (const gchar *filename) { GList *elem; /* We step through each of the pixmaps directory to find it. */ elem = pixmaps_directories; while (elem) { gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data, G_DIR_SEPARATOR_S, filename); if (g_file_test (pathname, G_FILE_TEST_EXISTS)) return pathname; g_free (pathname); elem = elem->next; } return NULL; } /* This is an internally used function to create pixmaps. */ GtkWidget* create_pixmap (GtkWidget *widget, const gchar *filename) { gchar *pathname = NULL; GtkWidget *pixmap; if (!filename || !filename[0]) return gtk_image_new (); pathname = find_pixmap_file (filename); if (!pathname) { g_warning ("Couldn't find pixmap file: %s", filename); return gtk_image_new (); } pixmap = gtk_image_new_from_file (pathname); g_free (pathname); return pixmap; } /* This is an internally used function to create pixmaps. */ GdkPixbuf* create_pixbuf (const gchar *filename) { gchar *pathname = NULL; GdkPixbuf *pixbuf; GError *error = NULL; if (!filename || !filename[0]) return NULL; pathname = find_pixmap_file (filename); if (!pathname) { g_warning ("Couldn't find pixmap file: %s", filename); return NULL; } pixbuf = gdk_pixbuf_new_from_file (pathname, &error); if (!pixbuf) { fprintf (stderr, "Failed to load pixbuf file: %s: %s\n", pathname, error->message); g_error_free (error); } g_free (pathname); return pixbuf; } gpsk31-0.5/src/psk31-transmitter.h0000644000175000017500000000646411031177040013666 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* PSK31 -- transmitter class * (C) 1998 Hansi Reiser DL9RDZ */ #ifndef __PSK31_TRANSMITTER_INCLUDED #define __PSK31_TRANSMITTER_INCLUDED #include "psk31-coder.h" #define DMA_BUF_BITS 10 enum { TS_INACTIVE, TS_TRANSMIT, TS_WAITFOREND }; class psk31_transmitter { private: static unsigned int cwtab[58]; psk31_coder coder; int transmit_state; //int saved_echo_char; //int saved_echo_timestamp; int audiofd; int cwmode; int qpsk; int lsb; float _txfreq; int txfreq; int txphase; /* process31 / filter_tx_sample */ float txIold,txQold,txInew,txQnew; int stat; /* getnextsymbol */ unsigned char shiftreg; /* Transmit shift register */ unsigned int codewordbuf; /* Current codeword buffer */ int useqpsk; int keydown; int echo_char, pending_sample; int sendchar_cwmode; #define TXBUFSIZE 2048 unsigned int txbuf[TXBUFSIZE], *txbuf_sta, *txbuf_end; char *strupr(char *str); int process_31(); int filter_tx_sample(int stat); /* 8000Hz-Process TX */ int getnextsymbol(); int get_buffer_entry(); void send_cw_char(int ch); void putcodeword(int cw); void frontputcodeword(int c); int getcodeword(); void unqueue_end(); void add_echo_char( int ch, int timestamp ); int get_echo_char( int timestamp ); struct echo_chars { int ch; int timestamp; }; #define ECHO_BUFFER_LEN 64 struct echo_chars echo_buffer[ECHO_BUFFER_LEN], *echo_start, *echo_end; // mode parameters: 0 or 1; -1==no change void set_mode(int q, int l, int cw) { if(q>=0) qpsk=q; if(l>=0) lsb=l; if(cw>=0) cwmode=cw; coder.setmode(q, l); } void set_freq(float f) { _txfreq=f; txfreq=(int)(65536.0/8000*f); } int execute_cmd(int c); void start_execute_cmd(); int bufferspace(); public: psk31_transmitter() { txIold=txInew=1; txQold=txQnew=0; txbuf_sta=txbuf; txbuf_end=txbuf; stat=255; echo_char=0; pending_sample=EMPTY_SAMPLE; set_freq(1250); //saved_echo_char=0; //saved_echo_timestamp=0; transmit_state=TS_INACTIVE; echo_start=echo_end=echo_buffer; } void get_info(int *q, int *l, int *cw, float *f) { if(q) *q=qpsk; if(l) *l=lsb; if(f) *f=_txfreq; if(cw) *cw=cwmode; } void set_audiofd(int fd) { audiofd=fd; } int send_char(int c); int send_string(char *str); int send_cw_string(int need_postamble, char *str); void sendpreamble(); void sendpostamble(); int processor(); /* returns TX_BUSY / NO_CHAR / sent character */ }; #endif gpsk31-0.5/src/Makefile.in0000644000175000017500000003604711031177262012255 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = gpsk31$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_gpsk31_OBJECTS = hansis_fft.$(OBJEXT) psk31-coder.$(OBJEXT) \ psk31-fft.$(OBJEXT) psk31-receiver.$(OBJEXT) \ psk31-transmitter.$(OBJEXT) server-main.$(OBJEXT) \ call_dialog.$(OBJEXT) callback.$(OBJEXT) main.$(OBJEXT) \ main_screen.$(OBJEXT) menu.$(OBJEXT) misc.$(OBJEXT) \ phasescope.$(OBJEXT) spectrum.$(OBJEXT) file.$(OBJEXT) \ text.$(OBJEXT) log.$(OBJEXT) support.$(OBJEXT) \ socketif.$(OBJEXT) backtrace.$(OBJEXT) cfg.$(OBJEXT) gpsk31_OBJECTS = $(am_gpsk31_OBJECTS) gpsk31_LDADD = $(LDADD) gpsk31_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(gpsk31_SOURCES) DIST_SOURCES = $(gpsk31_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RPMBUILD = @RPMBUILD@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ gpsk31_SOURCES = hansis_fft.C psk31-coder.C psk31-fft.C psk31-receiver.C \ psk31-transmitter.C server-main.C call_dialog.C callback.C \ main.C main_screen.C menu.C misc.C phasescope.C spectrum.C \ file.C text.C log.C support.C socketif.C backtrace.C \ call_dialog.h coeff.h hansis_fft.h menu.h phasescope.h \ psk31-fft.h psk31-transmitter.h spectrum.h callback.h globals.h \ main_screen.h misc.h psk31-coder.h psk31-receiver.h server.h \ file.h main.h text.h log.h support.h socketif.h backtrace.h \ cfg.C cfg.h appicondir = $(datadir)/pixmaps INCLUDES = @GTK_CFLAGS@ \ -DPIXMAPDIR=\"$(appicondir)\" -DDATADIR=\"$(pkgdatadir)\" \ -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED \ -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED LDADD = @GTK_LIBS@ all: all-am .SUFFIXES: .SUFFIXES: .C .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;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) gpsk31$(EXEEXT): $(gpsk31_OBJECTS) $(gpsk31_DEPENDENCIES) @rm -f gpsk31$(EXEEXT) $(CXXLINK) $(gpsk31_LDFLAGS) $(gpsk31_OBJECTS) $(gpsk31_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backtrace.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/call_dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/callback.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hansis_fft.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main_screen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/menu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/phasescope.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psk31-coder.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psk31-fft.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psk31-receiver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psk31-transmitter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/server-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socketif.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spectrum.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/support.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text.Po@am__quote@ .C.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .C.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am # 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: gpsk31-0.5/src/callback.h0000644000175000017500000000407711031177034012110 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ int key_input (GtkWidget * widget, GdkEventKey * event); int key_released (GtkWidget * widget, GdkEventKey * event); void txbuffer_changed (GtkTextBuffer *textbuffer, gpointer user_data); void macro_processor (GtkWidget *w, gpointer *data); void macro_processor2 (char *string); void rx_freq_changed (GtkWidget * widget, GtkSpinButton * spin); void tx_freq_changed (GtkWidget * widget, GtkSpinButton * spin); void afc_toggled (GtkWidget * widget, gpointer data); void net_toggled (GtkWidget * widget, gpointer data); void qpsk_toggled (GtkWidget * widget, gpointer data); void cwid_toggled (GtkWidget * widget, gpointer data); void tx_clear_pressed (GtkWidget * widget, gpointer data); void tx_button_pressed (GtkWidget * widget, gpointer data); void rx_button_pressed (GtkWidget * widget, gpointer data); void dcd_level_changed (GtkAdjustment *adj); void selection_get (GtkWidget *widget, GdkEventButton *event); void selection_received (GtkWidget *widget, GtkSelectionData *selection_data, gpointer data); void selection_get_draw_cursor (GtkWidget *widget, GdkEventButton *event); void transmit_on(void); void transmit_off(void); gpsk31-0.5/src/callback.C0000644000175000017500000002311211031177034012032 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2008 Thomas Ries * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* * Callbacks from the main widget */ int shift_key_down = 0; /* is shift-key pressed? */ extern bool gpsk31debug; #include #include #include #include #include #include #include #include #include #include #include #include #include "main_screen.h" #include "misc.h" #include "menu.h" #include "globals.h" #include "text.h" #include "server.h" #include "callback.h" void transmit_on(void) { PSK31info rxinfo; commGetInfo (COMM_RXCH, &rxinfo, sizeof (rxinfo)); if (rxinfo.ptt == 1 ) return ; if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(main_screen.net))) { commControl (COMM_TXCH, COMM_FREQ, (int) (100 * gtk_spin_button_get_value (GTK_SPIN_BUTTON (main_screen.rx_freq)))); gtk_spin_button_set_value (GTK_SPIN_BUTTON (main_screen.tx_freq), gtk_spin_button_get_value (GTK_SPIN_BUTTON (main_screen.rx_freq))); } commControl (COMM_TXCH, COMM_MODE, MO_NORMAL); commControl (COMM_TXCH, COMM_PTT, PTTON|PTTFORCE); } void transmit_off(void) { PSK31info rxinfo; commGetInfo (COMM_RXCH, &rxinfo, sizeof (rxinfo)); if (rxinfo.ptt == 0 ) return ; if (GTK_TOGGLE_BUTTON (main_screen.cwid)->active) { commControl (COMM_TXCH, COMM_MODE, MO_CWSEND); commPutData (ini_settings.cw_string, 0); } commControl (COMM_TXCH, COMM_PTT, PTTOFF); commControl (COMM_TXCH, COMM_MODE, MO_NORMAL); } // These functions take the macros, and sends the strings // To the psk31_transmitter class // macro_preprocessor figures out what F-x macro to send void macro_processor (GtkWidget *w, gpointer *data) { int x = GPOINTER_TO_INT (data); char *string=NULL; if (shift_key_down == 1) x = x + 8; string=ini_settings.text[x]; macro_processor2(string); } // second part, macro_preprocessor2 does the actual work // (sending and interpreting ~ sequences) void macro_processor2 (char *string) { int i = 0; int luc = 255; int mc = 0; char text[1024]; text[0] = '\0'; while (luc != '\0') { luc = string[i]; if (luc == '~') { ++i; mc = string[i]; if (mc == '~') { commPutData ("~", 1); strcat (text, "~"); ++i; } if (mc == 't') // Go to transmit { transmit_on(); ++i; } if (mc == 'r') // Go to receive after Fixtext { transmit_off(); ++i; } if (mc == 'c') // Send Callsign { commPutData ((char *) &qsodata.call, 0); strcat (text, qsodata.call); ++i; } if (mc == 'n') { commPutData ((char *) &qsodata.name, 0); strcat (text, qsodata.name); ++i; } if (mc == 'q') { commPutData ((char *) &qsodata.qth, 0); strcat (text, qsodata.qth); ++i; } if (mc == 's') { commPutData ((char *) &qsodata.rst_s, 0); strcat (text,qsodata.rst_s); ++i; } if (mc == 'm') /* one if the My-strings */ { ++i; mc = string[i]; if (mc == 'c') { commPutData (ini_settings.call, 0); strcat (text, ini_settings.call); } if (mc == 'n') { commPutData (ini_settings.name, 0); strcat (text, ini_settings.name); } if (mc == 'q') { commPutData (ini_settings.qth, 0); strcat (text, ini_settings.qth); } mc = 'm'; ++i; } } else if (luc != '~' && luc != '\0') { commPutData ((char *) &luc, 1); strncat (text,(char *) &luc, 1); ++i; } } put_tx_window (text); } void check_autotx(void) { if (GTK_TOGGLE_BUTTON (main_screen.mode_autotx)->active) transmit_on(); } // This will be called, when we hit a key. gint key_input (GtkWidget *widget, GdkEventKey *event) { PSK31info rxinfo; if (event->state & GDK_MOD1_MASK) { } else if (event->keyval >= 65470 && event->keyval <= 65477) { // F1 <--> F8 // macro_to_send = event->keyval - 65469; /* * check_autotx(); * * if ctrl-q pressed, it start to transmit. * So by now it is disabled. */ gtk_button_clicked (GTK_BUTTON (main_screen.f_button[event->keyval - 65470])); } else if (event->keyval >= 0xFD00) { /* special keys */ switch (event->keyval) { case 65505: case 65506: // Shift key pushed set_button (1); shift_key_down = 1; break; case 65293: // CR check_autotx(); commPutData ("\n",1); break; case 65288: // Backspace check_autotx(); commPutData ("\b",1); break; case 65480: // F-11 transmit_on(); break; case 65481: // F-12 transmit_off(); break; case 65453: // - update freq -1 commGetInfo (COMM_RXCH, &rxinfo, sizeof (rxinfo)); commControl (COMM_TXCH, COMM_FREQ, (rxinfo.freq - 100)); gtk_spin_button_set_value (GTK_SPIN_BUTTON (main_screen.rx_freq), (0.01 * (rxinfo.freq - 100))); break; case 65451: // Right arrow - update freq +1 commGetInfo (COMM_RXCH, &rxinfo, sizeof (rxinfo)); commControl (COMM_TXCH, COMM_FREQ, (rxinfo.freq + 100)); gtk_spin_button_set_value (GTK_SPIN_BUTTON (main_screen.rx_freq), (0.01 * (rxinfo.freq + 100))); break; } } else { // Now it should be the string we want to send /* eliminate CTRL-x chars (e.g CTRL-a CTRL-x to clear screen) */ int i; for (i=0; ilength;) { if (event->string[i] <=26 /*ctrl-z*/) { event->length--; if (event->length > 0) { memmove(&(event->string[i]), &(event->string), event->length); } } else { i++; } } if (event->length > 0) { check_autotx(); commPutData (event->string, event->length); } } return 0; } // This will be called, when we release a key int key_released (GtkWidget * widget, GdkEventKey * event) { if (event->keyval == 65505 || event->keyval == 65506) { set_button (0); shift_key_down = 0; } return 0; } void txbuffer_changed (GtkTextBuffer *textbuffer, gpointer user_data) { GtkTextIter start, end; gtk_text_buffer_get_bounds (textbuffer, &start, &end); gtk_text_buffer_apply_tag_by_name (textbuffer, highlight.tx, &start, &end); } void rx_freq_changed (GtkWidget * widget, GtkSpinButton * spin) // Called, when we change the rx_freq { commControl (COMM_RXCH, COMM_FREQ, (int) (100 * (gtk_spin_button_get_value (spin)))); gtk_widget_grab_focus (main_screen.rxwindow); } void tx_freq_changed (GtkWidget * widget, GtkSpinButton * spin) // same for tx freq { commControl (COMM_TXCH, COMM_FREQ, (int) (100 * (gtk_spin_button_get_value (spin)))); gtk_widget_grab_focus (main_screen.rxwindow); } void afc_toggled (GtkWidget * widget, gpointer data) // afc changed.... { if (GTK_TOGGLE_BUTTON (widget)->active) { commControl (COMM_RXCH, COMM_AFC, 1); check_menu ("/MainMenu/ModeMenu/AFC", 1); } else { commControl (COMM_RXCH, COMM_AFC, 0); check_menu ("/MainMenu/ModeMenu/AFC", 0); } } void net_toggled (GtkWidget * widget, gpointer data) // net changed.... { if (GTK_TOGGLE_BUTTON (widget)->active) check_menu ("/MainMenu/ModeMenu/NET", 1); else check_menu ("/MainMenu/ModeMenu/NET", 0); } void qpsk_toggled (GtkWidget * widget, gpointer data) // mode (bpsk) { if (GTK_TOGGLE_BUTTON (widget)->active) { commControl (COMM_RXCH, COMM_QPSK, 1); commControl (COMM_TXCH, COMM_QPSK, 1); gtk_statusbar_pop (GTK_STATUSBAR (statusbar.mode), 1); gtk_statusbar_push (GTK_STATUSBAR (statusbar.mode), 1, "QPSK"); check_menu ("/MainMenu/ModeMenu/QPSK", 1); } else { commControl (COMM_RXCH, COMM_QPSK, 0); commControl (COMM_TXCH, COMM_QPSK, 0); gtk_statusbar_pop (GTK_STATUSBAR (statusbar.mode), 1); gtk_statusbar_push (GTK_STATUSBAR (statusbar.mode), 1, "BPSK"); check_menu ("/MainMenu/ModeMenu/QPSK", 0); } } void cwid_toggled (GtkWidget * widget, gpointer data) { if (GTK_TOGGLE_BUTTON (widget)->active) check_menu ("/MainMenu/Modemenu/CW_ID", 1); else check_menu ("/MainMenu/ModeMenu/CW_ID", 0); } void tx_clear_pressed (GtkWidget * widget, gpointer data) { PSK31info rxinfo; commGetInfo (COMM_RXCH, &rxinfo, sizeof (rxinfo)); if (rxinfo.ptt == 0 ) return ; commControl (COMM_TXCH, COMM_PTT, PTTOFF|PTTFORCE); } void tx_button_pressed (GtkWidget * widget, gpointer data) { transmit_on(); } void rx_button_pressed (GtkWidget * widget, gpointer data) { transmit_off(); } void dcd_level_changed (GtkAdjustment * adj) { int d; d = (gint) (adj->value * -1); if (d != -1) d = d +1; // dcd = 0 --> old dcd, we do not want that commControl (COMM_RXCH, COMM_DCDLEVEL, d); } gpsk31-0.5/src/file.h0000644000175000017500000000232411031177035011265 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ void file_send_dialog (); void save_log_dialog (); void file_send (GtkFileChooser *fs); void logfile(char *filename); void open_logfile (GtkFileChooser *fs); void put_logfile (const gchar *text); void close_logfile (); void error_dialog(const gchar *text); gpsk31-0.5/src/psk31-coder.C0000644000175000017500000001515611031177037012345 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 1998,1999 Hansi Reiser * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* PSK31 -- Viterbi and Varicode encoder / decoder * based on PSK31-Code by Andrew Senior, G0TJZ * (C) 1998,1999 Hansi Reiser, DL9RDZ * Subject to GPL -- see LICENSE for details */ #include #include #include #include #include "psk31-coder.h" /**********************************************************************/ int psk31_coder::decotab[2048]; int psk31_coder::encotab[256]; unsigned char psk31_coder::symbols[32]; unsigned char distance[4][4]={ {0, 2, 3, 2}, {2, 0, 2, 3}, {3, 2, 0, 2}, {2, 3, 2, 0} }; /* BPSK/QPSK-Encoder */ unsigned int psk31_coder::encode_qpsk(unsigned int sreg) { unsigned int symb; symb = psk31_coder::symbols[~sreg & 0x1F]; if(!lsb) symb = (4 - symb) & 3; /* Reverse 90/270 exchanges * if on LSB */ return symb; } unsigned int psk31_coder::encode_bpsk(unsigned int sreg) { if(sreg & 1) return 0; /* 1 -> no change */ else return 2; /* 0 -> reversal */ } unsigned int psk31_coder::encode(unsigned int sreg, int use_qpsk) { if(use_qpsk) return encode_qpsk(sreg); else return encode_bpsk(sreg); } /* BPSK/QPSK-decoder */ /**********************************************************************/ /* functions used for receiving */ int psk31_coder::IQ2iphase(cmplx IQval) { float phase; int iphase; phase=atan2(IQval.y, IQval.x); iphase=(int)(phase*32767/M_PI); return iphase; } int psk31_coder::encode_varicode(int symb) { return encotab[symb]; } int psk31_coder::decode_varicode(int bit) { unsigned char c; bit = !bit; /* Invert received bit */ //fprintf(stderr,"%d",bit); rxreg >>= 1; if((rxreg & 0x0002) > 0) vlerror = 1; if(bit) rxreg |= 0x8000; if(((rxreg & 0xC000) == 0) && (rxreg != 0)) { while((rxreg & 0x0001) == 0) rxreg >>= 1; rxreg >>= 1; c=vlerror?'¥':decotab[rxreg]; if(c==13) c='\n'; vlerror = 0; rxreg = 0; return c; } return NO_CHAR; /* no new char generated */ } float psk31_coder::x_distance(cmplx rxsymb, int lastphase, int delta) { int ph[4]={0, 0x40, 0x80, 0xC0}; float d; if(!lsb) { ph[1]=0xC0; ph[3]=0x40; } // change 90<>270 deg /* Wir sollten jetzt bei lastphase+delta landen, sind aber bei rxsymb... */ /* we should be at: */ float x,y; int tmp=-(ph[delta]-lastphase); x=cos( tmp/128.0*M_PI ); y=sin( tmp/128.0*M_PI ); d=sqrt( (x-rxsymb.x)*(x-rxsymb.x) + (y-rxsymb.y)*(y-rxsymb.y) ); return d*1.5; /* scaled to original scale -- unnecesary */ } int psk31_coder::decode_qpsk(cmplx rxsymb) { float dists[32]={0}, min; long ests[32]; int newabs[32]; unsigned char select, vote; int i; int rxphase; ampl=sqrt(rxsymb.x*rxsymb.x+rxsymb.y*rxsymb.y); if(ampl>1e-5) { agc=1/ampl; rxsymb.x*=agc; rxsymb.y*=agc; } // rxsymbol now scaled to absolute value of 1 //fprintf(stderr," %f'%f ",rxsymb.x,rxsymb.y); rxphase=IQ2iphase(rxsymb)>>8; int diffphase= (rxphase-lastphase)&0xFF; unsigned char rcvd = ((diffphase + 0x20) & 0xC0 ) >> 6; if(lsb) rcvd = (4 - rcvd) & 3; lastphase=rxphase; min = 1e6; /* Preset minimum = huge */ for(i = 0; i < 32; i++) { #if 0 dists[i] = states[i/2].dist + distance[rcvd][symbols[i]]; #else /* Contrary to the original version use a "soft" decoder... */ dists[i] = states[i / 2].dist + x_distance(rxsymb,states[i/2].last_abs_phase,symbols[i]); #endif newabs[i]=rxphase; if(dists[i] < min) min = dists[i]; ests[i] = ((states[i / 2].estimate) << 1) + (i & 1); } //fprintf(stderr," min=%f ",min); for(i = 0; i < 16; i++) { if(dists[i] < dists[16 + i]) select = 0; else select = 16; states[i].dist = dists[select + i] - min; states[i].estimate = ests[select + i]; states[i].last_abs_phase=newabs[select + i]; } vote = 0; for(i = 0; i < 16; i++) if(states[i].estimate & (1L << 20)) vote++; if(vote == 8) return random()/(RAND_MAX>>1); else return (unsigned char)(vote > 8); } int psk31_coder::decode(cmplx rxsymb, int symbol) { if(qpsk) return decode_varicode(decode_qpsk(rxsymb)); else return decode_varicode(symbol); } void psk31_coder::prime_decoder() { cmplx prime={1,0}; /* Prime the Viterbi decoder */ for(int k = 0; k < 20; k++) { decode_qpsk(prime); prime.x=-prime.x; } } unsigned char psk31_coder::parity(unsigned char u) { unsigned char k, p; p=0; for(k=0; k<8; k++) { p ^= u & 1; u >>= 1; } return p; } int psk31_coder::init_tables(const char *datadir) { /* Generate convolutional coder symbols table */ int k; for(k = 0; k < 32; k++) { symbols[k] = 2 * parity(k & poly1) + parity(k & poly2); } /* Initialize the Varicode tables */ FILE *fp; int n; unsigned int codeword, mask; char buf[15], codfile[1024], *ptr; strncpy(codfile, datadir, 1000); if(codfile[strlen(codfile)-1]!=' ') strcat(codfile, "/"); strcat(codfile, "psk31.cod"); fp = fopen(codfile, "r"); if(!fp) { ptr = getenv("HOME"); if(ptr) { strncpy(codfile, ptr, 1000); strcat(codfile, "/psk31.cod"); fp = fopen(codfile, "r"); } } if(!fp) fp = fopen("psk31.cod", "r"); if(!fp) { fprintf(stderr,"Can't open code table file 'psk31.cod'\n"); exit(1); } for(k = 0; k < 2048; k++) decotab[k] = 248; /* 'ø' indicates invalid codeword */ for(k = 0; k < 256; k++) { codeword = 4; /* Preset 100 pattern */ fgets(buf, 15, fp); n=strlen(buf); while( buf[n]!='1' && buf[n]!='0' && n ) n--; for( ; n >= 0; n--) { codeword <<= 1; if(buf[n] == '1') codeword++; } encotab[k] = codeword; mask = 0x8000; /* Start at MSB */ while((mask & codeword) == 0) mask >>= 1; /* Find dummy '1' MSB added earlier */ codeword &= ~mask; /* Remove it */ codeword >>= 1; /* Remove (always '1') LSB */ decotab[codeword] = k; } fclose(fp); return 0; } gpsk31-0.5/src/main.h0000644000175000017500000000176211031177035011277 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ gint main_loop (gpointer data); gpsk31-0.5/src/hansis_fft.C0000644000175000017500000005447111031177035012437 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 1997 Hansi Reiser * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2008 Thomas Ries * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /////////////////////////////////////////////////////////////////////////// // Hansi's FFT-Klasse // // (C) 1997 Hansi Reiser, dl9rdz, hsreiser@stud.informatik.uni-erlangen.de // // C++ class for a fast computation of DFT-transforms // // partly derived from: // - my own FFT-routines, (C) 1995 Hansi Reiser // - split-radix-algorithm by H.V. Sorensen, University of Pennsylavania, // hvs@ee.upenn.edu (1987) // - C++ - interface inspired by Jan Ernst's dft.C // // Reference: // - Sanjit K. Mitra, James F. Kaiser: Handbook for Digital Signal // Processing, Jung Wiley&Sons Inc. // - Richard E. Blahut, Algebraic Methods for Signal Processing and // Communications Coding, Springer Verlag // - Sorensen, Heideman, Burrus: "On Computing the split-radix FFT", // IEEE Trans. ASSP, ASSP-34, No. 1, pp 152-156 // - Sorensen, Jones, Heideman, Burrus: "Real-Valued fast Fourier // transform algorithms", IEEE Trans. ASSP, ASSP-35, No. 6, pp 849-864 // // This FFT class is provided AS IS and WITHOUT any WARRENTY or FITNESS // FOR A PARTICULAR PURPOSE // This program may be used and distributed freely provided this header // is included and left intact. /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// // Usage: // The constructor creates an FFT-object for a specific transform length, // several precomputations of often-used values are done upon creation, // which may take some time. therefor, if several transforms of the same // lengths are needed, it is advisable to instantiate on FFT-object for // this length once, and then use that one for all transforms being // perforemd. // // All Transform length NOT a power of 2 are done by the stupid O(N^2) // DFT algorithm. In most cases you could do much better there by other // methods, like the Good-Thomas or Winograd FFT algorithms, mostly based // on the Chinese Remainder Theorem. This package only has been optimized // for transform of length 2^N. Those are perfomed by an highly efficient // split-radix algorithm. // Further-optimized algorithms for computing the FFT of real-valued input // are provided, requiring half the time of complex FFT of same length. // // Basic operations provided: // Vector * FFTer -> Vector performs FFT // Vector / FFTer -> Vector performs inverse FFT // Vector * FFTer -> Vector performs FFT optimized // for real input // FFTer.fft( Vector ) performs in-place FFT // FFTer.ifft( Vector ) performs in-place inverse FFT // FFTer.rfft( Vector ) performs in-place real FFT, imag // parts of input assumed being 0 // Additional operations provided: // Vector * FFTer converted to Vector * FFTer // FFTer * Vector<...> converted to Vector<...> * FFTer // /////////////////////////////////////////////////////////////////////////// // vielleicht kann ja jemand was damit anfagen. wenn ned... macht a // nix :) ich hoff, daß keine allzu groben Bugs mehr drin sind. Der // große C++ - programmierer bin ich ned, drum kannma an dem dem klassen- // interface sicher no vieles besser machn, wenn jemandn was ned passt // kanners mir ja sagn. das ganze wurde unter linux mit der gnu ansi-c++ // libg++ entwicklet (klassen Complex und Vektor). gnu verwendet für // die exponentation statt dem XOR-Operator eine funktion namens pow, // und vector wird klein statt groß geschrieben, sonst sollts keine // größeren Unterschiede geben. (i hab jez nix gegen "`unsere"' complex- // klasse, aber i wolltmi ned lang damit beschäftigen wie man dem g++ // sagt die eigene NICHT zu verwenden :-) #include "hansis_fft.h" #include "stdio.h" #include "math.h" #include "stdlib.h" FFTer::FFTer( int l, int mod ) { int loop=2; // Testen, ob l=2^M ist, und ggf dieses M berechnen len=l; for( loop=2,M=1; loop FFTer::operator*( const Vector& fd ) { return fd * (*this); } Vector FFTer::operator*( const Vector& fd ) { return fd * (*this); } Vector FFTer::operator*( const Vector& fd ) { return fd * (*this); } #define CHECK_SIZE(fd,fft) \ if( int((fd).size()) < fft.len ) { \ fprintf(stderr, "DFT-Vector too small\n"); \ exit(1); \ } Vector operator*( const Vector& fd, const FFTer& fft ) { Vector fr(fft.len); CHECK_SIZE(fd,fft); if(fft.mode) return fft.dft( fd, 0 ); // normale DFT return fft.fftsr( fd ); // schnelle FFT } Vector operator*( const Vector& fd, const FFTer& fft ) { Vector fr(fft.len); CHECK_SIZE(fd,fft); if(fft.mode) return fft.dft( fd, 0 ); // normale DFT return fft.rfftsr( fd ); // schnelle FFT } Vector operator*( const Vector& fd, const FFTer& fft ) { Vector fr(fft.len); CHECK_SIZE(fd,fft); if(fft.mode) return fft.dft( fd, 0 ); // normale DFT return fft.rfftsr( fd ); // schnelle FFT } Vector operator/( const Vector& fd, const FFTer& fft ) { Vector fr(fft.len); CHECK_SIZE(fd, fft); if(fft.mode) return fft.dft( fd, 1 ); // normale inverse DFT return fft.ifftsr( fd ); // schnelle inverse FFT } #endif ////////////////////////////////////////////////////////////////////// //// private Hilfsfunktionen primitiv-DFT, für len != pow(2,M) ////////////////////////////////////////////////////////////////////// #if 0 void FFTer::dft_init() { Complex m(cos(2*M_PI/len), -sin(2*M_PI/len)); int i; Dm=new Complex[len]; for(i=0; i fr(len); for(i=0; i FFTer::dft( const Vector input, int invers ) const { int i, j; Vector fr(len); for(i=0; i>1; n4=n2>>2; fftsr_helper( n2, n4, its, x, x+n4, x+2*n4, x+3*n4, y, y+n4, y+2*n4, y+3*n4 ); its<<=1; } // End-"`Butterflies"' (die noch fehlenden Länge-2-Transformationen) i_start=0; i_delta=4; do { for(i=i_start; i>1; n4=n2>>2; ifftsr_helper(n2, n4, x, x+n4, x+2*n4, x+3*n4, y, y+n4, y+2*n4, y+3*n4); } // Letzte 2er-Stufe i_start=0; i_delta=4; do { for( i=i_start; i>2; rfftsr_helper(n2, n4, x, x+n4, x+2*n4, x+3*n4); } } void FFTer::rfftsr_helper( int n2, int n4, double *x1, double *x2, double *x3, double *x4) const { int n8=n2/8,i_start,i_delta,i,j,i2,jn; double tmp1,tmp2,tmp3,tmp4,tmp5; double E, SS1, SS3, SD1, SD3, CC1, CC3, CD1, CD3; i_start=0; i_delta=n2*2; do { for(i=i_start; i v(LEN), v2; Vector d(LEN); int i; printf("initalisieren...\n"); for(i=0; i * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* * main.c - Main loop and initialisations */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "main_screen.h" #include "misc.h" #include "menu.h" #include "spectrum.h" #include "call_dialog.h" #include "globals.h" #include "phasescope.h" #include "server.h" #include "file.h" #include "main.h" #include "text.h" #include "support.h" #include "callback.h" #include "socketif.h" #ifndef HAVE_LIBPTHREAD void master_handler(void); #endif struct ini_settings ini_settings; /* Initial Parameters */ extern int scconfig[]; /* [0]==8bit/16bit [1]==mono/stereo */ bool gpsk31debug = FALSE; char configfile[128]=""; /* explicit config file to be loaded */ /* Our Main loop, called with gtk_timeout_add() */ gint main_loop (gpointer data) { static float rxfreqOld, rxfreq; /* last rx freq */ static int oldtx; /* last tx/rx state */ int phdelta; /* last phase scope arc */ int l; int sts; char str[2]; GtkTextBuffer *buffer; GtkTextIter iter, end; #ifndef HAVE_LIBPTHREAD // 4 is an empirical value. // If choosen too low, sound card buffer will run empty, and thus sound // will have interruptions (fatal!). A value too high isn't that critical... for(int i=0; i<4; i++) { master_handler(); #endif /* Handle FFT */ int N = getsamplecnt (); float fftval[N]; l = commGetData (COMM_FFTCH, (char *) fftval, sizeof (fftval)); if (l > 0) { spectrum_updateFFT (fftval, N); } #ifndef HAVE_LIBPTHREAD } #endif /* handle echo */ char *time_string = get_time_string(NULL); /* Get the time string, must be freed later */ char buf[256]; l = commGetData (COMM_ECHOCH, buf, sizeof buf); if (l > 0) { for (int i = 0; i < l; i++) { str[0] = buf[i]; str[1] = '\0'; if (str[0] == '\r') break; put_logfile (str); /* Save to the logfile if open */ if (str[0] == 0x7F || str[0] == '\b') { buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (main_screen.rxwindow)); gtk_text_buffer_get_end_iter (buffer, &end); gtk_text_buffer_get_end_iter (buffer, &iter); gtk_text_iter_backward_chars (&iter, 1); gtk_text_buffer_delete (buffer, &iter, &end); } else put_rx_window (str, 1); } } /* Handle Receive */ l = commGetData (COMM_RXCH, buf, sizeof buf); if (l > 0) { for (int i = 0; i < l; i++) { str[0] = buf[i]; str[1] = '\0'; if (str[0] == '\r') break; put_logfile (str); /* Save to the logfile if open */ if (str[0] == 0x7F || str[0] == '\b') { buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (main_screen.rxwindow)); gtk_text_buffer_get_end_iter (buffer, &end); gtk_text_buffer_get_end_iter (buffer, &iter); gtk_text_iter_backward_chars (&iter, 1); gtk_text_buffer_delete (buffer, &iter, &end); } else { put_rx_window (str, 0); /* send to TCP connected client - if one is connected */ sts = tcp_send(str, strlen(str)); } } } PSK31info rxinfo; PSK31info txinfo; commGetInfo (COMM_RXCH, &rxinfo, sizeof (rxinfo)); commGetInfo (COMM_TXCH, &txinfo, sizeof (txinfo)); rxfreq = 0.01 * rxinfo.freq; phdelta = rxinfo.phdelta; /* Find out if we are TX or RX, and update the statusbar */ if (rxinfo.ptt == 1 && oldtx == 0) { gtk_statusbar_pop (GTK_STATUSBAR (statusbar.txstate), 1); gtk_statusbar_push (GTK_STATUSBAR (statusbar.txstate), 1, "TX"); oldtx = 1; /* And write the info in the Log file */ put_logfile ("\n\n<<<<<< Transmission started at: "); put_logfile (time_string); put_logfile (" >>>>>>\n\n"); } else if (rxinfo.ptt == 0 && oldtx == 1) { gtk_statusbar_pop (GTK_STATUSBAR (statusbar.txstate), 1); gtk_statusbar_push (GTK_STATUSBAR (statusbar.txstate), 1, "RX"); oldtx = 0; /* And write the info to the Log file */ put_logfile ("\n\n<<<<<< Transmission stopped at: "); put_logfile (time_string); put_logfile (" >>>>>>\n\n"); } if (rxinfo.ptt == 0) { /* Receiving...... */ draw_scope (rxinfo.phdelta, rxinfo.strength, rxinfo.dcd); /* Update RX freq spin button */ if (!GTK_WIDGET_HAS_FOCUS (main_screen.rx_freq) && !GTK_WIDGET_HAS_FOCUS (main_screen.tx_freq)) { if ((rxfreq - rxfreqOld) > .05 || rxfreqOld - rxfreq > .05) { gtk_spin_button_set_value (GTK_SPIN_BUTTON (main_screen.rx_freq), rxfreq); rxfreqOld = rxfreq; } } } g_free (time_string); /* check the TCP connection for received characters and feed them into GPSK31 */ sts = tcp_read(buf, sizeof(buf)-1); /* sts>0 -> received something? */ if (sts > 0) { /* feed into gpsk31 like sending a Fx-key macro (macro processing) */ macro_processor2(buf); } /* check for a new TCP connection */ tcp_connect(); return (true); } static void parsecommandline (int argc, char *argv[]) { extern char *optarg; /* Defined in libc getopt and unistd.h */ gint p; int i; while ((p = getopt (argc, argv, "dhvc:")) != -1) { switch (p) { case ':': case '?': case 'h': g_print ("Usage: %s [option]\n", PACKAGE); g_print (" -d Enable debugging\n"); g_print (" -h Display this help and exit\n"); g_print (" -v Output version information and exit\n"); g_print (" -c Load the specific config \n"); exit (0); break; case 'c': i=sizeof(configfile)-1; strncpy(configfile,optarg,i); configfile[i]='\0'; break; case 'd': gpsk31debug = TRUE; break; case 'v': gchar *versionstr = g_strdup_printf ("%s version %s\n", g_path_get_basename (argv[0]), VERSION); g_print (versionstr); g_free (versionstr); exit (0); break; } } } int main (int argc, char *argv[]) { /* create .gpsk31 directory */ char *home = getenv("HOME"); char direct[strlen (home) + 8]; char fn[strlen(home) + 50]; strcpy (direct, home); strcat (direct, "/.gpsk31"); mkdir (direct, 00700); strcpy (fn,direct); strcat (fn, "/"); /* sound card config */ scconfig[0] = 1; scconfig[1] = 1; parsecommandline (argc, argv); gtk_init (&argc, &argv); /* init gtk+ */ add_pixmap_directory (PIXMAPDIR); read_config (); /* read gpsk.conf and the ini_settings structure */ setup_screen (); /* build the main window */ set_config (); /* set the configuration */ init_call_dialog (); /* init the logbook dialog */ /* allow full path, starting with '/' */ if (ini_settings.log_filename[0] == '/' ) { strcpy(fn,ini_settings.log_filename); } else { strcat(fn,ini_settings.log_filename); } logfile(fn); /* These have always the same values when we start */ commControl (COMM_TXCH, COMM_QPSK, 0); commControl (COMM_RXCH, COMM_QPSK, 0); commControl (COMM_RXCH, COMM_AFC, 1); check_menu ("/MainMenu/ModeMenu/AFC", 1); check_menu ("/MainMenu/ModeMenu/NET", 1); g_signal_connect (G_OBJECT (main_screen.window), "delete_event", G_CALLBACK (exit_dialog), NULL); g_timeout_add (250, display_time, NULL); /* timeout for clock */ #ifndef HAVE_LIBPTHREAD gtk_idle_add (main_loop, NULL); #else g_timeout_add (50, main_loop, NULL); #endif /* post listen TCP socket for remote operation */ tcp_set_listen_port(ini_settings.tcp_listen_port); /* go into gtk_main loop and never come back */ gtk_main (); } gpsk31-0.5/src/main_screen.C0000644000175000017500000004512711031177035012574 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ #include #include #include "main_screen.h" #include "callback.h" #include "misc.h" #include "globals.h" #include "menu.h" #include "phasescope.h" #include "support.h" #include #include #include #include #include #include #include #define EVENT_METHOD(i, x) GTK_WIDGET_GET_CLASS(i)->x struct statusbar statusbar; struct highlight highlight; struct main_screen main_screen; float max_value = 0; int scrolled = 0; extern int display_waterfall; /* display - 0: spectrum, 1: waterfall */ extern char configfile[]; /* explicit config file to be loaded */ /* * These functions are called, to take our 2 pixmaps fresh //////////////// */ static gint configure_event_phase_scope (GtkWidget * widget, GdkEventConfigure * event) { if (main_screen.phase_scope) g_object_unref (main_screen.phase_scope); main_screen.phase_scope = gdk_pixmap_new (widget->window, widget->allocation.width, widget->allocation.height, -1); gdk_draw_rectangle (main_screen.phase_scope, widget->style->black_gc, TRUE, 0, 0, widget->allocation.width, widget->allocation.height); draw_arc (); return TRUE; } static gint expose_event_phase_scope (GtkWidget * widget, GdkEventExpose * event) { gdk_draw_drawable (widget->window, widget->style->fg_gc[GTK_WIDGET_STATE (widget)], main_screen.phase_scope, event->area.x, event->area.y, event->area.x, event->area.y, event->area.width, event->area.height); return TRUE; } static gint configure_event_spectrum (GtkWidget * widget, GdkEventConfigure * event) { if (main_screen.spectrum) g_object_unref (main_screen.spectrum); main_screen.spectrum = gdk_pixmap_new (widget->window, widget->allocation.width, widget->allocation.height, -1); gdk_draw_rectangle (main_screen.spectrum, widget->style->black_gc, TRUE, 0, 0, widget->allocation.width, widget->allocation.height); return TRUE; } static gint expose_event_spectrum (GtkWidget * widget, GdkEventExpose * event) { if (display_waterfall==0) { gdk_draw_drawable (widget->window, widget->style->fg_gc[GTK_WIDGET_STATE (widget)], main_screen.spectrum, event->area.x, event->area.y, event->area.x, event->area.y, event->area.width, event->area.height); } else { gdk_draw_pixbuf (widget->window, NULL, main_screen.gbl_wfall_pixbuf, event->area.x, event->area.y, event->area.x, event->area.y, event->area.width, event->area.height, GDK_RGB_DITHER_NONE, 0, 0 ); } return FALSE; } /* * This function builds the main screen. */ int setup_screen () { main_screen.phase_scope = NULL; /* Initialize our 2 drawing areas */ main_screen.spectrum = NULL; int i; gchar *tip; GdkPixbuf *pixbuf; GtkWidget *label; GtkWidget *statusbar_dummy; GtkWidget *box; GtkWidget *box1; GtkWidget *box2; GtkWidget *box3; GtkWidget *box4; GtkWidget *box5; GtkWidget *box6; GtkWidget *box7; GtkWidget *box8; GtkWidget *hbox; GtkWidget *hbox2; GtkWidget *rxframe, *txframe; GtkWidget *optbox, *optframe; GtkWidget *scrollwindow; GtkWidget *txscrollwindow; GtkWidget *statusbar_box; PangoFontDescription *font; GtkWidget *tx_button; GtkWidget *rx_button; GtkWidget *clear_button; GtkWidget *area; GtkWidget *hrule; GtkWidget *table; GtkWidget *frame; GtkWidget *scale; GtkAdjustment *rx_adj; GtkAdjustment *tx_adj; // GtkTooltips *tooltips; main_screen.window = gtk_window_new (GTK_WINDOW_TOPLEVEL); pixbuf = create_pixbuf ("gpsk31.png"); if (pixbuf) { gtk_window_set_icon (GTK_WINDOW (main_screen.window), pixbuf); g_object_unref (pixbuf); } hbox = gtk_hbox_new (FALSE, 0); hbox2 = gtk_hbox_new (FALSE, 0); box = gtk_vbox_new (FALSE, 2); box1 = gtk_hbox_new (FALSE, 2); box2 = gtk_vbox_new (TRUE, 5); box3 = gtk_vbox_new (TRUE, 5); box4 = gtk_vbox_new (TRUE, 5); box5 = gtk_vbox_new (TRUE, 5); box6 = gtk_vbox_new (TRUE, 5); box7 = gtk_vbox_new (TRUE, 5); box8 = gtk_hbox_new (TRUE, 0); statusbar_box = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (main_screen.window), box); gtk_container_set_border_width (GTK_CONTAINER (main_screen.window), 1); if (strlen(configfile) == 0) { /* default config file used */ gtk_window_set_title (GTK_WINDOW (main_screen.window), "GPSK31 - Version "VERSION); } else { /* a specific config file is used */ char tmp[256]; sprintf(tmp,"GPSK31 - Version %s - %s",VERSION, configfile); gtk_window_set_title (GTK_WINDOW (main_screen.window), tmp); } gtk_widget_set_size_request (GTK_WIDGET (main_screen.window), -1, 450); init_menu (); // create the menu widget gtk_box_pack_start (GTK_BOX (box), main_screen.menu, FALSE, FALSE, 0); rxframe = gtk_frame_new ("RX window"); scrollwindow = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrollwindow), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); main_screen.rxwindow = gtk_text_view_new (); GTK_WIDGET_UNSET_FLAGS (main_screen.rxwindow, GTK_CAN_FOCUS); gtk_widget_set_size_request (main_screen.rxwindow, -1, 140); gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (main_screen.rxwindow), GTK_WRAP_WORD); gtk_container_add (GTK_CONTAINER (scrollwindow), main_screen.rxwindow); /* rx colors and font */ GtkTextBuffer *rxbuffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (main_screen.rxwindow)); highlight.rxrx = g_strdup ("rx_window_color_rx"); gtk_text_buffer_create_tag (rxbuffer, highlight.rxrx, "foreground", ini_settings.rx_window_color_rx, NULL); highlight.rxtx = g_strdup ("rx_window_color_tx"); gtk_text_buffer_create_tag (rxbuffer, highlight.rxtx, "foreground", ini_settings.rx_window_color_tx, NULL); font = pango_font_description_from_string (ini_settings.rx_window_font); gtk_widget_modify_font (main_screen.rxwindow, font); pango_font_description_free(font); txframe = gtk_frame_new ("TX window"); txscrollwindow = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (txscrollwindow), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); main_screen.txwindow = gtk_text_view_new (); // GTK_WIDGET_UNSET_FLAGS (main_screen.txwindow, GTK_CAN_FOCUS); gtk_widget_set_size_request (main_screen.txwindow, -1, 70); gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (main_screen.txwindow), GTK_WRAP_WORD); gtk_container_add (GTK_CONTAINER (txscrollwindow), main_screen.txwindow); /* tx colors and font */ GtkTextBuffer *txbuffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (main_screen.txwindow)); highlight.tx = g_strdup ("tx_window_color"); gtk_text_buffer_create_tag (txbuffer, highlight.tx, "foreground", ini_settings.tx_window_color, NULL); font = pango_font_description_from_string (ini_settings.tx_window_font); gtk_widget_modify_font (main_screen.txwindow, font); pango_font_description_free(font); main_screen.phase_drawing = gtk_drawing_area_new (); gtk_widget_set_size_request (GTK_WIDGET (main_screen.phase_drawing), 100, 100); main_screen.spectrum_drawing = gtk_drawing_area_new (); gtk_widget_set_size_request (GTK_WIDGET (main_screen.spectrum_drawing), 200, 100); /* Create a table for placing the ruler and the drawing area */ table = gtk_table_new( 3, 2, FALSE ); area = main_screen.spectrum_drawing; gtk_table_attach( GTK_TABLE(table), main_screen.spectrum_drawing, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) GTK_FILL, 0, 0); gtk_widget_set_events( main_screen.spectrum_drawing, GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK ); /* The horizontal ruler goes on top. As the mouse moves across the * drawing area, a motion_notify_event is passed to the * appropriate event handler for the ruler. */ hrule = gtk_hruler_new(); gtk_ruler_set_metric( GTK_RULER(hrule), GTK_PIXELS ); /* put accurate frequency labels * spectrum width: 0 - +/- 800Hz * 1 - +/- 400 Hz * 2 - +/- 200 Hz */ switch (ini_settings.spectrum_width) { case 0: i=800; break; case 1: i=400; break; case 2: default: i=200; break; } gtk_ruler_set_range( GTK_RULER(hrule), ini_settings.freq - i, ini_settings.freq + i, 0, 100 ); g_signal_connect_swapped (G_OBJECT (area), "motion_notify_event", G_CALLBACK (EVENT_METHOD (hrule, motion_notify_event)), G_OBJECT (hrule)); gtk_table_attach( GTK_TABLE(table), hrule, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND|GTK_SHRINK|GTK_FILL), (GtkAttachOptions) GTK_FILL, 0, 0 ); gtk_box_pack_start (GTK_BOX (box), rxframe, TRUE, TRUE, 2); gtk_container_add (GTK_CONTAINER (rxframe), hbox); gtk_box_pack_start (GTK_BOX (box), box8, FALSE, TRUE, 5); gtk_box_pack_start (GTK_BOX (box), txframe, TRUE, TRUE, 0); gtk_container_add (GTK_CONTAINER (txframe), hbox2); /* Build the 8 buttons */ // tooltips = gtk_tooltips_new (); for (i=0;i<=7;i++) { main_screen.f_button[i] = gtk_button_new_with_label (" "); gtk_box_pack_start (GTK_BOX (box8), main_screen.f_button[i], TRUE, TRUE, 1); GTK_WIDGET_UNSET_FLAGS (main_screen.f_button[i], GTK_CAN_FOCUS); g_signal_connect (G_OBJECT (main_screen.f_button[i]), "clicked", G_CALLBACK (macro_processor), (gpointer *) (GINT_TO_POINTER (i))); tip = g_strdup_printf ("[F%d]", i+1); // gtk_tooltips_set_tip (tooltips, main_screen.f_button[i], tip, NULL); g_free (tip); } gtk_box_pack_start (GTK_BOX (hbox), scrollwindow, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox2), txscrollwindow, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (box), box1, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (box1), main_screen.phase_drawing, FALSE, FALSE, 0); main_screen.dcd_adj = (GtkAdjustment *) gtk_adjustment_new (-6.0, -99, 2, 1, 3, 1); scale = gtk_vscrollbar_new (GTK_ADJUSTMENT (main_screen.dcd_adj)); GTK_WIDGET_UNSET_FLAGS (scale, GTK_CAN_FOCUS); gtk_box_pack_start (GTK_BOX (box1), scale, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (box1), table, FALSE, FALSE, 0); gtk_box_pack_end (GTK_BOX (box1), box2, FALSE, TRUE, 1); tx_button = gtk_button_new_with_label ("Transmit (F11)"); GTK_WIDGET_UNSET_FLAGS (tx_button, GTK_CAN_FOCUS); gtk_box_pack_start (GTK_BOX (box2), tx_button, TRUE, TRUE, 1); rx_button = gtk_button_new_with_label ("Receive (F12)"); GTK_WIDGET_UNSET_FLAGS (rx_button, GTK_CAN_FOCUS); gtk_box_pack_start (GTK_BOX (box2), rx_button, TRUE, TRUE, 1); clear_button = gtk_button_new_with_label ("A_bort Transmit"); gtk_button_set_use_underline (GTK_BUTTON(clear_button), TRUE); GTK_WIDGET_UNSET_FLAGS (clear_button, GTK_CAN_FOCUS); gtk_box_pack_start (GTK_BOX (box2), clear_button, TRUE, TRUE, 1); frame = gtk_frame_new ("Mode"); gtk_box_pack_start (GTK_BOX (box1), frame, FALSE, TRUE, 2); gtk_container_add (GTK_CONTAINER (frame), box4); label = gtk_label_new ("QPSK"); gtk_label_set_pattern (GTK_LABEL (label), "_"); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.8); main_screen.mode_qpsk = gtk_check_button_new (); gtk_container_add (GTK_CONTAINER (main_screen.mode_qpsk), label); GTK_WIDGET_UNSET_FLAGS (main_screen.mode_qpsk, GTK_CAN_FOCUS); gtk_box_pack_start (GTK_BOX (box4), main_screen.mode_qpsk, FALSE, FALSE, 0); label = gtk_label_new ("CW ID"); gtk_label_set_pattern (GTK_LABEL (label), "_"); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.8); main_screen.cwid = gtk_check_button_new (); gtk_container_add (GTK_CONTAINER (main_screen.cwid), label); GTK_WIDGET_UNSET_FLAGS (main_screen.cwid, GTK_CAN_FOCUS); gtk_box_pack_start (GTK_BOX (box4), main_screen.cwid, FALSE, FALSE, 0); frame = gtk_frame_new ("RX-Freq"); gtk_box_pack_start (GTK_BOX (box1), frame, FALSE, TRUE, 2); gtk_container_add (GTK_CONTAINER (frame), box5); rx_adj = (GtkAdjustment *) gtk_adjustment_new (1000, 100, 5000, 1, 1, 0); main_screen.rx_freq = gtk_spin_button_new (rx_adj, 1, 1); gtk_box_pack_start (GTK_BOX (box5), main_screen.rx_freq, FALSE, FALSE, 0); label = gtk_label_new ("AFC"); gtk_label_set_pattern (GTK_LABEL (label), "_"); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.8); main_screen.afc = gtk_check_button_new (); gtk_container_add (GTK_CONTAINER (main_screen.afc), label); GTK_WIDGET_UNSET_FLAGS (main_screen.afc, GTK_CAN_FOCUS); gtk_box_pack_start (GTK_BOX (box5), main_screen.afc, TRUE, FALSE, 0); frame = gtk_frame_new ("TX-Freq"); gtk_box_pack_start (GTK_BOX (box1), frame, FALSE, TRUE, 2); gtk_container_add (GTK_CONTAINER (frame), box6); tx_adj = (GtkAdjustment *) gtk_adjustment_new (1000, 100, 5000, 1, 1, 0); main_screen.tx_freq = gtk_spin_button_new (tx_adj, 1, 1); gtk_box_pack_start (GTK_BOX (box6), main_screen.tx_freq, FALSE, FALSE, 0); label = gtk_label_new ("NET"); gtk_label_set_pattern (GTK_LABEL (label), "_"); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.8); main_screen.net = gtk_check_button_new (); gtk_container_add (GTK_CONTAINER (main_screen.net), label); optframe = gtk_frame_new ("Options"); gtk_box_pack_start (GTK_BOX (box1), optframe, FALSE, TRUE, 2); optbox = gtk_vbox_new (TRUE, 2); gtk_container_add (GTK_CONTAINER (optframe), optbox); label = gtk_label_new ("Auto TX"); gtk_label_set_pattern (GTK_LABEL (label), "_"); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.8); main_screen.mode_autotx = gtk_check_button_new (); gtk_container_add (GTK_CONTAINER (main_screen.mode_autotx), label); GTK_WIDGET_UNSET_FLAGS (main_screen.mode_autotx, GTK_CAN_FOCUS); gtk_box_pack_start (GTK_BOX (optbox), main_screen.mode_autotx, FALSE, FALSE, 0); GTK_WIDGET_UNSET_FLAGS (main_screen.net, GTK_CAN_FOCUS); gtk_box_pack_start (GTK_BOX (box6), main_screen.net, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (box), statusbar_box, FALSE, FALSE, 0); statusbar.logged = gtk_statusbar_new (); gtk_widget_set_size_request (GTK_WIDGET (statusbar.logged), 200, -1); gtk_box_pack_start (GTK_BOX (statusbar_box), statusbar.logged, FALSE, FALSE, 1); statusbar.mode = gtk_statusbar_new (); gtk_statusbar_push (GTK_STATUSBAR (statusbar.mode), 1, "BPSK"); gtk_widget_set_size_request (GTK_WIDGET (statusbar.mode), 100, -1); gtk_box_pack_start (GTK_BOX (statusbar_box), statusbar.mode, FALSE, FALSE, 1); statusbar.txstate = gtk_statusbar_new (); gtk_statusbar_push (GTK_STATUSBAR (statusbar.txstate), 1, "RX"); gtk_widget_set_size_request (GTK_WIDGET (statusbar.txstate), 100, -1); gtk_box_pack_start (GTK_BOX (statusbar_box), statusbar.txstate, FALSE, FALSE, 1); statusbar_dummy = gtk_statusbar_new (); gtk_box_pack_start (GTK_BOX (statusbar_box), statusbar_dummy, TRUE, TRUE, 1); statusbar.time = gtk_statusbar_new (); gtk_widget_set_size_request (GTK_WIDGET (statusbar.time), 200, -1); gtk_box_pack_end (GTK_BOX (statusbar_box), statusbar.time, FALSE, FALSE, 1); /////// Set the state for startup of our Buttons //////////////////////////////////////////////// gtk_widget_grab_focus (GTK_WIDGET (main_screen.txwindow)); ///////////////////////////////////////////////////////////////////////////////////// ////////// And now our signals ////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////// g_signal_connect (G_OBJECT (main_screen.phase_drawing), "expose_event", G_CALLBACK (expose_event_phase_scope), NULL); g_signal_connect (G_OBJECT (main_screen.phase_drawing), "configure_event", G_CALLBACK (configure_event_phase_scope), NULL); gtk_widget_set_events (main_screen.phase_drawing, GDK_EXPOSURE_MASK); g_signal_connect (G_OBJECT (main_screen.spectrum_drawing), "expose_event", G_CALLBACK (expose_event_spectrum), NULL); g_signal_connect (G_OBJECT (main_screen.spectrum_drawing), "configure_event", G_CALLBACK (configure_event_spectrum), NULL); gtk_widget_set_events (main_screen.window, GDK_KEY_RELEASE_MASK); g_signal_connect (G_OBJECT (main_screen.txwindow), "key_press_event", G_CALLBACK (key_input), NULL); g_signal_connect (G_OBJECT (main_screen.txwindow), "key_release_event", G_CALLBACK (key_released), NULL); g_signal_connect (G_OBJECT (txbuffer), "changed", G_CALLBACK (txbuffer_changed), NULL); gtk_widget_set_events (main_screen.spectrum_drawing, GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK); g_signal_connect (G_OBJECT (main_screen.spectrum_drawing), "button_press_event", G_CALLBACK (spectrum_motion_event), NULL); g_signal_connect (G_OBJECT (main_screen.dcd_adj), "value_changed", G_CALLBACK (dcd_level_changed), NULL); g_signal_connect (G_OBJECT (rx_adj), "value_changed", G_CALLBACK (rx_freq_changed), (gpointer) main_screen.rx_freq); g_signal_connect (G_OBJECT (tx_adj), "value_changed", G_CALLBACK (tx_freq_changed), (gpointer) main_screen.tx_freq); g_signal_connect (G_OBJECT (main_screen.afc), "toggled", G_CALLBACK (afc_toggled), NULL); g_signal_connect (G_OBJECT (main_screen.net), "toggled", G_CALLBACK (net_toggled), NULL); g_signal_connect (G_OBJECT (main_screen.cwid), "toggled", G_CALLBACK (cwid_toggled), NULL); g_signal_connect (G_OBJECT (main_screen.mode_qpsk), "toggled", G_CALLBACK (qpsk_toggled), NULL); g_signal_connect (G_OBJECT (clear_button), "clicked", G_CALLBACK (tx_clear_pressed), NULL); g_signal_connect (G_OBJECT (tx_button), "clicked", G_CALLBACK (tx_button_pressed), NULL); g_signal_connect (G_OBJECT (rx_button), "clicked", G_CALLBACK (rx_button_pressed), NULL); gtk_widget_show_all (main_screen.window); return (0); } gpsk31-0.5/src/cfg.C0000644000175000017500000004677211031177034011056 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* * cfg.c - load and save program settings in GKeyFile format */ #include #include "cfg.h" #include "globals.h" /* * Initial configuration */ void config_create (void) { ini_settings.tx_window_color = g_strdup ("black"); ini_settings.tx_window_font = g_strdup ("courier new normal 12"); ini_settings.rx_window_color_rx = g_strdup ("blue"); ini_settings.rx_window_color_tx = g_strdup ("red"); ini_settings.rx_window_font = g_strdup ("courier new normal 12"); ini_settings.phase_scope_dcd_on_color = g_strdup ("yellow"); ini_settings.phase_scope_dcd_off_color = g_strdup ("red"); ini_settings.phase_scope_arc_color = g_strdup ("darkblue"); ini_settings.spectrum_color = g_strdup ("green"); ini_settings.spectrum_tune_line_color = g_strdup ("red"); ini_settings.spectrum_center_line_color = g_strdup ("#808000"); ini_settings.spectrum_width = 1; ini_settings.spectrum_speed = 100; ini_settings.ptt_device = g_strdup ("/dev/ttyS1"); ini_settings.audio_device = g_strdup ("/dev/dsp"); ini_settings.call = g_strdup ("N0CALL"); ini_settings.name = g_strdup ("Nobody"); ini_settings.qth = g_strdup ("Nowhere"); ini_settings.cw_string = g_strdup ("de N0CALL kn"); ini_settings.freq = 1000; ini_settings.dcd_level = 13; ini_settings.lsb = 0; ini_settings.new_rx = 1; ini_settings.log_filename = g_strdup ("gpsk31.log"); ini_settings.xlog_auto_freq = 1; ini_settings.tcp_listen_port = 0; ini_settings.label[0] = g_strdup ("F1 CQ"); ini_settings.label[1] = g_strdup ("F2"); ini_settings.label[2] = g_strdup ("F3"); ini_settings.label[3] = g_strdup ("F4 TX"); ini_settings.label[4] = g_strdup ("F5 RX"); ini_settings.label[5] = g_strdup ("F6"); ini_settings.label[6] = g_strdup ("F7"); ini_settings.label[7] = g_strdup ("F8"); ini_settings.label[8] = g_strdup ("SHIFT F1"); ini_settings.label[9] = g_strdup ("SHIFT F2"); ini_settings.label[10] = g_strdup ("SHIFT F3"); ini_settings.label[11] = g_strdup ("SHIFT F4"); ini_settings.label[12] = g_strdup ("SHIFT F5"); ini_settings.label[13] = g_strdup ("SHIFT F6"); ini_settings.label[14] = g_strdup ("SHIFT F7"); ini_settings.label[15] = g_strdup ("SHIFT F8"); ini_settings.text[0] = g_strdup ("~tCQ CQ CQ de ~mc ~mc ~mc \nCQ CQ CQ de ~mc ~mc ~mc \nCQ CQ CQ de ~mc ~mc ~mc \n~r"); ini_settings.text[1] = g_strdup (""); ini_settings.text[2] = g_strdup (""); ini_settings.text[3] = g_strdup ("~t"); ini_settings.text[4] = g_strdup ("~r"); ini_settings.text[5] = g_strdup (""); ini_settings.text[6] = g_strdup (""); ini_settings.text[7] = g_strdup (""); ini_settings.text[8] = g_strdup (""); ini_settings.text[9] = g_strdup (""); ini_settings.text[10] = g_strdup (""); ini_settings.text[11] = g_strdup (""); ini_settings.text[12] = g_strdup (""); ini_settings.text[13] = g_strdup (""); ini_settings.text[14] = g_strdup (""); ini_settings.text[15] = g_strdup (""); } /* * Load values from the configuration file and when failed load a fallback value * * NOTE: * - when a value fails to load, a string will be NULL and an integer zero * - fallback values should be the same as in config_create above * * because integers are zero when failed to load we add '1' when saving and * subtract '1' when loading, so zero values will be saved correctly */ static void config_load_from_keyfile (GKeyFile *file) { ini_settings.tx_window_color = g_key_file_get_string (file, "tx_window", "color", NULL); if (!ini_settings.tx_window_color) ini_settings.tx_window_color = g_strdup ("black"); ini_settings.tx_window_font = g_key_file_get_string (file, "tx_window", "font", NULL); if (!ini_settings.tx_window_font) ini_settings.tx_window_font = g_strdup ("courier new normal 12"); ini_settings.rx_window_color_rx = g_key_file_get_string (file, "rx_window", "color_rx", NULL); if (!ini_settings.rx_window_color_rx) ini_settings.rx_window_color_rx = g_strdup ("blue"); ini_settings.rx_window_color_tx = g_key_file_get_string (file, "rx_window", "color_tx", NULL); if (!ini_settings.rx_window_color_tx) ini_settings.rx_window_color_tx = g_strdup ("red"); ini_settings.rx_window_font = g_key_file_get_string (file, "rx_window", "font", NULL); if (!ini_settings.rx_window_font) ini_settings.rx_window_font = g_strdup ("courier new normal 12"); ini_settings.phase_scope_dcd_on_color = g_key_file_get_string (file, "phase_scope", "dcd_on_color", NULL); if (!ini_settings.phase_scope_dcd_on_color) ini_settings.phase_scope_dcd_on_color = g_strdup ("yellow"); ini_settings.phase_scope_dcd_off_color = g_key_file_get_string (file, "phase_scope", "dcd_off_color", NULL); if (!ini_settings.phase_scope_dcd_off_color) ini_settings.phase_scope_dcd_off_color = g_strdup ("yellow"); ini_settings.phase_scope_arc_color = g_key_file_get_string (file, "phase_scope", "arc_color", NULL); if (!ini_settings.phase_scope_arc_color) ini_settings.phase_scope_arc_color = g_strdup ("darkblue"); ini_settings.spectrum_color = g_key_file_get_string (file, "spectrum", "color", NULL); if (!ini_settings.spectrum_color) ini_settings.spectrum_color = g_strdup ("green"); ini_settings.spectrum_tune_line_color = g_key_file_get_string (file, "spectrum", "tune_line_color", NULL); if (!ini_settings.spectrum_tune_line_color) ini_settings.spectrum_tune_line_color = g_strdup ("red"); ini_settings.spectrum_center_line_color = g_key_file_get_string (file, "spectrum", "center_line_color", NULL); if (!ini_settings.spectrum_center_line_color) ini_settings.spectrum_center_line_color = g_strdup ("#808000"); ini_settings.spectrum_width = g_key_file_get_integer (file, "spectrum", "width", NULL); if (ini_settings.spectrum_width == 0) ini_settings.spectrum_width = 1; else ini_settings.spectrum_width = ini_settings.spectrum_width - 1; ini_settings.spectrum_speed = g_key_file_get_integer (file, "spectrum", "speed", NULL); if (ini_settings.spectrum_speed == 0) ini_settings.spectrum_speed = 100; ini_settings.ptt_device = g_key_file_get_string (file, "devices", "ptt_device", NULL); if (!ini_settings.ptt_device) ini_settings.ptt_device = g_strdup ("/dev/ttyS1"); ini_settings.audio_device = g_key_file_get_string (file, "devices", "audio_device", NULL); if (!ini_settings.audio_device) ini_settings.audio_device = g_strdup ("/dev/dsp"); ini_settings.call = g_key_file_get_string (file, "personal", "call", NULL); if (!ini_settings.call) ini_settings.call = g_strdup ("N0CALL"); ini_settings.name = g_key_file_get_string (file, "personal", "name", NULL); if (!ini_settings.name) ini_settings.name = g_strdup ("Nobody"); ini_settings.qth = g_key_file_get_string (file, "personal", "qth", NULL); if (!ini_settings.qth) ini_settings.qth = g_strdup ("Nowhere"); ini_settings.cw_string = g_key_file_get_string (file, "personal", "cw_string", NULL); if (!ini_settings.cw_string) ini_settings.cw_string = g_strdup ("de N0CALL kn"); ini_settings.freq = g_key_file_get_integer (file, "modem", "freq", NULL); if (ini_settings.freq == 0) ini_settings.freq = 800; ini_settings.dcd_level = g_key_file_get_integer (file, "modem", "dcd_level", NULL); if (ini_settings.dcd_level == 0) ini_settings.dcd_level = 13; else ini_settings.dcd_level = ini_settings.dcd_level - 1; ini_settings.lsb = g_key_file_get_integer (file, "modem", "lsb", NULL); if (ini_settings.lsb == 0) ini_settings.lsb = 0; else ini_settings.lsb = ini_settings.lsb - 1; ini_settings.new_rx = g_key_file_get_integer (file, "options", "new_rx", NULL); if (ini_settings.new_rx == 0) ini_settings.new_rx = 1; else ini_settings.new_rx = ini_settings.new_rx - 1; ini_settings.log_filename = g_key_file_get_string (file, "options", "log_filename", NULL); if (!ini_settings.log_filename) ini_settings.log_filename = g_strdup ("gpsk31.log"); ini_settings.xlog_auto_freq = g_key_file_get_integer (file, "options", "xlog_auto_freq", NULL); if (ini_settings.xlog_auto_freq == 0) ini_settings.xlog_auto_freq = 1; else ini_settings.xlog_auto_freq = ini_settings.xlog_auto_freq - 1; ini_settings.tcp_listen_port = g_key_file_get_integer (file, "options", "tcp_listen_port", NULL); if (ini_settings.tcp_listen_port == 0) ini_settings.tcp_listen_port = 0; else ini_settings.tcp_listen_port = ini_settings.tcp_listen_port - 1; ini_settings.label[0] = g_key_file_get_string (file, "labels", "F1_label", NULL); if (!ini_settings.label[0]) ini_settings.label[0] = g_strdup ("F1 CQ"); ini_settings.label[1] = g_key_file_get_string (file, "labels", "F2_label", NULL); if (!ini_settings.label[1]) ini_settings.label[1] = g_strdup ("F2"); ini_settings.label[2] = g_key_file_get_string (file, "labels", "F3_label", NULL); if (!ini_settings.label[2]) ini_settings.label[2] = g_strdup ("F3"); ini_settings.label[3] = g_key_file_get_string (file, "labels", "F4_label", NULL); if (!ini_settings.label[3]) ini_settings.label[3] = g_strdup ("F4 TX"); ini_settings.label[4] = g_key_file_get_string (file, "labels", "F5_label", NULL); if (!ini_settings.label[4]) ini_settings.label[4] = g_strdup ("F5 RX"); ini_settings.label[5] = g_key_file_get_string (file, "labels", "F6_label", NULL); if (!ini_settings.label[5]) ini_settings.label[5] = g_strdup ("F6"); ini_settings.label[6] = g_key_file_get_string (file, "labels", "F7_label", NULL); if (!ini_settings.label[6]) ini_settings.label[6] = g_strdup ("F7"); ini_settings.label[7] = g_key_file_get_string (file, "labels", "F8_label", NULL); if (!ini_settings.label[7]) ini_settings.label[7] = g_strdup ("F8"); ini_settings.label[8] = g_key_file_get_string (file, "shiftlabels", "shift_F1_label", NULL); if (!ini_settings.label[8]) ini_settings.label[8] = g_strdup ("SHIFT F1"); ini_settings.label[9] = g_key_file_get_string (file, "shiftlabels", "shift_F2_label", NULL); if (!ini_settings.label[9]) ini_settings.label[9] = g_strdup ("SHIFT F2"); ini_settings.label[10] = g_key_file_get_string (file, "shiftlabels", "shift_F3_label", NULL); if (!ini_settings.label[10]) ini_settings.label[10] = g_strdup ("SHIFT F3"); ini_settings.label[11] = g_key_file_get_string (file, "shiftlabels", "shift_F4_label", NULL); if (!ini_settings.label[11]) ini_settings.label[11] = g_strdup ("SHIFT F4"); ini_settings.label[12] = g_key_file_get_string (file, "shiftlabels", "shift_F5_label", NULL); if (!ini_settings.label[12]) ini_settings.label[12] = g_strdup ("SHIFT F5"); ini_settings.label[13] = g_key_file_get_string (file, "shiftlabels", "shift_F6_label", NULL); if (!ini_settings.label[13]) ini_settings.label[13] = g_strdup ("SHIFT F6"); ini_settings.label[14] = g_key_file_get_string (file, "shiftlabels", "shift_F7_label", NULL); if (!ini_settings.label[14]) ini_settings.label[14] = g_strdup ("SHIFT F7"); ini_settings.label[15] = g_key_file_get_string (file, "shiftlabels", "shift_F8_label", NULL); if (!ini_settings.label[15]) ini_settings.label[15] = g_strdup ("SHIFT F8"); ini_settings.text[0] = g_key_file_get_string (file, "text", "F1_text", NULL); if (!ini_settings.text[0]) ini_settings.text[0] = g_strdup ("~tCQ CQ CQ de ~mc ~mc ~mc \nCQ CQ CQ de ~mc ~mc ~mc \nCQ CQ CQ de ~mc ~mc ~mc \n~r"); ini_settings.text[1] = g_key_file_get_string (file, "text", "F2_text", NULL); if (!ini_settings.text[1]) ini_settings.text[1] = g_strdup (""); ini_settings.text[2] = g_key_file_get_string (file, "text", "F3_text", NULL); if (!ini_settings.text[2]) ini_settings.text[2] = g_strdup (""); ini_settings.text[3] = g_key_file_get_string (file, "text", "F4_text", NULL); if (!ini_settings.text[3]) ini_settings.text[3] = g_strdup ("~t"); ini_settings.text[4] = g_key_file_get_string (file, "text", "F5_text", NULL); if (!ini_settings.text[4]) ini_settings.text[4] = g_strdup ("~r"); ini_settings.text[5] = g_key_file_get_string (file, "text", "F6_text", NULL); if (!ini_settings.text[5]) ini_settings.text[5] = g_strdup (""); ini_settings.text[6] = g_key_file_get_string (file, "text", "F7_text", NULL); if (!ini_settings.text[6]) ini_settings.text[6] = g_strdup (""); ini_settings.text[7] = g_key_file_get_string (file, "text", "F8_text", NULL); if (!ini_settings.text[7]) ini_settings.text[7] = g_strdup (""); ini_settings.text[8] = g_key_file_get_string (file, "shifttext", "shift_F1_text", NULL); if (!ini_settings.text[8]) ini_settings.text[8] = g_strdup (""); ini_settings.text[9] = g_key_file_get_string (file, "shifttext", "shift_F2_text", NULL); if (!ini_settings.text[9]) ini_settings.text[9] = g_strdup (""); ini_settings.text[10] = g_key_file_get_string (file, "shifttext", "shift_F3_text", NULL); if (!ini_settings.text[10]) ini_settings.text[10] = g_strdup (""); ini_settings.text[11] = g_key_file_get_string (file, "shifttext", "shift_F4_text", NULL); if (!ini_settings.text[11]) ini_settings.text[11] = g_strdup (""); ini_settings.text[12] = g_key_file_get_string (file, "shifttext", "shift_F5_text", NULL); if (!ini_settings.text[12]) ini_settings.text[12] = g_strdup (""); ini_settings.text[13] = g_key_file_get_string (file, "shifttext", "shift_F6_text", NULL); if (!ini_settings.text[13]) ini_settings.text[13] = g_strdup (""); ini_settings.text[14] = g_key_file_get_string (file, "shifttext", "shift_F7_text", NULL); if (!ini_settings.text[14]) ini_settings.text[14] = g_strdup (""); ini_settings.text[15] = g_key_file_get_string (file, "shifttext", "shift_F8_text", NULL); if (!ini_settings.text[15]) ini_settings.text[15] = g_strdup (""); } /* * Load the configuration file */ void loadpreferences (gchar *path) { config_create (); if (g_file_test(path, G_FILE_TEST_EXISTS)) { GKeyFile *file = g_key_file_new (); g_key_file_load_from_file (file, path, G_KEY_FILE_KEEP_COMMENTS, NULL); config_load_from_keyfile (file); g_key_file_free(file); } } /* * Save configuration file */ void savepreferences (gchar *path) { GKeyFile *file = g_key_file_new(); g_key_file_load_from_file(file, path, G_KEY_FILE_KEEP_COMMENTS, NULL); g_key_file_set_string (file, "tx_window", "color", ini_settings.tx_window_color); g_key_file_set_string (file, "tx_window", "font", ini_settings.tx_window_font); g_key_file_set_string (file, "rx_window", "color_rx", ini_settings.rx_window_color_rx); g_key_file_set_string (file, "rx_window", "color_tx", ini_settings.rx_window_color_tx); g_key_file_set_string (file, "rx_window", "font", ini_settings.rx_window_font); g_key_file_set_string (file, "phase_scope", "dcd_on_color", ini_settings.phase_scope_dcd_on_color); g_key_file_set_string (file, "phase_scope", "dcd_off_color", ini_settings.phase_scope_dcd_off_color); g_key_file_set_string (file, "phase_scope", "arc_color", ini_settings.phase_scope_arc_color); g_key_file_set_string (file, "spectrum", "color", ini_settings.spectrum_color); g_key_file_set_string (file, "spectrum", "tune_line_color", ini_settings.spectrum_tune_line_color); g_key_file_set_string (file, "spectrum", "center_line_color", ini_settings.spectrum_center_line_color); g_key_file_set_integer (file, "spectrum", "width", ini_settings.spectrum_width + 1); g_key_file_set_integer (file, "spectrum", "speed", ini_settings.spectrum_speed); g_key_file_set_string (file, "devices", "ptt_device", ini_settings.ptt_device); g_key_file_set_string (file, "devices", "audio_device", ini_settings.audio_device); g_key_file_set_string (file, "personal", "call", ini_settings.call); g_key_file_set_string (file, "personal", "name", ini_settings.name); g_key_file_set_string (file, "personal", "qth", ini_settings.qth); g_key_file_set_string (file, "personal", "cw_string", ini_settings.cw_string); g_key_file_set_integer (file, "modem", "freq", ini_settings.freq); g_key_file_set_integer (file, "modem", "dcd_level", ini_settings.dcd_level + 1); g_key_file_set_integer (file, "modem", "lsb", ini_settings.lsb + 1); g_key_file_set_integer (file, "options", "new_rx", ini_settings.new_rx + 1); g_key_file_set_string (file, "options", "log_filename", ini_settings.log_filename); g_key_file_set_integer (file, "options", "xlog_auto_freq", ini_settings.xlog_auto_freq + 1); g_key_file_set_integer (file, "options", "tcp_listen_port", ini_settings.tcp_listen_port + 1); g_key_file_set_string (file, "labels", "F1_label", ini_settings.label[0]); g_key_file_set_string (file, "labels", "F2_label", ini_settings.label[1]); g_key_file_set_string (file, "labels", "F3_label", ini_settings.label[2]); g_key_file_set_string (file, "labels", "F4_label", ini_settings.label[3]); g_key_file_set_string (file, "labels", "F5_label", ini_settings.label[4]); g_key_file_set_string (file, "labels", "F6_label", ini_settings.label[5]); g_key_file_set_string (file, "labels", "F7_label", ini_settings.label[6]); g_key_file_set_string (file, "labels", "F8_label", ini_settings.label[7]); g_key_file_set_string (file, "shiftlabels", "shift_F1_label", ini_settings.label[8]); g_key_file_set_string (file, "shiftlabels", "shift_F2_label", ini_settings.label[9]); g_key_file_set_string (file, "shiftlabels", "shift_F3_label", ini_settings.label[10]); g_key_file_set_string (file, "shiftlabels", "shift_F4_label", ini_settings.label[11]); g_key_file_set_string (file, "shiftlabels", "shift_F5_label", ini_settings.label[12]); g_key_file_set_string (file, "shiftlabels", "shift_F6_label", ini_settings.label[13]); g_key_file_set_string (file, "shiftlabels", "shift_F7_label", ini_settings.label[14]); g_key_file_set_string (file, "shiftlabels", "shift_F8_label", ini_settings.label[15]); g_key_file_set_string (file, "text", "F1_text", ini_settings.text[0]); g_key_file_set_string (file, "text", "F2_text", ini_settings.text[1]); g_key_file_set_string (file, "text", "F3_text", ini_settings.text[2]); g_key_file_set_string (file, "text", "F4_text", ini_settings.text[3]); g_key_file_set_string (file, "text", "F5_text", ini_settings.text[4]); g_key_file_set_string (file, "text", "F6_text", ini_settings.text[5]); g_key_file_set_string (file, "text", "F7_text", ini_settings.text[6]); g_key_file_set_string (file, "text", "F8_text", ini_settings.text[7]); g_key_file_set_string (file, "shifttext", "shift_F1_text", ini_settings.text[8]); g_key_file_set_string (file, "shifttext", "shift_F2_text", ini_settings.text[9]); g_key_file_set_string (file, "shifttext", "shift_F3_text", ini_settings.text[10]); g_key_file_set_string (file, "shifttext", "shift_F4_text", ini_settings.text[11]); g_key_file_set_string (file, "shifttext", "shift_F5_text", ini_settings.text[12]); g_key_file_set_string (file, "shifttext", "shift_F6_text", ini_settings.text[14]); g_key_file_set_string (file, "shifttext", "shift_F7_text", ini_settings.text[14]); g_key_file_set_string (file, "shifttext", "shift_F8_text", ini_settings.text[15]); gchar *buffer = g_key_file_to_data(file, NULL, NULL); g_key_file_free(file); GIOChannel *channel = g_io_channel_new_file (path, "w", NULL); g_io_channel_write_chars (channel, buffer, -1, NULL, NULL); g_io_channel_unref (channel); g_free (buffer); } gpsk31-0.5/src/text.h0000644000175000017500000000200011031177040011315 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ void put_rx_window (const gchar *text, gint txstate); void put_tx_window (const gchar *text); gpsk31-0.5/src/backtrace.h0000644000175000017500000000173511031177034012271 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2008 Thomas Ries * Copyright (C) 2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ void show_stackframe(); gpsk31-0.5/src/psk31-coder.h0000644000175000017500000000736711031177037012417 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 1998,1999 Hansi Reiser * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* * PSK31 -- Viterbi and Varicode encoder / decoder * based on PSK31-Code by Andrew Senior, G0TJZ */ #ifndef __PSK31_CODER_INCLUDED #define __PSK31_CODER_INCLUDED #ifndef CMPLX_DEFINED #define CMPLX_DEFINED typedef struct { double x,y; } cmplx; #endif /* codeword-flags */ #define CODE_USE_QPSK 0x010000 /* use qpsk for this codeword flag */ #define CODE_TONE_ON 0x020000 /* tone on flag */ #define CODE_CW_ECHO 0x040000 /* cw char for echo only */ #define CODE_PLAIN 0x080000 /* not yet encoded byte */ /* Send- and Echo-Char flags. Also used in the codeword buffer */ #define TX_MODE 0x200000 #define TXM_BPSK 0x000000 #define TXM_BPSK_L 0x000001 #define TXM_QPSK 0x000002 #define TXM_QPSK_L 0x000003 #define TXM_LSB 0x000001 #define TXM_CW 0x000004 // setting CW or TUNE does not change #define TXM_TUNE 0x000008 // QPSK or LSB setting! #define TX_FREQ 0x400000 /* 3xxxxx xx 0.01Hz */ #define TX_START 0x100001 /* start new transmission */ #define TX_END 0x100002 /* indicate end of transmission */ #define TX_URGENT 0x40000000 /* flag to execute cmds immediately*/ #define TX_DUMMY 0x001FFFFF /* "unused" codeword */ #define NO_CHAR 0x800000 #define TX_BUSY 0x800001 #define TX_ERROR 0x800002 #define EMPTY_SAMPLE 0x100000 /* Viterbi and Varicode encoding and decoding funktions */ class psk31_coder { private: /* Varicode data tables */ static int hallo; static int decotab[2048]; static int encotab[256]; /* Convolutional coder/Viterbi coder data */ static unsigned char symbols[32]; static const unsigned char poly1 = 0x19, poly2 = 0x17; int qpsk, lsb; struct state { float dist; int last_abs_phase; long estimate; }; int lastphase; struct state states[16]; /* QPSK decoder trellis */ float agc,ampl; int vlerror, rxreg; /* Varicode decoder state */ unsigned int encode_qpsk(unsigned int sreg); unsigned int encode_bpsk(unsigned int sreg); int decode_qpsk(cmplx rxsymbol); int decode_bpsk(cmplx rxsymbol); float x_distance(cmplx rxsymb, int lastphase, int delta); int decode_varicode(int bit); static unsigned char parity(unsigned char u); public: void prime_decoder(); static int init_tables(const char *datadir); psk31_coder() { agc=ampl=vlerror=rxreg=0; lastphase=0; qpsk=lsb=0; for(int i=0; i<16; i++) { states[i].dist=states[i].last_abs_phase=0; states[i].estimate=0; } } void setmode(int qpskfl, int lsbfl) { qpsk=qpskfl; lsb=lsbfl; } /* encodes shift register data in phase increment (0..3) */ unsigned int encode(unsigned int sreg, int use_qpsk); int encode_varicode(int symb); int decode(cmplx rxsymbol, int symb); static int IQ2iphase(cmplx IQval); }; #endif gpsk31-0.5/src/phasescope.C0000644000175000017500000001032511031177037012435 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2008 Thomas Ries * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* * Different functions, mostly initializations */ #include #include #include #include #include #include "misc.h" #include "spectrum.h" #include "main_screen.h" #include "globals.h" #include "server.h" #include #include static int x,y; /* The edge of the phase scope line */ GdkGC *gc_dcd_on; // The Phase scope colors GdkGC *gc_dcd_off; GdkGC *gc_black; void phase_scope_init () { GdkColor color; GdkColormap *cmap; cmap = gdk_colormap_get_system (); gdk_color_parse ("black", &color); if (!gdk_colormap_alloc_color (cmap, &color, TRUE, TRUE)) { g_error ("Couldn't allocate color"); } gc_black = gdk_gc_new (main_screen.phase_scope); gdk_gc_set_foreground (gc_black, &color); gdk_gc_set_line_attributes (gc_black, 3, GDK_LINE_SOLID, GDK_CAP_ROUND, GDK_JOIN_ROUND); gdk_color_parse (ini_settings.phase_scope_dcd_on_color, &color); if (!gdk_colormap_alloc_color (cmap, &color, TRUE, TRUE)) { g_error ("Couldn't allocate color"); } gc_dcd_on = gdk_gc_new (main_screen.phase_scope); gdk_gc_set_foreground (gc_dcd_on, &color); gdk_gc_set_line_attributes (gc_dcd_on, 3, GDK_LINE_SOLID, GDK_CAP_ROUND, GDK_JOIN_ROUND); gdk_color_parse (ini_settings.phase_scope_dcd_off_color, &color); if (!gdk_colormap_alloc_color (cmap, &color, TRUE, TRUE)) { g_error ("Couldn't allocate color"); } gc_dcd_off = gdk_gc_new (main_screen.phase_scope); gdk_gc_set_foreground (gc_dcd_off, &color); gdk_gc_set_line_attributes (gc_dcd_off, 3, GDK_LINE_SOLID, GDK_CAP_ROUND, GDK_JOIN_ROUND); } void draw_arc () // Draw the Arc for the Phase Scope { GdkGC *gc; GdkColormap *cmap; GdkColor color; cmap = gdk_colormap_get_system (); gdk_color_parse (ini_settings.phase_scope_arc_color, &color); gdk_colormap_alloc_color (cmap, &color, TRUE, TRUE); gc = gdk_gc_new (main_screen.phase_scope); gdk_gc_set_foreground (gc, &color); gdk_gc_set_line_attributes (gc, 3, GDK_LINE_SOLID, GDK_CAP_ROUND, GDK_JOIN_ROUND); gdk_draw_arc (main_screen.phase_scope, gc, 0, 3, 3, 93, 93, 0, 23040); x = 50; y = 50; } void draw_scope (int phdelta, int strength, int dcd) // Draw a line in the Phase // scope { float fudge = 2.0 * M_PI / 256.0; float theta; theta = phdelta * fudge; gdk_draw_line (main_screen.phase_scope, gc_black, 50, 50, x, y); // erase old line /* This is ugly... I do not like it. Weak signals should also look weak... */ // int phase_magnitude = (strength +64) /2; int phase_magnitude = (int) ((strength + 30) / 1.6); /* This is better? */ if (phase_magnitude > 42) phase_magnitude = 42; else if (phase_magnitude < 0) phase_magnitude = 0; x = (int) (50 + (float) phase_magnitude * cos (theta + M_PI_2)); y = (int) (50 - (float) phase_magnitude * sin (theta + M_PI_2)); if (dcd == 0) gdk_draw_line (main_screen.phase_scope, gc_dcd_off, 50, 50, x, y); else gdk_draw_line (main_screen.phase_scope, gc_dcd_on, 50, 50, x, y); gdk_draw_drawable (main_screen.phase_drawing->window, main_screen.phase_drawing-> style->fg_gc[GTK_WIDGET_STATE (main_screen.phase_drawing)], main_screen.phase_scope, 0, 0, 0, 0, 100, 100); } gpsk31-0.5/src/call_dialog.h0000644000175000017500000000222011031177034012572 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ gboolean call_dialog_key_input (GtkWidget * widget, GdkEventKey * event); void init_call_dialog (); void set_values (); void clear_values (); void toggle_call_dialog (); void log_values (); gpsk31-0.5/src/cfg.h0000644000175000017500000000177311031177035011114 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* * cfg.h */ void loadpreferences (gchar *path); void savepreferences (gchar *path); gpsk31-0.5/src/server.h0000644000175000017500000000667711031177040011667 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ #ifndef _USERIF_H_INCLUDED #define _USERIF_H_INCLUDED /* server-api: * auf senden schalten: * modus angeben PSK(preamble,idle) CW(nix,ruhe), TUNE(nix,carrier) * sofort oder bei DCD off angeben * senden ausschalten: * mit postamble oder ohne... * nach tx buffer ende * txbuffer leeren, ggf. postamble, dann abschalten * sofort abschalten */ #define STEREO 1 #define MONO 0 #define COMM_PTT 0x01 #define COMM_DCD 0x02 #define COMM_DCDLEVEL 0x03 #define COMM_QPSK 0x04 #define COMM_LSB 0x05 #define COMM_AFC 0x06 #define COMM_MODE 0x07 #define COMM_FREQ 0x08 #define COMM_FFTN 0x20 #define COMM_FFTOVERLAP 0x21 #define COMM_SWAP 0x40 #define COMM_TXCH 0xFF #define COMM_ECHOCH 0x00 #define COMM_FFTCH 0x01 #define COMM_RXCH 0x02 #define PTTOFF 0 #define PTTON 1 #define PTTFORCE 0x10 #define MO_NORMAL 0x01 /* PSK31 RX or TX */ #define MO_CWSEND 0x02 /* only TX channel: send CW */ #define MO_TUNE 0x04 /* only TX channel: send tune carrier */ #define MO_DISABLED 0x80 /* disable channel. only supp. for 2nd RX */ // spec: // COMM_PTT ON OFF PTT_FORCE // COMM_DCD ON OFF // COMM_DCDLEVEL 0..100 (?) // COMM_QPSK ON OFF // COMM_LSB ON OFF // COMM_AFC ON OFF // COMM_MODE MO_DISABLED MO_NORMAL (TXonly:) MO_CWSEND MO_TUNE // COMM_FFTN 128..4096 // COMM_FFTOVERLAP 0..FFTN, evtl größer // channel: -1=TX, sonst RX // channel: TXCH, RXCH, FFTCH // value: -1= nix ändern, sonst value; return: aktueller value oder -1 typedef struct { int freq; // IF frequence (RX,TX) int qpsk; // QPSK <-> BPSK (RX,TX) int lsb; // LSB(inverted) (RX,TX) int cw; // 0=normal PSK mode 1=transmit as CW 2=tuning(TX) int dcd; // DCD active (RX) int dcdlevel; // DCD sensitifity (-1=disable DCD, (RX) // 0=only preamble/postamble DCD) int strength; // range: 0..40 int afc; // use AFC (RX) int mode; // ?? int ptt; // PTT on??? (transmitting?) (all CH) int phdelta; // last phase change (RX) float qty[4]; // quality (current,bpsk,qpsk,qpsk-inverted) } PSK31info; int commWaitUpdate(unsigned long timeout); int commGetData(int channel, char *buffer, int buflen); int commPutData(const char *buffer, int buflen); int commControl(int channel, int spec, int value); int commGetInfo(int channel, void *buffer, int buflen); // for the non-socket server... int server_main(char *audio, char *ptt, const char *datadir); #endif gpsk31-0.5/src/psk31-fft.h0000644000175000017500000000332611031177037012071 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ #ifndef PSK31_FFT_H_INCLUDED #define PSK31_FFT_H_INCLUDED #include "stdio.h" #include "hansis_fft.h" class psk31_fft { public: static const int MODE_RXDATA=0; static const int MODE_NARROWIF=1; void set_parameters(int len, int _overlap, int _mode); void get_parameters(int *len, int *over, int *mode); void add_rx_sample(int sample); void add_if_sample(float I, float Q); int has_new_data(); int get_abs_data(float *data, int start, int len, int delta); psk31_fft() { rxdata = NULL; Idata = Qdata = NULL; fft = NULL; window = NULL; N = valid_counter=-1; } private: inline float sqr(float x) { return x * x; } int N; int overlap; int mode; int *rxdata; float *Idata, *Qdata; int cnt; int valid_counter; FFTer *fft; float *window; }; #endif gpsk31-0.5/src/spectrum.C0000644000175000017500000002632711031177040012150 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2008 Thomas Ries * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* * Functions for the spectrum analyzer */ #include #include #include #include #include #include #include #include #include #include #include "main_screen.h" #include "spectrum.h" #include "globals.h" #include "server.h" float luc; /* Position of the red line in the spectrum */ int ffts; /* Number of filters */ float centrefreq; /* Centre freq of the spectrum */ float fc; /* Currently RX freq */ float deltaf; /* Hz per fft sample */ int delta; /* Offset into ffts */ double max; /* Max value in values? */ int maxi; /* Index to max */ int row; /* First row in circular buffer */ int samples; /* Number of samles */ int cnt; float pwr[SPECTRUM_WIDTH+1]; /* Array where we put fft data */ GdkGC *gc_tune_line; /* GC's of the spectrum */ GdkGC *gc_spectrum; GdkGC *gc_center_line; /* GC's of the center spectrum */ /* Waterfall display control... 0: display spectrum, 1: display waterfall */ int display_waterfall; /* Waterfall Display mode: 0 b/w, 1: colored */ int waterfall_colored; /* colors for RX and center line in display */ static guchar rx_color[3]; static guchar center_color[3]; /* Waterfall window pixbuf */ static guchar *gbl_wfall_pixels; static gint gbl_wfall_rowstride, gbl_wfall_n_channels, gbl_wfall_width, gbl_wfall_height; static void color_pixel(float val, guchar rgb[]); /* * setup for spectrum GC's */ void spectrum_setup () { GdkColor color; GdkColormap * cmap; cmap = gdk_colormap_get_system (); gdk_color_parse (ini_settings.spectrum_color, &color); if (!gdk_colormap_alloc_color (cmap, &color, TRUE, TRUE)) { g_error ("Couldn't allocate color"); } gc_spectrum = gdk_gc_new (main_screen.spectrum); gdk_gc_set_foreground (gc_spectrum, &color); gdk_color_parse (ini_settings.spectrum_tune_line_color, &color); if (!gdk_colormap_alloc_color (cmap, &color, TRUE, TRUE)) { g_error ("Couldn't allocate color"); } gc_tune_line = gdk_gc_new (main_screen.spectrum); gdk_gc_set_foreground (gc_tune_line, &color); /* get RGB values and remember for waterfall display */ rx_color[0]=(color.red/256); rx_color[1]=(color.green/256); rx_color[2]=(color.blue/256); /* Center frequency color line */ gdk_color_parse (ini_settings.spectrum_center_line_color, &color); if (!gdk_colormap_alloc_color (cmap, &color, TRUE, TRUE)) { g_error ("Couldn't allocate color"); } gc_center_line = gdk_gc_new (main_screen.spectrum); gdk_gc_set_foreground (gc_center_line, &color); /* get RGB values and remember for waterfall display */ center_color[0]=(color.red/256); center_color[1]=(color.green/256); center_color[2]=(color.blue/256); //fft_setup (SAMPS , SPEED); /* HARD CODED FOR NOW? */ /* start with spectrum display first in colored mode */ display_waterfall=1; waterfall_colored=1; /* Create waterfall pixbuf */ main_screen.gbl_wfall_pixbuf = gdk_pixbuf_new( GDK_COLORSPACE_RGB, FALSE, 8, SPECTRUM_WIDTH, SPECTRUM_HEIGHT ); if (main_screen.gbl_wfall_pixbuf == NULL) { g_error ("Couldn't allocate pixbuf"); } gbl_wfall_pixels = gdk_pixbuf_get_pixels( main_screen.gbl_wfall_pixbuf ); gbl_wfall_width = gdk_pixbuf_get_width ( main_screen.gbl_wfall_pixbuf ); gbl_wfall_height = gdk_pixbuf_get_height( main_screen.gbl_wfall_pixbuf ); gbl_wfall_rowstride = gdk_pixbuf_get_rowstride( main_screen.gbl_wfall_pixbuf); gbl_wfall_n_channels = gdk_pixbuf_get_n_channels( main_screen.gbl_wfall_pixbuf ); /* clear pixbuff */ gdk_pixbuf_fill( main_screen.gbl_wfall_pixbuf, 0x00000000 ); } /* * fft_setup - set fft values for sample sizes */ void fft_setup (int samps, int speed) { /*set center line style*/ gdk_gc_set_line_attributes (gc_center_line, 1, GDK_LINE_SOLID, GDK_CAP_ROUND, GDK_JOIN_ROUND); if (samps > 3000) gdk_gc_set_line_attributes (gc_tune_line, 2, GDK_LINE_SOLID, GDK_CAP_ROUND, GDK_JOIN_ROUND); else gdk_gc_set_line_attributes (gc_tune_line, 1, GDK_LINE_SOLID, GDK_CAP_ROUND, GDK_JOIN_ROUND); static int fftspeed=0; if(samps>0) { samples = samps; } float expo = 8+(100-speed)/99.0*3; // 8..11 fftspeed = (int)pow(2.0, expo); ffts = samples/2; deltaf = (float)8000 / samples; delta = (int)(fc / deltaf - SPECTRUM_WIDTH/2); cnt = 0; commControl(COMM_FFTCH, COMM_FFTN, samples); commControl(COMM_FFTCH, COMM_FFTOVERLAP, fftspeed); } /* * new_fc - set new center frequency */ float spectrum_new_fc (int x) { fc = centrefreq + deltaf * (x - SPECTRUM_WIDTH/2); return (fc); } void spectrum_updateFFT(float *val, int len) { if(len!=samples) { g_warning ("FFT length mismatch"); } spectrum_calc_power(val); spectrum_draw_display(); } /* * calc power - pwr array * just calculate power for the 200 we need. */ void spectrum_calc_power (float *buffer) { int i, j; for(i=delta,j=0; isamples/2) { pwr[j]=0; } else { pwr[j] = buffer[i]; } } } /* * draw_display method - draws display as spectrum or waterfall */ void spectrum_draw_display () { PSK31info rxinfo; int x; float my_value; gdk_draw_rectangle (main_screen.spectrum, main_screen.spectrum_drawing->style->black_gc, TRUE, 0, 0, main_screen.spectrum_drawing->allocation.width, main_screen.spectrum_drawing->allocation.height); if (display_waterfall == 0) { /* draw the spectrum */ for (x = 0; x < SPECTRUM_WIDTH ; x = x + 1) { my_value = (42.0 * (log10 (pwr[x] + 1))); gdk_draw_line (main_screen.spectrum, gc_spectrum, x, SPECTRUM_HEIGHT, x, SPECTRUM_HEIGHT - (int) my_value); } commGetInfo (COMM_RXCH, &rxinfo, sizeof(rxinfo)); /* draw center line - before the RX line*/ gdk_draw_line (main_screen.spectrum, gc_center_line, SPECTRUM_WIDTH/2, SPECTRUM_HEIGHT, SPECTRUM_WIDTH/2, 0); /*draw RX frequency line */ luc = 100 + ((rxinfo.freq/100) - centrefreq) / deltaf + 0.5; gdk_draw_line (main_screen.spectrum, gc_tune_line, (int) luc, SPECTRUM_HEIGHT, (int) luc, 0); gdk_draw_drawable (main_screen.spectrum_drawing->window, main_screen.spectrum_drawing-> style->fg_gc[GTK_WIDGET_STATE (main_screen.spectrum_drawing)], main_screen.spectrum, 0, 0, 0, 0, SPECTRUM_WIDTH, SPECTRUM_HEIGHT); } else { /* draw waterfall */ int idh, idv; /* loop variable for moving PixMap content */ /* Positions to draw red line in waterfall */ int red_line; int center_line; /* Pointer to current pixel */ static guchar *pix; /* calculate current tuning position */ commGetInfo (COMM_RXCH, &rxinfo, sizeof(rxinfo)); red_line = (int) (SPECTRUM_WIDTH/2 + ((rxinfo.freq/(SPECTRUM_WIDTH/2)) - centrefreq) / deltaf + 0.5); center_line = SPECTRUM_WIDTH/2; /* Copy each line of waterfall to next one */ for( idv = (gbl_wfall_height-1); idv > 0; idv-- ) { pix = gbl_wfall_pixels + gbl_wfall_rowstride * idv; for( idh = 0; idh < SPECTRUM_WIDTH; idh++ ) { *pix = *( pix - gbl_wfall_rowstride ); pix++; *pix = *( pix - gbl_wfall_rowstride ); pix++; *pix = *( pix - gbl_wfall_rowstride ); pix += gbl_wfall_n_channels - 2; } } /* Go to top left of pixbuf */ pix = gbl_wfall_pixels; for (x = 0; x < SPECTRUM_WIDTH ; x = x + 1) { my_value = 50.0 * (log10 (pwr[x] + 1)); /* ~ 0..100 */ /*&&& I may want to do some range scaling. Remember min/max value of each incoming row and then calculate the min/max value of the whole waterfall picture and scale the new to-be-drawn pixel value relative in this range. */ /* "false" coloring of pixels or b/w? */ if (waterfall_colored) { color_pixel(my_value, pix); } else { pix[0]=pix[1]=pix[2]=(int)(my_value*2.55); } pix += gbl_wfall_n_channels; } /* Draw a vertical orange line in waterfall at middle freq. */ pix = gbl_wfall_pixels; pix += gbl_wfall_n_channels * center_line; pix[0] = center_color[0]; pix[1] = center_color[1]; pix[2] = center_color[2]; /* Draw a vertical red line in waterfall at detector's freq. */ pix = gbl_wfall_pixels; pix += gbl_wfall_n_channels * red_line; pix[0] = rx_color[0]; pix[1] = rx_color[1]; pix[2] = rx_color[2]; /* Draw waterfall */ gdk_draw_pixbuf(main_screen.spectrum_drawing->window, NULL, main_screen.gbl_wfall_pixbuf, 0,0,0,0,SPECTRUM_WIDTH, SPECTRUM_HEIGHT, GDK_RGB_DITHER_NONE, 0, 0 ); } } /* * offset method - sets delta to starting index value of values array */ void spectrum_offset (float freq) { fc = freq; centrefreq = freq; delta = (int) (fc / deltaf - 100); } /* * Returns the number of samles */ int getsamplecnt() { return samples; } /* * creates "false coloring" from b/w value 0..100 * return value is int[3] of R/G/B values */ static void color_pixel(float val, guchar rgb[]) { guchar r,g,b; float L1=20; /* black to blue */ float L2=40; /* blue to green */ float L3=60; /* green to cyan */ float L4=80; /* cyan to yellow */ float L5=95; /* yellow to white*/ /* HB9XAR: This is just a quick hack to get something colored. A better/nicer solution is welcome ;-) */ /* for testing: this will goive a plain greyscale image */ if (0) { int t; t=(int)(val*(255/70)); r=g=b=(t>255)?255:t; r=0; rgb[0]=r; rgb[1]=g; rgb[2]=b; return; } val = val - 2.0; if (val <0) val=0; if (val < L1) { /* black to blue */ r=0; g=0; b=(int)((val/(L1))*200); } else if (val < L2) { /* blue to green */ r=0; g=50+(int)(((val-L1)/(L2-L1))*205); b=200-(int)((val/(L2))*200); } else if (val < L3) { /* green to cyan */ r=0; g=255; b=50+(int)(((val-L2)/(L3-L2))*205); } else if (val < L4) { /* cyan to yellow */ r=50+(int)(((val-L3)/(L4-L3))*205); g=255; b=255-(int)(((val-L3)/(L4-L3))*255); } else if (val < L5) { /* yellow to white */ r=255; g=255; b=50+(int)(((val-L4)/(L5-L4))*205); } else { r=255; g=255; b=255; } rgb[0]=r; rgb[1]=g; rgb[2]=b; return; } gpsk31-0.5/src/server-main.C0000644000175000017500000006773611031177040012547 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2008 Thomas Ries * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* HF amateur radio communicator * * digital HF modes (PSK31, RTTY, MT63, ...) * primary server module */ /* servermain: * * opens and initializes sound card * * initializer encoder and decoder classes (modes/psk31*.C) * * starts new thread for encoding and decoding * * offers interface functions for the user interface * * mutex operations for accesing en-/decoder classes from en/decoding * thread and from user interface thread (==interface functions) */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "psk31-receiver.h" #include "psk31-transmitter.h" #include "psk31-fft.h" #include "psk31-coder.h" #include "server.h" #include "backtrace.h" #ifdef USE_PTHREAD #include #else #define pthread_mutex_init(x,y) #define pthread_mutex_lock(x) #define pthread_mutex_unlock(x) #endif extern bool gpsk31debug; //#define USEREALTIME #define TX 1 #define RX 0 // receive / transmit state information int full_duplex; int chans; int size; int bits; static const char *audio_path="/dev/dsp"; static char *ptt_path=NULL; static int audiofd=-1, pttfd=-1; static int ptt_invert=0; static int ctl_ptt(int onoff); int scconfig[2]; /* [0]=8bit/16bit [1]=mono/stereo */ int lastMode; // schedule_transmit: 0=no 1=when dcd goes off, 2=immediately static int schedule_transmit=0; static int trDir = RX; static int dcdlevel=0; /* information: mutex usage: * mutex_rx is used for accessing the psk31_receiver objects as well as * the psk31_fft object. this lock is set by the GUI if when * changing configuration parameters. * mutex_tx is similar for the psk31_transmitter object. * the buffer mutexes are used for the RX buffers, when copying * data to the GUI and when transfering data from the * psk31 objects in the master loop */ /* secondary RX decoders: [limit: N_BUFFERS-3] * a secondary can be started by commControl on an unused channel (3..254) * with command COMM_MODE and value set to MO_NORMAL * it can be disabled by COMM_MODE with value MO_DISABLED * if the channel is disable, no other command than COMM_MODE(MO_NORMAL) is * accepted. */ static psk31_transmitter *psk31tx; static psk31_fft *psk31fft; #ifdef USE_PTHREAD static pthread_t master_thr; static pthread_mutex_t mutex_rx = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t mutex_tx = PTHREAD_MUTEX_INITIALIZER; #ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP static pthread_mutex_t mutex_fd = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP; #else static pthread_mutex_t mutex_fd = PTHREAD_MUTEX_INITIALIZER; #endif #endif /* static pthread_mutex_t mutex_fft= PTHREAD_MUTEX_INITIALIZER; */ /* FFT uses RX mutex! Thus psk31rx also can access the fft */ typedef struct { int len; int rpos; int wpos; char *mem; psk31_receiver *psk31rx; #ifdef USE_PTHREAD pthread_mutex_t mutex; #endif } buffer_t; // Buffer==Channel: 0=TXdata-Echo 1=FFT-data 2,...=RX-data #define N_BUFFERS 6 static buffer_t buffers[N_BUFFERS]; static void init_buffer() { int i; for (i=0; ib->len) return -1; // too much data! pthread_mutex_lock( &b->mutex); if (cnt>((b->wpos-b->rpos)%b->len)) error=-1; else error=0; if (b->wpos+cnt > b->len) n=b->len-b->wpos; else n=cnt; bcopy (data, b->mem+b->wpos, n); b->wpos += n; cnt-=n; if(cnt>0) { bcopy( data+n, b->mem, cnt); b->wpos = cnt; } pthread_mutex_unlock( &b->mutex); return error; } static int read_buffer(int bufnr, char *data, int cnt) { int n, buflen; buffer_t *b = buffers+bufnr; pthread_mutex_lock( &b->mutex ); buflen = (b->wpos-b->rpos)%b->len; if (buflen<0) buflen+=b->len; if (cnt>buflen) cnt=buflen; if (b->rpos+cnt > b->len) n=b->len-b->rpos; else n=cnt; bcopy (b->mem+b->rpos, data, n); b->rpos += n; cnt-=n; if (cnt>0) { bcopy (b->mem, data+n, cnt); b->rpos = cnt; } pthread_mutex_unlock ( &b->mutex); return n; } /* * Initialize the soundcard bits per sample and mono or stereo * via the soundcard parameter */ int init_audio () { int val; int speed = 8000; int frags; pthread_mutex_lock(&mutex_fd); //get the mutex for soundcard fd if (audiofd > 2) { close (audiofd); usleep (50000); //strange audiofd = -1; } /* Open the soundcard */ if (audiofd < 0) { if (trDir == RX) { audiofd = open(audio_path, O_RDONLY|O_NONBLOCK); } else { audiofd = open(audio_path, O_WRONLY|O_NONBLOCK); } } if (audiofd < 0) { fprintf (stderr, "init_audio: can't open %s\n", audio_path); return -1; } /* check parameter to see if 8 or 16 bits was requested */ /* return 1 or 2 if set 8 or 16 bits format failed */ switch (scconfig[0]) { case 0: /* 8 bits requested */ val=AFMT_U8; if (ioctl(audiofd, SNDCTL_DSP_SETFMT, &val) <0) { /* ioctl failed */ fprintf (stderr, "init_audio: ioctl SETFMT 8 failed\n"); return -1; } /* see if 8 bit worked */ if (val == AFMT_U8) { /* we can use 8 bit */ size = 1; bits = 8; // fprintf (stderr, "init_audio: trying 8 bit "); } else /* 8 bit failed */ { fprintf (stderr, "init_audio: failed to set to 8 bits\n"); return 1; } break; case 1: /* 16 bits requested */ val=AFMT_S16_NE; if (ioctl(audiofd, SNDCTL_DSP_SETFMT, &val) <0) { /* ioctl failed */ fprintf (stderr, "init_audio: ioctl SETFMT 16 failed\n"); return -1; } /* see if 16 bit worked */ if (val == AFMT_S16_NE) { /* we can use 16 bit */ size = 2; bits = 16; // fprintf (stderr, "init_audio: trying 16 bit "); } else /* set 16 bit failed */ { fprintf (stderr, "init_audio: failed to set to 16 bits\n"); return 2; } break; default: /* Invalid request */ fprintf (stderr, "\ninit_audio: invalid 8 or 16 bit request\n"); return -1; } /* check parameter to see if MONO or STEREO was requested */ /* return 3 or 4 if set mono or stereo format failed */ switch (scconfig[1]) { case 0: /* mono requested */ val=MONO; if( ioctl(audiofd, SNDCTL_DSP_STEREO, &val)<0 ) { /* ioctl failed */ fprintf (stderr,"\ninit_audio: ioctl failed - MONO\n"); return -1; } /* see if mono worked */ if (val == MONO) { /* we can use mono */ fprintf (stderr, "mono format\n"); chans = MONO; } else { /* set mono failed */ fprintf (stderr, "\ninit_audio: request for mono failed\n"); return 3; } break; case 1: /* stereo request */ val = STEREO; if( ioctl(audiofd, SNDCTL_DSP_STEREO, &val)<0 ) { fprintf (stderr, "\ninit_audio: ioctl failed - STEREO\n"); return -1; } /* see if stereo worked */ if (val == STEREO) { /* we can use stereo */ if (gpsk31debug) printf ("stereo format\n"); size = size * 2; chans = STEREO; } else { /* set stereo failed */ fprintf (stderr, "\ninit_audio: request for stereo failed\n"); return 4; } break; default: fprintf (stderr, "\ninit_audio: invalid mono or stereo request\n"); return -1; } /* setup the rest */ val = speed; if (ioctl(audiofd, SNDCTL_DSP_SPEED, &val) < 0) { fprintf (stderr, "init_audio: ioctl SPEED failed\n"); return -1; } if (val == speed) { if (gpsk31debug) printf ("init_audio: using %d sample rate\n", val); } else { fprintf(stderr,"inexact sampling rate: " "request for %d resulted in %d\n",speed,val); } if (bits == 8) frags = 0x00020008; else frags = 0x0002000A; if (chans == STEREO) frags++; val = frags; ioctl(audiofd, SNDCTL_DSP_SETFRAGMENT, &val); /*****************************************************/ #if 0 audio_buf_info inInfo, outInfo; if (ioctl(audiofd, SNDCTL_DSP_GETISPACE, &inInfo)) perror ("init_audio: SNDCTL_DSP_GETOSPACE"); if (ioctl(audiofd, SNDCTL_DSP_GETOSPACE, &outInfo)) perror ("init_audio: SNDCTL_DSP_GETOSPACE"); printf ("In fragments=0x%08x fragstotal=0x%08x fragsize=0x%08x\n", inInfo.fragments, inInfo.fragstotal, inInfo.fragsize); printf ("Out fragments=0x%08x fragstotal=0x%08x fragsize=0x%08x\n", outInfo.fragments, outInfo.fragstotal, outInfo.fragsize); #endif /*****************************************************/ // Check if the device is operating in full duplex mode if( ioctl(audiofd, SNDCTL_DSP_GETCAPS, &val)<0 ) perror("Warning: GETCAPS on audio device failed"); else if(val&DSP_CAP_DUPLEX) full_duplex=1; if (gpsk31debug) printf("init_audio: using %s duplex mode\n", full_duplex ? "full" : "half"); /*****************************************************/ #if 0 val = 0; if (ioctl(audiofd, SNDCTL_DSP_SETTRIGGER, &val) == -1) perror("ioctl: SNDCTL_DSP_SETTRIGGER"); val = PCM_ENABLE_INPUT; if (ioctl(audiofd, SNDCTL_DSP_SETTRIGGER, &val) == -1) perror("ioctl: SNDCTL_DSP_SETTRIGGER"); #endif /*****************************************************/ // fprintf (stderr, "init_audio: size=%d\n", size); pthread_mutex_unlock(&mutex_fd); return 0; } /* * init_ptt - initialize the ptt device */ static int init_ptt(void) { pttfd = open (ptt_path, O_RDWR); if (pttfd>0) { if (ctl_ptt(0)<0) return -1; } return pttfd; } static int ctl_ptt(int onoff) { if (pttfd<0) return 0; // PTT control disabled, nothing to do... if (ptt_invert) onoff=!onoff; int arg = TIOCM_RTS|TIOCM_DTR; if (ioctl(pttfd, onoff?TIOCMBIS:TIOCMBIC, &arg)<0) return -1; return 0; } #ifdef USE_PTHREAD void master_handler(void); static void *master_thr_func(void *dummy) { while(1) { while (1) master_handler(); } } #endif void master_handler(void) { int res; fd_set rset, wset, eset; struct timeval tm; int dcd; static short odd; buffers[COMM_RXCH].psk31rx->get_info(NULL,NULL,NULL,NULL, NULL,&dcd,NULL,NULL); if ((schedule_transmit==1&&dcd==0) || schedule_transmit==2) { ctl_ptt(1); psk31tx->send_char(TX_START); trDir = TX; schedule_transmit=0; } if (trDir != lastMode) { res = init_audio (); if (res == -1) { perror("init_audio"); exit (1); } lastMode = trDir; } FD_ZERO(&rset); FD_ZERO(&wset); FD_ZERO(&eset); FD_SET(audiofd, &rset); FD_SET(audiofd, &eset); if (trDir == TX) FD_SET(audiofd, &wset); tm.tv_sec=0; tm.tv_usec=50000; /* 50ms */ res=select(audiofd+1, &rset, &wset, &eset, &tm); /* In my older version I had the problem, that there exist * sound drivers which do not support select correctly. So this * code tries to read/write from/to the audiodevice without * respecting FD_ISSET. This should work with all drivers */ if (trDir == RX) { short sample[2], save; for (;;) { pthread_mutex_lock (&mutex_fd); // grab the mutex for the fd odd++; res = read(audiofd, &sample, size); if (res == 0) { break; } else if (res != size) { // fprintf(stderr,"%d %d\n",res,errno); if (errno == EINTR) { break; } if (errno == EAGAIN || errno == EBUSY) { break; } perror ("Audio read failed"); exit (1); } pthread_mutex_unlock (&mutex_fd); // release mutex for fd /******* for S16_NE stereo *******/ if (chans == STEREO && bits == 16) { /* two signed 16 bits to one signed short */ sample[0] = sample[0] | sample[1]; } /******* for S16_NE mono *******/ if (chans == MONO && bits == 16) { /* nothing to do for this one */ } /******* for U8 stereo *******/ if (chans==STEREO && bits == 8) { /* two unsigned 8 bit to a signed short */ save = (((sample[0]>>8)&0xFF) - 128) * 128; //low sample[0] = ((sample[0]&0xFF) - 128) * 128; //high sample[0] = sample[0] | save; //mixed } /******* for U8 mono *******/ if (chans == MONO && bits == 8) { /* unsigned 8 bit to signed short */ sample[0] = ((sample[0]&0xFF) - 128) * 128; } /*****************************/ for(int r=COMM_RXCH; rprocess_rx_sample (sample[0]); pthread_mutex_unlock(&mutex_rx); if(res!=NO_CHAR) { rx->get_info(NULL,NULL,NULL,NULL, NULL,&dcd,NULL,NULL); if (dcd||(dcdlevel==-1)) { char cd = (char)res; write_buffer(r, &cd, 1); } } } } pthread_mutex_unlock(&mutex_fd); // release mutex for fd if we break // out at the for loop } if (trDir == TX) { char cd; for(;;) { if(full_duplex) { // clear buffer if necessary char buffer[128]; for(;;) { res=read(audiofd, buffer, 128); if(res!=128) break; } } pthread_mutex_lock (&mutex_fd); pthread_mutex_lock(&mutex_tx); res=psk31tx->processor(); pthread_mutex_unlock(&mutex_tx); pthread_mutex_unlock (&mutex_fd); // echo-characters, including TX_END, // are delivered from psk31tx->processor at the // exact end of the transmission! if(res==TX_BUSY) { break; } if(res==TX_ERROR) { perror("tx error:"); break; } if(res==TX_END) { trDir = RX; ctl_ptt(0); break; } cd = (char)(res&0xFF); write_buffer(0, &cd, 1); } } } #ifdef USE_PTHREAD static int run_master_thread() { pthread_attr_t attr; #ifdef USEREALTIME struct sched_param schp; #endif if (pthread_attr_init(&attr)) { perror("Cannot initialize pthread attributes"); exit(4); } #ifdef USEREALTIME memset (&schp, 0, sizeof(schp)); if (pthread_attr_setschedpolicy(&attr, SCHED_RR)) { perror("Cannot set realtime scheduling attribute"); exit(5); } schp.sched_priority = sched_get_priority_min(SCHED_RR)+1; if (pthread_attr_setschedparam(&attr, &schp)) { perror("Cannot set realtime scheduling priority"); exit(6); } #endif if (pthread_create(&master_thr, &attr, master_thr_func, NULL)) { perror("Cannot create IO processing thread"); exit(7); } if (pthread_attr_destroy(&attr)) { perror("Failed to destroy attribute"); } return 0; } #endif /* audio, ptt: full path to device * data: directory of coder data file (psk31.cod) * ptt may be something like "/dev/ttyS0,i" for inverted PTT */ int server_main(char *audio, char *ptt, const char *datadir) { init_buffer(); int rtn = 0; if(audio) { audio_path = strdup(audio); } if(ptt) { ptt_path = strdup(ptt); } if(ptt_path != NULL) { int len = strlen(ptt_path); if(len>2 && ptt_path[len-2]==',') { ptt_invert = (ptt_path[len-1]!='0'); ptt_path[len-2]=0; } else { ptt_invert=0; } } rtn = init_audio(); switch (rtn) { case -1: fprintf (stderr, "Cannot initialize audio device: %s %d\n", audio_path, rtn); return -1; case 0: if (gpsk31debug) printf ("using %s bit %s format\n\n", scconfig[0] == 0 ? "8" : "16", scconfig[1] == 0 ? "mono" : "stereo"); break; case 1: case 2: case 3: case 4: fprintf (stderr, "%s %s format failed\n", scconfig[0] == 0 ? "8" : "16", scconfig[1] == 0 ? "mono" : "stereo"); } if (ptt_path && ((pttfd=init_ptt())<0)) { fprintf(stderr, "Cannot open PTT device "); perror (ptt_path); } psk31_coder::init_tables(datadir); psk31fft = new psk31_fft(); psk31fft->set_parameters(1024, 1024, psk31_fft::MODE_RXDATA); buffers[COMM_RXCH].psk31rx = new psk31_receiver(psk31fft); psk31tx = new psk31_transmitter(); psk31tx->set_audiofd(audiofd); #ifdef USE_PTHREAD if (run_master_thread()<0) return -1; #endif return rtn; } int commWaitUpdate (unsigned long timeout) { return -1; } int commGetData (int channel, char *buffer, int buflen) { if (channel<0||channel>=N_BUFFERS) return -1; if (channel==COMM_FFTCH) { if (psk31fft->has_new_data()) { int len; psk31fft->get_parameters(&len, NULL, NULL); if(buflen<(int)(len*sizeof(float))) { fprintf(stderr,"no space in buffer for FFT data\n"); return 0; } psk31fft->get_abs_data((float *)buffer, 0, len, 1); #if 0 for(int i=0; i<1024; i++) fprintf(stderr,"%d ",((float *)buffer)[i]); #endif return len; } else return 0; } else { return read_buffer(channel, buffer, buflen); } } int commPutData (const char *buffer, int buflen) { if (buflen<=0) buflen=strlen(buffer); pthread_mutex_lock(&mutex_tx); for (int i=0; isend_char((unsigned char)(buffer[i])); } pthread_mutex_unlock(&mutex_tx); return buflen; } static int txControl (int spec, int value) { int retval=0; static int mq=0, ml=0, mcw=0; pthread_mutex_lock(&mutex_tx); switch(spec) { case COMM_PTT: switch(value) { case PTTON: // schedule TX start on DCD off schedule_transmit=1; break; case PTTON|PTTFORCE: // schedule TX start now schedule_transmit=2; break; case PTTOFF: // schedule TX end! psk31tx->send_char(TX_END); break; case PTTOFF|PTTFORCE: // shall we just clear the internal buffer and send // a postamble before aborting? should be the right // thing to do! TX_END|TX_URGENT does this job! // However, this does not allow "instant" abort // for emergency cases when something really goes // wrong... (TODO: clarify this matter...) psk31tx->send_char(TX_END|TX_URGENT); #if 0 trDir = RX; ctl_ptt(0); #endif break; } break; case COMM_QPSK: mq=value; psk31tx->send_char(TX_MODE|(value?TXM_QPSK:0)|(ml?TXM_LSB:0)); break; case COMM_LSB: ml=value; psk31tx->send_char(TX_MODE|(mq?TXM_QPSK:0)|(value?TXM_LSB:0)); break; case COMM_MODE: //fprintf(stderr,"mode: value=%d\n",value); if(value==MO_TUNE) { psk31tx->send_char(TX_MODE|TXM_TUNE); mcw = 2; } else if(value==MO_CWSEND) { psk31tx->send_char(TX_MODE|TXM_CW); mcw = 1; } else { psk31tx->send_char( TX_MODE | (mq?TXM_QPSK:0) | (ml?TXM_LSB:0) ); mcw = 0; } break; case COMM_FREQ: /* ignore frequency setting if transmitting. I (hb9xar) have seen *very* sporadic frequency jumps (1kHz -> ~2.5kHz) while transmitting. Trying to catch such a thing here (live insurance) */ if (trDir != TX) { psk31tx->send_char( TX_FREQ|(0xFFFFF&value) ); } else { /* Bzzz. Try to get as much data as possible so we can figure out where that crappy thing comes from. */ show_stackframe(); } break; default: retval=-1; } pthread_mutex_unlock(&mutex_tx); return retval; } static int rxControl (int channel, int spec, int value) { int retval=0; int mqpsk, mlsb, mafc, musedcd, mdcd; float mfreq; int lastdelta, strength; psk31_receiver *rx = buffers[channel].psk31rx; if (rx==NULL) { if (spec==COMM_MODE && value==MO_NORMAL) { // start new decoder object #if 0 fprintf(stderr,"info: starting new decoder object" "on channel %d\n",channel); #endif buffers[channel].psk31rx = new psk31_receiver(NULL); return 0; } fprintf(stderr,"warning: rxControl on disabled RX channel\n" "channel=%d spec=%d value=%d\n",channel,spec,value); return -1; } pthread_mutex_lock(&mutex_rx); rx->get_info(&mqpsk, &mlsb, &mfreq, &musedcd, &mafc, &mdcd, &lastdelta, &strength); switch (spec) { case COMM_SWAP: /* exchange psk31_receiver objects of current channel and * channel * TODO- keep IQ FFT data reference on COMM_RXCH!! * (currently not used, so not a big issue) */ if (value=N_BUFFERS) { retval=-1; break; } { psk31_receiver *rx2 = buffers[value].psk31rx; buffers[channel].psk31rx = rx2; buffers[value].psk31rx = rx; if (value==COMM_RXCH) { rx->set_fft(psk31fft); rx2->set_fft(NULL); } else if (channel==COMM_RXCH) { rx2->set_fft(psk31fft); rx->set_fft(NULL); } break; } case COMM_DCD: rx->set_dcd(value); break; case COMM_DCDLEVEL: dcdlevel = value; rx->set_dcdlevel(value); break; case COMM_QPSK: rx->set_mode(value, mlsb); break; case COMM_LSB: rx->set_mode(mqpsk, value); break; case COMM_AFC: rx->set_afc(value); break; case COMM_MODE: if (value==MO_DISABLED) { if (channel==COMM_RXCH) { // do not delete master RX channel. won't work // as base FFT depends on this master channel retval=-1; break; } #if 0 fprintf(stderr,"info: deleting decoder object" "on channel %d\n",channel); #endif delete rx; buffers[channel].psk31rx=NULL; buffers[channel].rpos = buffers[channel].wpos = 0; } else { fprintf(stderr,"warning: active channel %d: " "COMM_MODE %d\n",channel,value); } break; case COMM_FREQ: rx->set_freq(0.01*value); break; default: retval=-1; } pthread_mutex_unlock(&mutex_rx); return retval; } int fftControl (int spec, int value) { int len, overlap, mode; int retval=0; pthread_mutex_lock(&mutex_rx); psk31fft->get_parameters(&len, &overlap, &mode); switch(spec) { case COMM_FFTN: len = value; psk31fft->set_parameters(len, overlap, mode); break; case COMM_FFTOVERLAP: overlap = value; psk31fft->set_parameters(len, overlap, mode); break; default: retval=-1; } pthread_mutex_unlock(&mutex_rx); return retval; } int commControl(int channel, int spec, int value) { if(channel==255) { // transmit channel return txControl(spec, value); } else if (channel==0) { // echo channel return 0; // no control here! } else if (channel==1) { // fft channel return fftControl(spec, value); } else if (channel>=COMM_RXCH&&channelptt = trDir; /* if transit to TX pending, return TX active ("~t xxx ~r") */ if (schedule_transmit > 0) { info->ptt = TX; } pthread_mutex_lock(&mutex_tx); psk31tx->get_info(&info->qpsk, &info->lsb, &info->cw, &freq); info->freq = (int)(100*freq); pthread_mutex_unlock(&mutex_tx); } else if(channel==COMM_ECHOCH) { // echo channel return -1; // no info on echo channel } else if (channel==COMM_FFTCH) { // fft channel return -1; // no info in fft channel (TODO) } else if (channel>=COMM_RXCH&&channelptt = trDir; /* if transit to TX pending, return TX active ("~t xxx ~r") */ if (schedule_transmit > 0) { info->ptt = TX; } pthread_mutex_lock(&mutex_rx); psk31_receiver *rx = buffers[channel].psk31rx; if (rx==NULL) { // TODO: different return value for invalid channel // vs disabled channel retval=-1; } else { rx->get_info(&info->qpsk, &info->lsb, &freq, &info->dcdlevel, &info->afc, &info->dcd, &info->phdelta, &info->strength ); info->freq = (int)(100*freq); } pthread_mutex_unlock(&mutex_rx); return retval; } else { return -1; // invalid channel } return 0; // or what should we return here? } gpsk31-0.5/src/menu.h0000644000175000017500000000234311031177035011313 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ void init_menu (); void about_dialog(); void help_dialog(); void changelog_dialog(); void exit_dialog(); void config_dialog(); void warning_dialog (const gchar *str, gboolean exit_program); void check_menu(const char *path, int state); const char *trx_get_mode_name(void); gpsk31-0.5/src/hansis_fft.h0000644000175000017500000000612611031177035012476 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ #ifndef __HANSIS_FFT_H #define __HANSIS_FFT_H #ifndef CMPLX_DEFINED #define CMPLX_DEFINED typedef struct { double x,y; } cmplx; #endif class FFTer { public: FFTer( int l, int mod=0 ); ~FFTer(); #if 0 Vector operator*( const Vector& fd ); Vector operator*( const Vector& fd ); Vector operator*( const Vector& fd ); friend Vector operator*( const Vector& fd, const FFTer& fft ); friend Vector operator*( const Vector& fd, const FFTer& fft ); friend Vector operator*( const Vector& fd, const FFTer& fft ); friend Vector operator/( const Vector& fd, const FFTer& fft ); #endif protected: int len, M; int mode; double *real_a, *imag_a; public: // Dumm-DFT: Hilfsfunktionen und -tabellen cmplx *Dm; #if 0 Vector dft( const Vector, int invers ) const; Vector dft( const Vector, int invers ) const; Vector dft( const Vector, int invers ) const; void dft_init(); void dft_remove(); #endif // Split-Radix FFT mit Hilfstabellen (Base 2) und -funktionen void fftsr_init(); void fftsr_remove(); void fftsr_bitrevers(double *x, double *y) const; double *CT1, *CT3, *ST1, *ST3; int *itab; // a) normale Transformation (komplex) cmplx* fftsr( const cmplx* ) const; void fftsr_helper( int, int, int, double *, double *, double *, double *, double *, double *, double *, double *) const; void fftsr_main( double *, double *) const; // b) inverse Split-Radix (auch komplex) cmplx* ifftsr( const cmplx* ) const; void ifftsr_main( double *, double *) const; void ifftsr_helper( int, int, double *, double *, double *, double *, double *, double *, double *, double *) const; // c) reele Transformation (Input=Vector) cmplx* rfftsr( const double* ) const; cmplx* rfftsr( const short* ) const; cmplx* rfftsr_wrapper( double *) const; void rfftsr_bitrevers(double *x) const; void rfftsr_main( double *) const; void rfftsr_helper( int, int, double *, double *, double *, double *) const; }; #endif gpsk31-0.5/src/socketif.h0000644000175000017500000000216411031177040012153 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2002,2003,,2004,2005 Thomas Ries * Copyright (C) 2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ void tcp_set_listen_port(int port); void tcp_listen(void); void tcp_connect(void); int tcp_read(char *buf, int buflen); int tcp_send(char *buf, int buflen); gpsk31-0.5/src/globals.h0000644000175000017500000000655511031177035012003 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2008 Thomas Ries * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* * globals.h - Definitions of global Variables */ struct qsodata /* The Data of the current QSO */ { gchar call[13]; gchar name[26]; gchar qth[26]; gchar rst_s[9]; gchar rst_r[9]; gchar notes[41]; gchar freq[11]; }; extern struct qsodata qsodata; struct qso_dialog /* The Text entry widgets for the call entry dialog */ { GtkWidget *call_text; GtkWidget *name_text; GtkWidget *qth_text; GtkWidget *notes_text; GtkWidget *rst_s_text; GtkWidget *rst_r_text; GtkWidget *freq_text; GtkWidget *window; }; extern struct qso_dialog qso_dialog; struct statusbar /* The Statusbar Widgets */ { GtkWidget *logged; GtkWidget *mode; GtkWidget *txstate; GtkWidget *time; }; extern struct statusbar statusbar; struct highlight { gchar *tx; gchar *rxrx; gchar *rxtx; }; extern struct highlight highlight; struct main_screen { GdkPixmap *phase_scope; /* For drawing the phase scope */ GdkPixmap *spectrum; /* For drawing the spectrum analizer */ GtkWidget *rxwindow; /* RX Window */ GtkWidget *txwindow; GtkWidget *window; /* The Main Widget */ GtkWidget *phase_drawing; /* Phase Scope drawing area */ GtkWidget *spectrum_drawing; /* Spectrum drawing area */ GdkPixbuf *gbl_wfall_pixbuf; /* Waterfall Pixmap */ GtkWidget *rx_freq; GtkWidget *tx_freq; GtkWidget *dcd; GtkWidget *cwid; GtkWidget *afc; GtkWidget *net; GtkWidget *mode_qpsk; GtkWidget *mode_bpsk; GtkWidget *mode_autotx; GtkWidget *menu; GtkWidget *f_button[8]; GtkAdjustment *dcd_adj; }; extern struct main_screen main_screen; struct ini_settings /* Settings to be written in config file */ { gchar *tx_window_color; gchar *tx_window_font; gchar *rx_window_color_rx; gchar *rx_window_color_tx; gchar *rx_window_font; gchar *phase_scope_dcd_on_color; gchar *phase_scope_dcd_off_color; gchar *phase_scope_arc_color; gchar *spectrum_color; gchar *spectrum_tune_line_color; gchar *spectrum_center_line_color; gint spectrum_width; gint spectrum_speed; gchar *ptt_device; gchar *audio_device; gchar *name; gchar *qth; gchar *call; gchar *cw_string; gint freq; gint dcd_level; gint lsb; gint new_rx; gchar *log_filename; gint xlog_auto_freq; gint tcp_listen_port; gchar *label[16]; gchar *text[16]; }; extern struct ini_settings ini_settings; #define SPECTRUM_WIDTH 200 #define SPECTRUM_HEIGHT 100 gpsk31-0.5/src/phasescope.h0000644000175000017500000000214611031177037012504 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* * Functions for drawing the phase scope */ void phase_scope_init (); void draw_scope (int phdelta, int strength, int dcd); void draw_arc (); gpsk31-0.5/src/file.C0000644000175000017500000001115411031177035011221 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* * These are the functions needed for the file send/receive functions */ #include #include #include #include #include "file.h" #include "misc.h" #include "server.h" #include "globals.h" #include "main.h" #include "text.h" #include "menu.h" FILE *log_fp = NULL; /* * First the send file handling */ /* * This function creates an File dialog for the file to be send */ void file_send_dialog () { static GtkWidget *window; window = gtk_file_chooser_dialog_new ("GPSK31 - Send file", GTK_WINDOW(main_screen.window), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (gtk_widget_destroyed), &window); gint response = gtk_dialog_run (GTK_DIALOG(window)); switch (response) { case GTK_RESPONSE_ACCEPT: file_send (GTK_FILE_CHOOSER(window)); break; default: gtk_widget_destroy (window); break; } } /* * Here we read the file, and put it into the TX Buffer/Screen * We use a GTimer here, so that the main loop will still be processed * While we read the file */ void file_send (GtkFileChooser *fs) { char buffer[256]; FILE *fp; /* * Read the Filename from the Dialog and put it into the * filename array */ gchar *filename = gtk_file_chooser_get_filename ((fs)); gtk_widget_destroy (GTK_WIDGET (fs)); /* * Try to open the file for reading - if it fails * Display an error dialog and return */ fp = fopen (filename, "r"); if (!fp) warning_dialog ("Unable to find File!", FALSE); else { while (fgets (buffer, 255, fp) != NULL) { commPutData (buffer, 0); put_tx_window (buffer); } } fclose (fp); g_free (filename); } void save_log_dialog () { static GtkWidget *window; if (log_fp) warning_dialog ("Logfile already open!", FALSE); else { window = gtk_file_chooser_dialog_new ("GPSK31 - Log to file", GTK_WINDOW (main_screen.window), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (gtk_widget_destroyed), &window); gint response = gtk_dialog_run (GTK_DIALOG(window)); switch (response) { case GTK_RESPONSE_ACCEPT: open_logfile (GTK_FILE_CHOOSER (window)); break; default: gtk_widget_destroy (window); break; } } } void logfile(char *filename) { char *time_string; log_fp = fopen (filename, "a"); if (!log_fp) warning_dialog ("Unable to Open File!", FALSE); else { time_string = get_time_string (NULL); /* Write a string, so that the uses sees when the log was started */ put_logfile ("\n\n<<<<<< Log Opened at: "); put_logfile (time_string); put_logfile (" >>>>>>\n\n"); g_free (time_string); } } /* * Opens the file for writing - but does actually no writing */ void open_logfile (GtkFileChooser *fs) { gchar *filename = gtk_file_chooser_get_filename ((fs)); gtk_widget_destroy (GTK_WIDGET (fs)); logfile (filename); g_free (filename); } /* * Writes characters to the log file it open * Called by the main loop */ void put_logfile (const gchar * text) { if (log_fp) fputs (text, log_fp); } void close_logfile () { if (log_fp) { char *time_string = get_time_string (NULL); put_logfile ("\n\n<<<<<< Log Closed at: "); put_logfile (get_time_string (NULL)); put_logfile (" >>>>>>\n\n"); g_free (time_string); fclose (log_fp); log_fp = (FILE *) 0; } else warning_dialog ("No Logfile Open!", FALSE); } gpsk31-0.5/src/socketif.C0000644000175000017500000001160311031177040012104 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2002,2003,2004,2005 Thomas Ries * Copyright (C) 2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ #include "socketif.h" #include #include #include #include #include #include #include #include #include #include /* global variables */ extern bool gpsk31debug; /* module local variables */ static int listen_port=0; static int listen_fd=0; static int stream_fd=0; /* * TCP socket connection */ void tcp_set_listen_port(int port){ listen_port = port; tcp_listen(); return; } /* prepare a listening TCP socket */ void tcp_listen(void) { struct sockaddr_in my_addr; int sts, on=1; int flags; /* disabled in configuration? */ if (listen_port == 0) { listen_fd=-1; return; } /* ignore SIGPIPE of lost TCP connection */ signal (SIGPIPE, SIG_IGN); memset(&my_addr, 0, sizeof(my_addr)); my_addr.sin_family = AF_INET; my_addr.sin_port = htons(listen_port); listen_fd=socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); if (gpsk31debug) g_message("listener on TCP port %i",listen_port); if (listen_fd < 0) { g_warning("socket returned error [%i:%s]",errno, strerror(errno)); return; } if (setsockopt(listen_fd, SOL_SOCKET, SO_REUSEADDR, &on , sizeof(on)) < 0) { g_warning("setsockopt returned error [%i:%s]",errno, strerror(errno)); return; } sts=bind(listen_fd, (struct sockaddr *)&my_addr, sizeof(my_addr)); if (sts != 0) { g_warning("bind returned error [%i:%s]",errno, strerror(errno)); close(listen_fd); listen_fd=-1; return; } /* set non-blocking */ flags = fcntl(listen_fd, F_GETFL); if (flags < 0) { g_warning("fcntl returned error [%i:%s]",errno, strerror(errno)); close(listen_fd); listen_fd=-1; return; } if (fcntl(listen_fd, F_SETFL, (long) flags | O_NONBLOCK) < 0) { g_warning("fcntl returned error [%i:%s]",errno, strerror(errno)); close(listen_fd); listen_fd=-1; return; } listen (listen_fd, 1); return; } /* checks for new connection and does accept if capable (noone yet connected) */ void tcp_connect(void) { int sts; fd_set fdset; struct timeval timeout; int tmpfd; if (listen_fd <= 0) return; timeout.tv_sec=0; timeout.tv_usec=0; FD_ZERO(&fdset); FD_SET (listen_fd, &fdset); sts=select(listen_fd+1, &fdset, NULL, NULL, &timeout); if (sts > 0) { if (stream_fd != 0) { const char *msg="gpsk31: NOT-CONNECTED - other client connected, Sorry...\n"; tmpfd=accept(listen_fd, NULL, NULL); sts = send(tmpfd, msg, strlen(msg), 0); close(tmpfd); if (gpsk31debug) g_message("Rejected new TCP connection, someone already connected."); } else { const char *msg="gpsk31: CONNECTED\n"; stream_fd=accept(listen_fd, NULL, NULL); sts = send(stream_fd, msg, strlen(msg), 0); if (gpsk31debug) g_message("Accepted TCP connection [fd=%i]", stream_fd); } } return; } /* reads from TCP socket and return size & '\0' terminated string */ int tcp_read(char *buf, int buflen) { int sts; fd_set fdset; struct timeval timeout; int retlen=0; /* check the TCP connection and read stuff if present */ if (stream_fd > 0) { timeout.tv_sec=0; timeout.tv_usec=0; FD_ZERO(&fdset); FD_SET (stream_fd, &fdset); sts=select(stream_fd+1, &fdset, NULL, NULL, &timeout); if (sts > 0) { sts = recv(stream_fd, buf, buflen-1, 0); /* got disconnected? */ if (sts == 0) { close(stream_fd); if (gpsk31debug) g_message("Disconnected TCP connection [fd=%i]", stream_fd); stream_fd=0; } else { /* how many chars read from socket */ buf[sts]='\0'; retlen=sts; } } } return retlen; } int tcp_send(char *buf, int len) { int sts; sts = send(stream_fd, buf, len, MSG_MORE); return sts; } gpsk31-0.5/src/psk31-receiver.h0000644000175000017500000001035011031177037013111 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* PSK31 -- receiver classs */ #ifndef PSK31_RECEIVER_H_INCLUDED #define PSK31_RECEIVER_H_INCLUDED #define FIR1TAPS 64 #define FIR2TAPS 64 #include "psk31-coder.h" #include "psk31-fft.h" /* receiver channel interface class */ class psk31_receiver { private: int qpsk; /* QPSK mode on */ int lsb; /* inverted mode */ float _rxfreq; int rxfreq; int rxphase; int strength; /* logarithmic RX signal strength; 0..40 */ int dcd; /* dcd flag */ int dcdlevel; /* -1=ignore dcd, 0=plain pre/postamble dcd, otherwise: level 1..100 for dcd sensitivity */ int afc; /* AFC flag */ int noiselevel; /* test only: simulated addition noise */ int dofft; /* freq scan via fft activation */ int lastdelta; psk31_coder coder; /* for DCD calculation... */ unsigned long dcdshfreg; float is,qs; // signal quality estimator /* fft stuff */ float fft_result; float fftbufI[1024], fftbufQ[1024]; int fftind; /* receive filters */ float ibuf1_I[FIR1TAPS]; float ibuf1_Q[FIR1TAPS]; float ibuf2_I[FIR2TAPS]; float ibuf2_Q[FIR2TAPS]; int amp_buf[16]; float amp_buf_new[16]; int ibuf1_cur, ibuf2_cur; /*index of oldest sample/place for new one */ int lastphase; /* phase of last rx symbol... */ int bitclk; /* phase synchronisation */ int stat; /* cyclic state counter for receiver */ char *decode_buffer; float do_fir(float *base, int cur, float *coeff, int len); psk31_fft *pskfft; int process_500(); int process_rx_symbol(cmplx rxsymb); void dodcd(int diffphase); void doafc(int symb); void pdistr(float *I, float *Q); void perform_fft(float I, float Q); int diffphase2symbol(int diffphase); FILE *writefile; public: psk31_receiver(psk31_fft *fft) { pskfft = fft; stat=0; ibuf1_cur=ibuf2_cur=0; rxphase=0; for(int i=0; i<16; i++) amp_buf[i]=0; set_freq(1250); dofft=0; lastdelta=0; for(int i=0; i * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* Linux PSK31 modem driver for soundcard -- Filter coefficients * * these FIR coefs are those used by G0TJZ in his TMC320C50 code * * Hansi Reiser, DL9RDZ, 20 April 1998 */ /* 64-tap raised-cosine FIR*/ float fir1c[64]={ 0.000000, 0.000038, 0.000150, 0.000336, 0.000595, 0.000922, 0.001317, 0.001773, 0.002288, 0.002856, 0.003472, 0.004130, 0.004823, 0.005545, 0.006288, 0.007047, 0.007812, 0.008578, 0.009337, 0.010080, 0.010802, 0.011495, 0.012153, 0.012769, 0.013337, 0.013852, 0.014308, 0.014703, 0.015030, 0.015289, 0.015475, 0.015587, 0.015625, 0.015587, 0.015475, 0.015289, 0.015030, 0.014703, 0.014308, 0.013852, 0.013337, 0.012769, 0.012153, 0.011495, 0.010802, 0.010080, 0.009337, 0.008578, 0.007813, 0.007047, 0.006288, 0.005545, 0.004823, 0.004130, 0.003472, 0.002856, 0.002288, 0.001773, 0.001317, 0.000922, 0.000595, 0.000336, 0.000150, 0.000038, }; /* 4-bit receive filter for 31.25 baud BPSK * Designed by G3PLX, version 2 */ float fir2c[64]={ -0.00044789, -0.00063167, -0.00100256, -0.00156531, -0.00232266, -0.00327063, -0.00439342, -0.00565850, -0.00701253, -0.00837907, -0.00965823, -0.01072878, -0.01145278, -0.01168246, -0.01126911, -0.01007335, -0.00797606, -0.00488924, -0.00076591, 0.00439171, 0.01052660, 0.01752432, 0.02521404, 0.03337329, 0.04173643, 0.05000649, 0.05786981, 0.06501264, 0.07113857, 0.07598566, 0.07934199, 0.08105860, 0.08105860, 0.07934199, 0.07598566, 0.07113857, 0.06501264, 0.05786981, 0.05000649, 0.04173643, 0.03337329, 0.02521404, 0.01752432, 0.01052660, 0.00439171, -0.00076591, -0.00488924, -0.00797606, -0.01007335, -0.01126911, -0.01168246, -0.01145278, -0.01072878, -0.00965823, -0.00837907, -0.00701253, -0.00565850, -0.00439342, -0.00327063, -0.00232266, -0.00156531, -0.00100256, -0.00063167, -0.00044789, }; float fir2cnew[64]={ 0.000625000, 0.000820912, 0.001374651, 0.002188141, 0.003110600, 0.003956273, 0.004526787, 0.004635947, 0.004134515, 0.002932456, 0.001016352, -0.001539947, -0.004572751, -0.007834665, -0.011009254, -0.013733305, -0.015625000, -0.016315775, -0.015483216, -0.012882186, -0.008371423, -0.001933193, 0.006315933, 0.016124399, 0.027115485, 0.038807198, 0.050640928, 0.062016866, 0.072333574, 0.081028710, 0.087617820, 0.091728168, 0.093125000, 0.091728168, 0.087617820, 0.081028710, 0.072333574, 0.062016866, 0.050640928, 0.038807198, 0.027115485, 0.016124399, 0.006315933, -0.001933193, -0.008371423, -0.012882186, -0.015483216, -0.016315775, -0.015625000, -0.013733305, -0.011009254, -0.007834665, -0.004572751, -0.001539947, 0.001016352, 0.002932456, 0.004134515, 0.004635947, 0.004526787, 0.003956273, 0.003110600, 0.002188141, 0.001374651, 0.000820912 }; float ampcof[16] = { -0.097545161, -0.093796555, -0.086443400, -0.075768274, -0.062181416, -0.046204960, -0.028452874, -0.009607360, 0.009607360, 0.028452874, 0.046204960, 0.062181416, 0.075768274, 0.086443400, 0.093796555, 0.097545161 }; gpsk31-0.5/src/main_screen.h0000644000175000017500000000174711031177035012641 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ int setup_screen (); gpsk31-0.5/src/psk31-receiver.C0000644000175000017500000001472711031177037013060 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 1998,1999 Hansi Reiser DL9RDZ * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2008 Thomas Ries * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* * PSK31 -- receiver classs * partly derived from the work of Andrew Senior G0TJZ and Peter Martinez G3PLX */ #include #include #include #include "psk31-receiver.h" #include "coeff.h" /* float fir1c[], fir2c[] */ /* * returns: -1: new sym,now rxbuf full; 0=no new sym; 1=new sym * currently: returns: new char, or NO_CHAR */ int psk31_receiver::process_rx_sample(short sample) { float s,c,scarg,smpl; int retval; if(pskfft) pskfft->add_rx_sample(sample); smpl=sample*(1/32767.0); /* scale to -1.0 .. 1.0 */ /* Compute current rx LO value */ rxphase=(rxphase+rxfreq)&0xFFFF; scarg=rxphase*(1.0/65536*2*M_PI); s=sin(scarg); c=cos(scarg); /* "mixer" to create I/Q out of Sample and LO */ ibuf1_I[ibuf1_cur]=s*smpl; ibuf1_Q[ibuf1_cur]=c*smpl; ibuf1_cur = (ibuf1_cur+1)%FIR1TAPS; /* Every 16 samples run 500Hz-RX-Process */ if( (stat&0x0F) == 0 ) { retval=process_500(); } else retval=NO_CHAR; stat=(stat+1)&0xFF; return retval; } extern int OPTnew; /* returns received character (or NO_CHAR) */ int psk31_receiver::process_500() { float Ival, Qval; float amp, ftemp, ampsum; int cor, xxx, index, i; unsigned int temp; /* do the downsampling decimation filter into second buffer */ Ival=ibuf2_I[ibuf2_cur]=do_fir(ibuf1_I, ibuf1_cur, fir1c, FIR1TAPS); Qval=ibuf2_Q[ibuf2_cur]=do_fir(ibuf1_Q, ibuf1_cur, fir1c, FIR1TAPS); if( (++ibuf2_cur) == FIR2TAPS ) ibuf2_cur=0; if(pskfft) pskfft->add_if_sample(Ival, Qval); /* And do the second FIR filtering */ if(OPTnew&1) { Ival=do_fir(ibuf2_I, ibuf2_cur, fir2cnew, FIR2TAPS); Qval=do_fir(ibuf2_Q, ibuf2_cur, fir2cnew, FIR2TAPS); } else { Ival=do_fir(ibuf2_I, ibuf2_cur, fir2c, FIR2TAPS); Qval=do_fir(ibuf2_Q, ibuf2_cur, fir2c, FIR2TAPS); } float power = Ival * Ival + Qval * Qval; if(power>0) { strength = (unsigned int)(10 * log10(65536*power)); if(strength>40) strength=40; if(strength<0) strength=0; } else strength=0; if(!(OPTnew&2)) { /* Compute amplitude in dB, shiftet to the left in 'temp' */ /* i guess simply calling 'log' would be faster on modern machines? */ temp= (unsigned int)(65536* ( Ival*Ival + Qval*Qval )); if(temp) { xxx=31; while( xxx && !(temp&0x80000000) ) { xxx--; temp<<=1; } temp=(xxx<<20)|((temp&0x7FFFFFFF)>>11); } /* Now to the bit synchronisation. */ index=bitclk>>20; amp_buf[index]=temp; cor=0; for(i=0; i<8; i++) cor+=amp_buf[i]; for( ; i<16; i++) cor-=amp_buf[i]; cor/=500; /* syngain=0.002 */ bitclk-=cor; } else { amp = sqrt( Ival*Ival + Qval*Qval ); index=bitclk>>20; amp_buf_new[index] = amp; ftemp = do_fir(amp_buf_new, (index+1)%16, ampcof, 16); ampsum=0; for(i=0; i<16; i++) ampsum+=amp_buf_new[i]; if(ampsum!=0) ftemp=ftemp/ampsum; else ftemp=0; ftemp *= 0.06; cor = (int)(ftemp*0x100000); bitclk-=cor; } bitclk+=0x100000; if(bitclk&0xFF000000) { /* here we are at the center of the bit... */ bitclk&=0xFFFFFF; cmplx IQval; IQval.x=Ival; IQval.y=Qval; return process_rx_symbol(IQval); } else return NO_CHAR; } int psk31_receiver::process_rx_symbol(cmplx rxsymb) { int diffphase, rxphase, symbol; rxphase=psk31_coder::IQ2iphase(rxsymb)>>8; diffphase=(rxphase-lastphase)&0xFF; lastphase=rxphase; doafc(diffphase); /* Do automatic frequency correction */ lastdelta=diffphase; symbol=diffphase2symbol(diffphase); dodcd(diffphase); /* Do DCD */ /* rxsymb is used for viterbi, symbol for BPSK (needn't recompute)*/ int res=coder.decode(rxsymb, symbol); return res; } void psk31_receiver::doafc(int dp) { if( !dcd || !afc) return; /* Don't correct if: DCD is off, sending, or AFC disabled */ if(qpsk) dp = (int)((char)((dp<<2)&0xFF)); /* remove 2 MSBs */ else dp = (int)((char)((dp<<1)&0xFF)); /* remove 1 MSB */ if(dp == -128) /* eliminate bias */ dp = 0; #if 0 /* slow */ _rxfreq += dp * 0.0002; /* apply correction */ #else _rxfreq += dp * 0.0005; /* apply correction */ #endif rxfreq = (int)(65536.0/8000*_rxfreq); } void psk31_receiver::dodcd(int diffphase) { int symbol; symbol=diffphase2symbol(diffphase); #if 0 fprintf(writefile,"%d %f,%f\n",diffphase,is,qs); #endif int n; if(qpsk) n=8; else n=4; is = 0.05*cos(n*M_PI*diffphase/256) + 0.95*is; qs = 0.05*sin(n*M_PI*diffphase/256) + 0.95*qs; dcdshfreg <<= 2; /* Shift register left */ dcdshfreg += symbol; /* Insert latest symbol */ if(dcdshfreg == 0xAAAAAAAAL) { // DCD on by Preamble dcd = 1; is=1; qs=0; } else if(dcdshfreg == 0L) { // DCD off by Postamble dcd = 0; is=qs=0; } else if(dcdlevel>0) { // TODO: for QPSK it would be better to use viterbi decoder // minimal distance as a decision metric! if( (is*is+qs*qs)*100 > dcdlevel*(dcd?0.50:1) ) { dcd = 1; } else { dcd = 0; } } // TODO: G0TJZ uses is,qs for a sponaneos frequency correction // based on that estimation... maybe we could do that here too? #if 0 fprintf(writefile,"%d %f,%f->%f %d\n",diffphase,is,qs,is*is+qs*qs,dcd); #endif } float psk31_receiver::do_fir(float *base, int cur, float *coeff, int len) { int c=0, i; float sum=0; for(i=cur; i> 6; else diffphase = ((diffphase + 0x40) & 0x80) >> 6; if(lsb) diffphase = (4 - diffphase) & 3; return diffphase; } gpsk31-0.5/src/psk31-transmitter.C0000644000175000017500000004567311031177040013626 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 1998,1999 Hansi Reiser * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2008 Thomas Ries * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* * PSK31 -- transmitter class * partly derived from the work of Andrew Senior G0TJZ and Peter Martinez G3PLX */ #include #include #include #include #include #include #include #include #include #include "psk31-coder.h" #include "psk31-transmitter.h" #include #include "server.h" extern int full_duplex; // from psk31-main.C extern int chans; // from server-main.C extern int bits; /* Morse code encoding table */ /* 0=space, 1=dot; from msb to lsb; lowest 1 = end of code */ unsigned int psk31_transmitter::cwtab[58] = {0x14, 0x4A, 0x00, 0x00, 0x00, 0x00, 0x7A, 0xB4, 0xB6, 0x00, 0x54, 0xCE, 0x86, 0x56, 0x94, 0xFC, 0x7C, 0x3C, 0x1C, 0x0C, 0x04, 0x84, 0xC4, 0xE4, 0xF4, 0xE2, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x60, 0x88, 0xA8, 0x90, 0x40, 0x28, 0xD0, 0x08, 0x20, 0x78, 0xB0, 0x48, 0xE0, 0xA0, 0xF0, 0x68, 0xD8, 0x50, 0x10, 0xC0, 0x30, 0x18, 0x70, 0x98, 0xB8, 0xC8}; int psk31_transmitter::execute_cmd(int c) { if(c&TX_MODE) { if(c&TXM_TUNE) set_mode(-1,-1,2); // Tune on else if(c&TXM_CW) set_mode(-1,-1,1); // CW on else set_mode( (c&TXM_QPSK)?1:0, (c&TXM_LSB)?1:0, 0); // Normal mode } else if (c&TX_FREQ) { set_freq(0.01 * (c&0xFFFFF)); } return 0; } int psk31_transmitter::send_char(int c) { if(c==TX_START) { /* Start: send preamble in psk mode, * don't send it if we want to tune or send cw... * remove "TX_END" from buffer! */ /* do NOT strip TX_END chars from buffer, this breaks "~t xxx ~r" in the same macro! unqueue_end(); */ if(transmit_state==TS_INACTIVE) transmit_state=TS_TRANSMIT; else { if(transmit_state==TS_TRANSMIT) ; else if(transmit_state==TS_WAITFOREND) { transmit_state=TS_TRANSMIT; } } start_execute_cmd(); if(cwmode==0) { sendpreamble(); // txIold=txInew=1; txQold=txQnew=0; txIold=txInew=0; txQold=txQnew=0; } else { txIold=txInew=0; txQold=txQnew=0; } return 0; } if( (c==TX_END) || (c==(TX_END|TX_URGENT)) ) { if(c&TX_URGENT) { // falls urgent: buffer weghaun... txbuf_sta=txbuf_end=txbuf; } /* if we have "~t xxx ~r" in one single macro we may get here in not-yet-transmit state. if(transmit_state==TS_TRANSMIT) */ { if(sendchar_cwmode==0) sendpostamble(); putcodeword(TX_END); transmit_state=TS_WAITFOREND; } return 0; } if( (c&TX_MODE) ) { if( c&TXM_TUNE ) sendchar_cwmode=2; else if( c&TXM_CW ) sendchar_cwmode=1; else sendchar_cwmode=0; } if(bufferspace()<=128) return -1; // no space in buffer... if(c>=0 && c<256) { if(sendchar_cwmode) { putcodeword( c|CODE_CW_ECHO ); send_cw_char(c); } else { putcodeword(c|CODE_PLAIN); } } else if ((c&TX_FREQ) || (c&TX_MODE)) { putcodeword(c); } return 0; } /* string should not contain control char like TX_END, TX_FREQ, ... */ int psk31_transmitter::send_string(char *str) { if (bufferspace() < (sendchar_cwmode?5:1)*(int)strlen(str)+100) return -1; while(*str) { int c = (int)((unsigned char)*str); if(sendchar_cwmode) { putcodeword( c|CODE_CW_ECHO ); send_cw_char(*str); } else { putcodeword( c|CODE_PLAIN ); } str++; } return 0; } int psk31_transmitter::send_cw_string(int need_postamble, char *str) { /* just a rough approximation of utilized space!! */ if (bufferspace() < 5*(int)strlen(str)) return -1; if(need_postamble) sendpostamble(); while(*str) { putcodeword( ((unsigned char)*str)|CODE_CW_ECHO); send_cw_char(*str); str++; } //putcodeword(TX_END); return 0; } char *psk31_transmitter::strupr(char *str) { char *ptr=str; while(*ptr) { *ptr=toupper(*ptr); ptr++; } return str; } int psk31_transmitter::getnextsymbol(void) { unsigned char symb; symb = coder.encode(shiftreg, useqpsk); if(keydown) symb |= 4; /* Tone on */ /* Add new bit from codeword */ shiftreg <<= 1; if(codewordbuf & 1) shiftreg |= 1; codewordbuf >>= 1; if(codewordbuf <= 1) { /* Need to get new codeword */ codewordbuf = 0; /* Get next codeword */ codewordbuf = get_buffer_entry(); /* Read flag bits in LSBs of codeword */ if(codewordbuf & CODE_USE_QPSK) useqpsk = 1; /* Encode this one using QPSK */ else useqpsk = 0; /* Encode using BPSK */ if(codewordbuf & CODE_TONE_ON) keydown = 1; /* Tone should be on */ else keydown = 0; /* Tone off */ codewordbuf &= 0xffff; /* remove flag bits */ } return symb; } int psk31_transmitter::bufferspace() { int used = (txbuf_end-txbuf_sta+TXBUFSIZE)%TXBUFSIZE; return TXBUFSIZE - used; } /* Putting stuff into the circular tx buffer... */ void psk31_transmitter::putcodeword(int cword) { if ((cword==(8|CODE_PLAIN)) && (txbuf_sta!=txbuf_end)) { // backspace -> remove previous char if it is still in buffer! unsigned int *temp; temp = txbuf_end-1; if(temp=txbuf+TXBUFSIZE) txbuf_end=txbuf; if(txbuf_sta==txbuf_end) { txbuf_sta++; if (txbuf_sta>=txbuf+TXBUFSIZE) txbuf_sta=txbuf; } } void psk31_transmitter::frontputcodeword(int c) { txbuf_sta--; if(txbuf_sta=txbuf+TXBUFSIZE) ptr=txbuf; } } int psk31_transmitter::getcodeword() { int cword; if (transmit_state==TS_TRANSMIT||transmit_state==TS_WAITFOREND) { if (txbuf_end==txbuf_sta) { if (cwmode==2) { // Tuning... -> carrier cword = CODE_TONE_ON | 0xFFFF; } else { if (cwmode==1) { // CW send -> no idle signal cword = 0x10; } else { cword = CODE_TONE_ON| 0x2000; // idle signal if (qpsk) cword|=CODE_USE_QPSK; } } } else { cword=*txbuf_sta; txbuf_sta++; if (txbuf_sta>txbuf+TXBUFSIZE) txbuf_sta=txbuf; } } else { /* STATE=TS_INACTIVE */ cword=0x0002; // one bit with TONE OFF! } return cword; } /* puts the preamble AT THE BEGINNING of the internal buffer */ void psk31_transmitter::sendpreamble(void) { /* Sends 32 reversals at start of over */ frontputcodeword(CODE_TONE_ON|0x0040); // 6 frontputcodeword(CODE_TONE_ON|0x2000); // 13 frontputcodeword(CODE_TONE_ON|0x2000); // 13 } void psk31_transmitter::sendpostamble(void) { /*Flushes shift register and sends 32 bits of carrier at end of over*/ if(qpsk) { /* Flush with 20 zeroes */ putcodeword(CODE_TONE_ON|CODE_USE_QPSK|0x2000); //13 putcodeword(CODE_TONE_ON|CODE_USE_QPSK|0x0080); //7 } else putcodeword(CODE_TONE_ON|0x0004); /*Flush with 2 zeroes */ /* 32 bits of carrier */ putcodeword(CODE_TONE_ON|0x3FFF); // 13 putcodeword(CODE_TONE_ON|0x3FFF); // 13 putcodeword(CODE_TONE_ON|0x007F); // 6 putcodeword(0x0001); /* Tone off */ } void psk31_transmitter::send_cw_char(int c) { unsigned char u; c = toupper(c); if (c < ' ' || c > 'Z') return; if (c == ' ') /* Inter-word space */ putcodeword( 0x0008 ); /* 3 bits key-up */ else { u = cwtab[c - 33]; while (u > 0) { if(u == 0x80) { /* 2 dots space: * Combines with inter-element space to give * inter-character space */ putcodeword(0x0004); /* 2 bits key-up */ } else if (u & 0x80) { /* 3 dots mark = 1 dash */ putcodeword(CODE_TONE_ON|0x000F); /* 3 bits key-down */ } else { /* 1 dot mark */ putcodeword(CODE_TONE_ON|0x003); /* 1 bit key-down */ } /* 2 dot inter-element space */ putcodeword(0x0004); /* 2 bits key-up */ u = u << 1; } } } /**********************************************************************/ /* tx functions */ /* new version: * - verify if there is space for a whole bit (256 samples) * - if not, return with TX_BUSY * - otherwise: * read current output counter (ocnt) * generate new bit and write it to device * if a new character was needed, schedule it for echo at ocnt+odelay * echo next character if ocnt is sufficiently high */ // #define BLOCKSIZE (1<0) wcnt+=res; if(res!=(int)(len*sizeof(short))) { if(res<0 && (errno==EINTR||errno==EAGAIN)) { write_pending=1; return TX_BUSY; } if(res==0 || (res<0 && (errno==EBUSY))) { write_pending=1; return TX_BUSY; } if(res<0) { fprintf(stderr,"tx: write error... res=%d\n",res); return TX_ERROR; } fprintf(stderr,"tx: partial write... res=%d\n", res); return TX_ERROR; } write_pending=0; res = get_echo_char( cinfo.bytes ); #if 0 if(res!=TX_BUSY) fprintf(stderr,"ECHO: returning %c (%x)\n", (unsigned char)res,res); #endif if(res==TX_END) { if(transmit_state!=TS_INACTIVE) { /* This happens if the TX_END already has been moved * from the main queue to the echo queue and some * one starts to transmit... */ fprintf(stderr,"WARNING: psk31-transmitter: ignoring " "TX_END in tx state %d\n",transmit_state); return TX_BUSY; } } return res; } void psk31_transmitter::add_echo_char (int ch, int timestamp) { echo_end->timestamp = timestamp; echo_end->ch = ch; echo_end++; if (echo_end >= &echo_buffer[ECHO_BUFFER_LEN]) echo_end=&echo_buffer[0]; if (echo_end==echo_start) { fprintf(stderr,"Warning: ECHO char buffer overflow!\n"); } } int psk31_transmitter::get_echo_char (int timestamp) { if(echo_start!=echo_end) { if (timestamp > echo_start->timestamp) { int x = echo_start->ch; echo_start++; if (echo_start >= &echo_buffer[ECHO_BUFFER_LEN]) echo_start = echo_buffer; return x; } } return TX_BUSY; } int psk31_transmitter::process_31() { char txsymb; /* 0 or 2 for bspk, 0..3 for qpsk */ float tmp; txsymb=getnextsymbol(); txIold=txInew; txQold=txQnew; /* on/off */ if (txsymb&4) { if (txInew==0 && txQnew==0) txInew=1; } else { txInew=txQnew=0; } if (txsymb&1) { /* -I>Q, Q>I at 90, 270 */ tmp=-txInew; txInew=txQnew; txQnew=tmp; } if (txsymb&2) { /* -I>I, -Q>Q at 180,270 */ txInew=-txInew; txQnew=-txQnew; } return 0; } /* returns sample value */ int psk31_transmitter::filter_tx_sample(int stat) /* 8000Hz-Process TX */ { float shape, Itx, Qtx, scarg, s, c; /* Compute current tx LO value */ txphase=(txphase+txfreq)&0xFFFF; scarg=txphase*(1.0/65536*2*M_PI); s=sin(scarg); c=cos(scarg); shape=cos( (M_PI/512)*stat ); shape*=shape; /* raised cosine shape */ Itx = txIold*shape + txInew*(1-shape); Qtx = txQold*shape + txQnew*(1-shape); return (int)(16000*(Itx*s + Qtx*c)); } /* this function is executed when a TX_START token is received. * it scans the start of the code word buffer. if TX_MODE or TX_FREQ * tokens are found, they are handled before the "real work" starts. * This help to have the correct cwmode setting when deciding about * preamble and idle signal... */ /* ToDo: There is one problem: If someone sends a TX_START before * the previous TX_END has been completely executed, the mode changes * affect the previos transmission. This is not a really big problem * (normally you don't start to transmit immediately after stopping to * to so), but this might be fixed some time... */ void psk31_transmitter::start_execute_cmd () { int s; if (txbuf_sta==txbuf_end) return; while (1) { s=*txbuf_sta; if ((s&TX_MODE) || (s&TX_FREQ)) { // remove mode set command from buffer... txbuf_sta++; if (txbuf_sta>txbuf+TXBUFSIZE) txbuf_sta=txbuf; // and execute.. execute_cmd(s); } else break; } } /* sets echo_char! */ int psk31_transmitter::get_buffer_entry () { int s; while(1) { s=getcodeword(); if(s==TX_DUMMY) continue; if(s&CODE_CW_ECHO) { echo_char=s; } else if ((s&TX_MODE) || (s&TX_FREQ)) { execute_cmd(s); } else break; } /* CW_ECHO, TX_MODE and TX_FREQ are handled in the loop. all other * symbols in the codeword buffer are treated now: */ if (s&CODE_PLAIN) { /* encode character */ echo_char=s; unsigned int codeword; s=s&255; codeword = coder.encode_varicode((unsigned char)s); codeword |= CODE_TONE_ON; if (qpsk) codeword |= CODE_USE_QPSK; return codeword; } if (s==TX_END) { echo_char=s; s=0; /* TONE OFF */ } return s; } gpsk31-0.5/src/Makefile.am0000644000175000017500000000143611025770316012240 00000000000000bin_PROGRAMS = gpsk31 gpsk31_SOURCES = hansis_fft.C psk31-coder.C psk31-fft.C psk31-receiver.C \ psk31-transmitter.C server-main.C call_dialog.C callback.C \ main.C main_screen.C menu.C misc.C phasescope.C spectrum.C \ file.C text.C log.C support.C socketif.C backtrace.C \ call_dialog.h coeff.h hansis_fft.h menu.h phasescope.h \ psk31-fft.h psk31-transmitter.h spectrum.h callback.h globals.h \ main_screen.h misc.h psk31-coder.h psk31-receiver.h server.h \ file.h main.h text.h log.h support.h socketif.h backtrace.h \ cfg.C cfg.h appicondir = $(datadir)/pixmaps INCLUDES = @GTK_CFLAGS@ \ -DPIXMAPDIR=\"$(appicondir)\" -DDATADIR=\"$(pkgdatadir)\" \ -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED \ -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED LDADD = @GTK_LIBS@ gpsk31-0.5/src/support.h0000644000175000017500000000262311031177040012060 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ #include /* Use this function to set the directory containing installed pixmaps. */ void add_pixmap_directory (const gchar *directory); /* This is used to create the pixmaps used in the interface. */ GtkWidget* create_pixmap (GtkWidget *widget, const gchar *filename); /* This is used to create the pixbufs used in the interface. */ GdkPixbuf* create_pixbuf (const gchar *filename); gpsk31-0.5/src/menu.C0000644000175000017500000012747311031177035011262 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* * menu.C Functions for the menus */ #include #include #include "main_screen.h" #include "callback.h" #include "call_dialog.h" #include "misc.h" #include "globals.h" #include "menu.h" #include #include #include "file.h" #include "server.h" #include "text.h" #include #include "cfg.h" #include "phasescope.h" #include "spectrum.h" extern char configfile[]; /* explicit config file to be loaded */ GtkUIManager *ui_manager; const char *trx_mode_names[] = { "BPSK31", "QPSK31" }; #define BPSK31 0 #define QPSK31 1 int mode; static void send_call (); static void send_name (); static void send_qth (); static void send_rsts (); static void send_rstr (); static void send_frequency (); static void send_mycall (); static void send_myqth (); static void send_myname (); static void mode_qpsk_toggled (); static void mode_afc_toggled (); static void mode_net_toggled (); static void mode_cwid_toggled (); /* Normal items */ static GtkActionEntry entries[] = { { "FileMenu", NULL, "_File" }, { "SendMenu", NULL, "S_end" }, { "ModeMenu", NULL, "_Mode" }, { "WindowMenu", NULL, "_Window" }, { "HelpMenu", NULL, "_Help" }, {"Send", GTK_STOCK_OPEN, "Send File", "S", "", G_CALLBACK(file_send_dialog)}, {"Log", GTK_STOCK_NEW, "Log to _File", "F", "", G_CALLBACK(save_log_dialog)}, {"Close", GTK_STOCK_CLOSE, "Close Lo_gfile", "G", "", G_CALLBACK(close_logfile)}, {"Quit", GTK_STOCK_QUIT, "_Quit GPSK31", "Q", "", G_CALLBACK(exit_dialog)}, {"Call", NULL, "_Call", "C", "", G_CALLBACK(send_call)}, {"Name", NULL, "_Name", "N", "", G_CALLBACK(send_name)}, {"QTH", NULL, "QT_H", "H", "", G_CALLBACK(send_qth)}, {"RST-S", NULL, "RS_T-S", "T", "", G_CALLBACK(send_rsts)}, {"Frequency", NULL, "Fr_equency", "E", "", G_CALLBACK(send_frequency)}, {"Mycall", NULL, "MyCa_ll", "L", "", G_CALLBACK(send_mycall)}, {"Myname", NULL, "MyNa_me", "M", "", G_CALLBACK(send_myname)}, {"MyQTH", NULL, "M_yQTH", "Y", "", G_CALLBACK(send_myqth)}, {"RST-R", NULL, "RST-_R", "R", "", G_CALLBACK(send_rstr)}, {"Configuration", GTK_STOCK_PREFERENCES, "Preferences", "P", "", G_CALLBACK(config_dialog)}, {"Manual", GTK_STOCK_HELP, "Manual", "I", "", G_CALLBACK(help_dialog)}, {"ChangeLog", GTK_STOCK_HELP, "ChangeLog", "O", "", G_CALLBACK(changelog_dialog)}, {"About", GTK_STOCK_DIALOG_INFO, "About GPSK31", "H", "", G_CALLBACK(about_dialog)}, }; static GtkToggleActionEntry toggle_entries[] = { {"QPSK", NULL, "_QPSK", "Q", "", G_CALLBACK(mode_qpsk_toggled)}, {"CW_ID", NULL, "_CW-ID", "C", "", G_CALLBACK(mode_cwid_toggled)}, {"AFC", NULL, "_AFC", "A", "", G_CALLBACK(mode_afc_toggled)}, {"NET", NULL, "_NET", "N", "", G_CALLBACK(mode_net_toggled)}, {"Details", NULL, "QSO Details", "W", "", G_CALLBACK(toggle_call_dialog)}, }; static const char *ui_description = "" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " ""; void init_menu () { GtkActionGroup *action_group = gtk_action_group_new ("MenuActions"); gtk_action_group_add_actions (action_group, entries, G_N_ELEMENTS (entries), main_screen.window); gtk_action_group_add_toggle_actions (action_group, toggle_entries, G_N_ELEMENTS (toggle_entries), main_screen.window); ui_manager = gtk_ui_manager_new (); gtk_ui_manager_insert_action_group (ui_manager, action_group, 0); GtkAccelGroup *accel_group = gtk_ui_manager_get_accel_group (ui_manager); gtk_window_add_accel_group (GTK_WINDOW (main_screen.window), accel_group); gtk_ui_manager_add_ui_from_string (ui_manager, ui_description, -1, NULL); main_screen.menu = gtk_ui_manager_get_widget (ui_manager, "/MainMenu"); } void about_dialog() { static GtkWidget *window; static GtkWidget *label; static GtkWidget *ok_button; window = gtk_dialog_new_with_buttons ("GPSK31 - About", GTK_WINDOW(main_screen.window), GTK_DIALOG_DESTROY_WITH_PARENT, NULL); label = gtk_label_new ("\nGPSK31 - Linux GTK+ PSK31 Terminal\n" \ "Version "VERSION" - "DATE"\n\n" \ "DSP Routines by Hansi Reiser, DL9RDZ\n" \ "GTK+ GUI by Luc Langehegermann, LX2GT\n" \ "Contributions by Thomas Ries, HB9XAR\n" \ "GTK+-2.0 version/maintenance by Joop Stakenborg, PG4I\n" \ ); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(window)->vbox), label); gtk_widget_show (label); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER); ok_button = gtk_dialog_add_button (GTK_DIALOG(window), GTK_STOCK_OK, GTK_RESPONSE_OK); gtk_dialog_run (GTK_DIALOG(window)); gtk_widget_destroy (window); } static void display_file (const gchar *title, const gchar *filename) { static GtkWidget *window; static GtkWidget *ok_button, *tv, *scrolled; gchar *helpfile, buf[80], *b; FILE *in; GtkTextBuffer *buffer; GtkTextIter start, end; PangoFontDescription *font_desc; gchar *temp = g_strdup_printf ("GPSK31 - %s", title); window = gtk_dialog_new_with_buttons (temp, GTK_WINDOW(main_screen.window), GTK_DIALOG_DESTROY_WITH_PARENT, NULL); g_free (temp); gtk_widget_set_size_request (window, 650, 400); scrolled = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(window)->vbox), scrolled); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); tv = gtk_text_view_new (); gtk_container_add (GTK_CONTAINER (scrolled), tv); helpfile = g_strdup_printf ("%s%s%s", DATADIR, G_DIR_SEPARATOR_S, filename); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(tv)); gtk_text_buffer_get_bounds (buffer, &start, &end); b = g_new0 (gchar, 100); in = fopen (helpfile, "r"); if (in) { do { if (fgets (buf, 80, in) == NULL) break; else { b = g_locale_to_utf8 (buf, -1, NULL, NULL, NULL); gtk_text_buffer_insert (buffer, &start, b, -1); } } while (!feof (in)); fclose (in); } g_free (b); g_free (helpfile); font_desc = pango_font_description_from_string ("mono"); gtk_widget_modify_font (tv, font_desc); pango_font_description_free (font_desc); gtk_widget_show_all (scrolled); ok_button = gtk_dialog_add_button (GTK_DIALOG(window), GTK_STOCK_OK, GTK_RESPONSE_OK); gtk_widget_grab_focus (scrolled); gtk_dialog_run (GTK_DIALOG(window)); gtk_widget_destroy (window); } void changelog_dialog() { display_file ("History of changes", "ChangeLog"); } void help_dialog() { display_file ("Hints", "README"); } static void exit_destroy (GtkButton *button, gpointer user_data) { gtk_widget_destroy (GTK_WIDGET(user_data)); } static void real_exit (GtkButton *button, gpointer user_data) { char *home = getenv ("HOME"); char conf[strlen (home) + 60]; if (strlen(configfile) == 0) { strcpy (conf, home); strcat (conf, "/.gpsk31/gpsk31.cfg"); } else { /* first try full path as specified */ strcpy (conf, configfile); if (!g_file_test(conf, G_FILE_TEST_EXISTS)) { /* not found, try again in $HOME/.gpsk31 */ strcpy (conf, home); strcat (conf, "/.gpsk31/"); strcat (conf, configfile); } } savepreferences (conf); gtk_main_quit (); } void exit_dialog() { static GtkWidget *window = NULL; static GtkWidget *label; static GtkWidget *yes_button; static GtkWidget *no_button; window = gtk_dialog_new_with_buttons ("GPSK31 - Exit", GTK_WINDOW(main_screen.window), GTK_DIALOG_DESTROY_WITH_PARENT, NULL); gtk_window_set_default_size (GTK_WINDOW(window), 300, 100); g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (gtk_widget_destroyed), &window); label = gtk_label_new ("Do you really want to quit?"); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(window)->vbox), label); gtk_widget_show (label); yes_button = gtk_dialog_add_button (GTK_DIALOG(window), GTK_STOCK_OK, GTK_RESPONSE_OK); no_button = gtk_dialog_add_button (GTK_DIALOG(window), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); g_signal_connect (G_OBJECT (no_button), "clicked", G_CALLBACK (exit_destroy), G_OBJECT (window)); g_signal_connect (G_OBJECT (yes_button), "clicked", G_CALLBACK (real_exit), NULL); gtk_widget_show_all (window); } void warning_dialog (const gchar *str, gboolean exit_program) { static GtkWidget *window; static GtkWidget *label; window = gtk_dialog_new_with_buttons ("GPSK31 - Warning", GTK_WINDOW(main_screen.window), GTK_DIALOG_DESTROY_WITH_PARENT, NULL); gtk_window_set_default_size (GTK_WINDOW(window), 400, 100); gtk_dialog_add_button (GTK_DIALOG(window), GTK_STOCK_OK, GTK_RESPONSE_OK); label = gtk_label_new (NULL); gtk_label_set_markup (GTK_LABEL (label), str); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(window)->vbox), label); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER); gtk_widget_show (label); gtk_dialog_run (GTK_DIALOG (window)); if (exit_program) exit (0); else gtk_widget_destroy (window); } void on_config_page_select (GtkTreeSelection *selection, gpointer user_data) { GtkTreeModel *model; GtkTreeIter iter; if (gtk_tree_selection_get_selected (selection, &model, &iter)) { gchar *tmp = gtk_tree_model_get_string_from_iter (model, &iter); gtk_notebook_set_current_page (GTK_NOTEBOOK(user_data), atoi((const char *)tmp)); } } void config_dialog() { GdkColor color; GdkColormap *cmap = gdk_colormap_get_system (); gchar *title; if (strlen(configfile) == 0) title = g_strdup ("GPSK31 - Preferences"); else title = g_strdup_printf ("GPSK31 - Preferences - %s", configfile); GtkWidget *window = gtk_dialog_new_with_buttons (title, GTK_WINDOW(main_screen.window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); g_free (title); GtkWidget *hbox = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(window)->vbox), hbox); GtkListStore *store = gtk_list_store_new (1, G_TYPE_STRING); GtkWidget *treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store)); g_object_unref (G_OBJECT (store)); gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview), FALSE); GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); GtkTreeViewColumn *column = gtk_tree_view_column_new_with_attributes ("", renderer, "text", 0, NULL); gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN(column), GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_resizable (GTK_TREE_VIEW_COLUMN(column), TRUE); gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN(column), 130); gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); GtkTreeIter iter; gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, "Modem", -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, "Options", -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, "TX window", -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, "RX window", -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, "Phase scope", -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, "Spectrum/Waterfall", -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, "Devices", -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, "Personal", -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, "F1 - F8", -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, "Shift F1 - F8", -1); gtk_container_add (GTK_CONTAINER (hbox), treeview); GtkWidget *vsep = gtk_vseparator_new (); gtk_container_add (GTK_CONTAINER(hbox), vsep); GtkWidget *notebook = gtk_notebook_new (); gtk_container_add (GTK_CONTAINER(hbox), notebook); gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE); /* add callback for selecting a row */ GObject *selection = G_OBJECT (gtk_tree_view_get_selection(GTK_TREE_VIEW (treeview))); gtk_tree_selection_set_mode (GTK_TREE_SELECTION (selection), GTK_SELECTION_SINGLE); g_signal_connect (selection, "changed", G_CALLBACK (on_config_page_select), notebook); /* Modem */ GtkWidget *vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (notebook), vbox); GtkWidget *label = gtk_label_new ("The settings on this page require a restart"); gtk_container_add (GTK_CONTAINER (vbox), label); GtkWidget *hsep = gtk_hseparator_new (); gtk_container_add (GTK_CONTAINER (vbox), hsep); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); label = gtk_label_new ("Modem frequency"); gtk_container_add (GTK_CONTAINER (hbox), label); GtkWidget *freqspin = gtk_spin_button_new_with_range (800, 1200, 1); gtk_spin_button_set_value (GTK_SPIN_BUTTON (freqspin), ini_settings.freq); gtk_container_add (GTK_CONTAINER (hbox), freqspin); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); label = gtk_label_new ("DCD level"); gtk_container_add (GTK_CONTAINER (hbox), label); GtkWidget *dcdspin = gtk_spin_button_new_with_range (0, 30, 1); gtk_spin_button_set_value (GTK_SPIN_BUTTON (dcdspin), ini_settings.dcd_level); gtk_container_add (GTK_CONTAINER (hbox), dcdspin); GtkWidget *lsbcheck = gtk_check_button_new_with_label ("Use LSB for qpsk"); hbox = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); gtk_box_pack_start (GTK_BOX (hbox), lsbcheck, TRUE, FALSE, 100); if (ini_settings.lsb == 1) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (lsbcheck), TRUE); else gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (lsbcheck), FALSE); /* Options */ vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (notebook), vbox); label = gtk_label_new ("The settings on this page require a restart"); gtk_container_add (GTK_CONTAINER (vbox), label); hsep = gtk_hseparator_new (); gtk_container_add (GTK_CONTAINER (vbox), hsep); GtkWidget *newrxcheck = gtk_check_button_new_with_label ("Use new demodulator/rx filter"); hbox = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); gtk_box_pack_start (GTK_BOX (hbox), newrxcheck, TRUE, FALSE, 100); if (ini_settings.new_rx == 1) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (newrxcheck), TRUE); else gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (newrxcheck), FALSE); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); label = gtk_label_new ("Filename for the log"); gtk_container_add (GTK_CONTAINER (hbox), label); GtkWidget *logentry = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), logentry); gtk_entry_set_text (GTK_ENTRY(logentry), ini_settings.log_filename); GtkWidget *xlogautocheck = gtk_check_button_new_with_label ("Ask xlog to fill in the current\nfrequency when logging"); hbox = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); gtk_box_pack_start (GTK_BOX (hbox), xlogautocheck, TRUE, FALSE, 100); if (ini_settings.xlog_auto_freq == 1) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (xlogautocheck), TRUE); else gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (xlogautocheck), FALSE); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); label = gtk_label_new ("TCP port to listen for rx/tx data\n(set to zero to disable)"); gtk_container_add (GTK_CONTAINER (hbox), label); GtkWidget *tcpportentry = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), tcpportentry); gchar *portstr = g_strdup_printf ("%d", ini_settings.tcp_listen_port); gtk_entry_set_text (GTK_ENTRY(tcpportentry), portstr); g_free (portstr); /* TX window */ vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (notebook), vbox); label = gtk_label_new ("Text color to use for the TX window"); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 0); gdk_color_parse (ini_settings.tx_window_color, &color); if (!gdk_colormap_alloc_color (cmap, &color, TRUE, TRUE)) { g_error ("Couldn't allocate color"); } GtkWidget *txwindowcolorbutton = gtk_color_button_new_with_color (&color); gtk_box_pack_start (GTK_BOX (vbox), txwindowcolorbutton, TRUE, FALSE, 0); label = gtk_label_new ("Font to use for the TX window"); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 0); GtkWidget *txwindowfontbutton = gtk_font_button_new_with_font (ini_settings.tx_window_font); gtk_box_pack_start (GTK_BOX (vbox), txwindowfontbutton, TRUE, FALSE, 0); /* RX window */ vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (notebook), vbox); label = gtk_label_new ("Color to use for received text in the RX window"); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 0); gdk_color_parse (ini_settings.rx_window_color_rx, &color); if (!gdk_colormap_alloc_color (cmap, &color, TRUE, TRUE)) { g_error ("Couldn't allocate color"); } GtkWidget *rxwindowrxcolorbutton = gtk_color_button_new_with_color (&color); gtk_box_pack_start (GTK_BOX (vbox), rxwindowrxcolorbutton, TRUE, FALSE, 0); label = gtk_label_new ("Color to use for transmitted text in the RX window"); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 0); gdk_color_parse (ini_settings.rx_window_color_tx, &color); if (!gdk_colormap_alloc_color (cmap, &color, TRUE, TRUE)) { g_error ("Couldn't allocate color"); } GtkWidget *rxwindowtxcolorbutton = gtk_color_button_new_with_color (&color); gtk_box_pack_start (GTK_BOX (vbox), rxwindowtxcolorbutton, TRUE, FALSE, 0); label = gtk_label_new ("Font to use for the RX window"); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 0); GtkWidget *rxwindowfontbutton = gtk_font_button_new_with_font (ini_settings.rx_window_font); gtk_box_pack_start (GTK_BOX (vbox), rxwindowfontbutton, TRUE, FALSE, 0); /* Phase scope */ vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (notebook), vbox); label = gtk_label_new ("Color to use for DCD on"); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 0); gdk_color_parse (ini_settings.phase_scope_dcd_on_color, &color); if (!gdk_colormap_alloc_color (cmap, &color, TRUE, TRUE)) { g_error ("Couldn't allocate color"); } GtkWidget *dcd_oncolorbutton = gtk_color_button_new_with_color (&color); gtk_box_pack_start (GTK_BOX (vbox), dcd_oncolorbutton, TRUE, FALSE, 0); label = gtk_label_new ("Color to use for DCD off"); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 0); gdk_color_parse (ini_settings.phase_scope_dcd_off_color, &color); if (!gdk_colormap_alloc_color (cmap, &color, TRUE, TRUE)) { g_error ("Couldn't allocate color"); } GtkWidget *dcd_offcolorbutton = gtk_color_button_new_with_color (&color); gtk_box_pack_start (GTK_BOX (vbox), dcd_offcolorbutton, TRUE, FALSE, 0); label = gtk_label_new ("Color to use for phase scope arc"); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 0); gdk_color_parse (ini_settings.phase_scope_arc_color, &color); if (!gdk_colormap_alloc_color (cmap, &color, TRUE, TRUE)) { g_error ("Couldn't allocate color"); } GtkWidget *arccolorbutton = gtk_color_button_new_with_color (&color); gtk_box_pack_start (GTK_BOX (vbox), arccolorbutton, TRUE, FALSE, 0); /* Spectrum/Waterfall */ vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (notebook), vbox); label = gtk_label_new ("Color of the spectrum display"); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 0); gdk_color_parse (ini_settings.spectrum_color, &color); if (!gdk_colormap_alloc_color (cmap, &color, TRUE, TRUE)) { g_error ("Couldn't allocate color"); } GtkWidget *spectrumcolorbutton = gtk_color_button_new_with_color (&color); gtk_box_pack_start (GTK_BOX (vbox), spectrumcolorbutton, TRUE, FALSE, 0); label = gtk_label_new ("Color of the spectrum and waterfall tune line"); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 0); gdk_color_parse (ini_settings.spectrum_tune_line_color, &color); if (!gdk_colormap_alloc_color (cmap, &color, TRUE, TRUE)) { g_error ("Couldn't allocate color"); } GtkWidget *spectrumtunelinecolorbutton = gtk_color_button_new_with_color (&color); gtk_box_pack_start (GTK_BOX (vbox), spectrumtunelinecolorbutton, TRUE, FALSE, 0); label = gtk_label_new ("Color of the spectrum and waterfall center frequency"); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 0); gdk_color_parse (ini_settings.spectrum_center_line_color, &color); if (!gdk_colormap_alloc_color (cmap, &color, TRUE, TRUE)) { g_error ("Couldn't allocate color"); } GtkWidget *spectrumcenterlinecolorbutton = gtk_color_button_new_with_color (&color); gtk_box_pack_start (GTK_BOX (vbox), spectrumcenterlinecolorbutton, TRUE, FALSE, 0); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); label = gtk_label_new ("Spectrum/Waterfall bandwidth\n(requires restart)"); gtk_container_add (GTK_CONTAINER (hbox), label); GtkWidget *bwcombo = gtk_combo_box_new_text (); gtk_combo_box_append_text (GTK_COMBO_BOX(bwcombo), "Small"); gtk_combo_box_append_text (GTK_COMBO_BOX(bwcombo), "Normal"); gtk_combo_box_append_text (GTK_COMBO_BOX(bwcombo), "Wide"); gtk_combo_box_set_active (GTK_COMBO_BOX(bwcombo), ini_settings.spectrum_width); gtk_container_add (GTK_CONTAINER (hbox), bwcombo); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); label = gtk_label_new ("Spectrum/Waterfall speed\n(requires restart)"); gtk_container_add (GTK_CONTAINER (hbox), label); GtkWidget *speedspin = gtk_spin_button_new_with_range (1, 500, 1); gtk_spin_button_set_value (GTK_SPIN_BUTTON (speedspin), ini_settings.spectrum_speed); gtk_container_add (GTK_CONTAINER (hbox), speedspin); /* Devices */ vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (notebook), vbox); label = gtk_label_new ("The settings on this page require a restart"); gtk_container_add (GTK_CONTAINER (vbox), label); hsep = gtk_hseparator_new (); gtk_container_add (GTK_CONTAINER (vbox), hsep); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); label = gtk_label_new ("Device for PTT\n(leave empty when\nyou don't use PTT)"); gtk_container_add (GTK_CONTAINER (hbox), label); GtkWidget *pttentry = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), pttentry); gtk_entry_set_text (GTK_ENTRY(pttentry), ini_settings.ptt_device); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); label = gtk_label_new ("Audio device"); gtk_container_add (GTK_CONTAINER (hbox), label); GtkWidget *audioentry = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), audioentry); gtk_entry_set_text (GTK_ENTRY(audioentry), ini_settings.audio_device); /* Personal */ vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (notebook), vbox); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); label = gtk_label_new ("Name"); gtk_container_add (GTK_CONTAINER (hbox), label); GtkWidget *nameentry = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), nameentry); gtk_entry_set_text (GTK_ENTRY(nameentry), ini_settings.name); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); label = gtk_label_new ("QTH"); gtk_container_add (GTK_CONTAINER (hbox), label); GtkWidget *qthentry = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), qthentry); gtk_entry_set_text (GTK_ENTRY(qthentry), ini_settings.qth); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); label = gtk_label_new ("Call"); gtk_container_add (GTK_CONTAINER (hbox), label); GtkWidget *callentry = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), callentry); gtk_entry_set_text (GTK_ENTRY(callentry), ini_settings.call); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); label = gtk_label_new ("String for CW ID"); gtk_container_add (GTK_CONTAINER (hbox), label); GtkWidget *cwentry = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), cwentry); gtk_entry_set_text (GTK_ENTRY(cwentry), ini_settings.cw_string); /* F1-F8 */ vbox = gtk_vbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (notebook), vbox); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); label = gtk_label_new ("Label"); gtk_container_add (GTK_CONTAINER (hbox), label); label = gtk_label_new ("Text"); gtk_container_add (GTK_CONTAINER (hbox), label); hsep = gtk_hseparator_new (); gtk_container_add (GTK_CONTAINER (vbox), hsep); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); GtkWidget *F1label = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), F1label); gtk_entry_set_text (GTK_ENTRY(F1label), ini_settings.label[0]); GtkWidget *F1text = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), F1text); gtk_entry_set_text (GTK_ENTRY(F1text), ini_settings.text[0]); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); GtkWidget *F2label = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), F2label); gtk_entry_set_text (GTK_ENTRY(F2label), ini_settings.label[1]); GtkWidget *F2text = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), F2text); gtk_entry_set_text (GTK_ENTRY(F2text), ini_settings.text[1]); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); GtkWidget *F3label = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), F3label); gtk_entry_set_text (GTK_ENTRY(F3label), ini_settings.label[2]); GtkWidget *F3text = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), F3text); gtk_entry_set_text (GTK_ENTRY(F3text), ini_settings.text[2]); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); GtkWidget *F4label = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), F4label); gtk_entry_set_text (GTK_ENTRY(F4label), ini_settings.label[3]); GtkWidget *F4text = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), F4text); gtk_entry_set_text (GTK_ENTRY(F4text), ini_settings.text[3]); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); GtkWidget *F5label = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), F5label); gtk_entry_set_text (GTK_ENTRY(F5label), ini_settings.label[4]); GtkWidget *F5text = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), F5text); gtk_entry_set_text (GTK_ENTRY(F5text), ini_settings.text[4]); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); GtkWidget *F6label = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), F6label); gtk_entry_set_text (GTK_ENTRY(F6label), ini_settings.label[5]); GtkWidget *F6text = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), F6text); gtk_entry_set_text (GTK_ENTRY(F6text), ini_settings.text[5]); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); GtkWidget *F7label = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), F7label); gtk_entry_set_text (GTK_ENTRY(F7label), ini_settings.label[6]); GtkWidget *F7text = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), F7text); gtk_entry_set_text (GTK_ENTRY(F7text), ini_settings.text[6]); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); GtkWidget *F8label = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), F8label); gtk_entry_set_text (GTK_ENTRY(F8label), ini_settings.label[7]); GtkWidget *F8text = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), F8text); gtk_entry_set_text (GTK_ENTRY(F8text), ini_settings.text[7]); /* SHIFT F1-F8 */ vbox = gtk_vbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (notebook), vbox); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); label = gtk_label_new ("Label"); gtk_container_add (GTK_CONTAINER (hbox), label); label = gtk_label_new ("Text"); gtk_container_add (GTK_CONTAINER (hbox), label); hsep = gtk_hseparator_new (); gtk_container_add (GTK_CONTAINER (vbox), hsep); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); GtkWidget *shiftF1label = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), shiftF1label); gtk_entry_set_text (GTK_ENTRY(shiftF1label), ini_settings.label[8]); GtkWidget *shiftF1text = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), shiftF1text); gtk_entry_set_text (GTK_ENTRY(shiftF1text), ini_settings.text[8]); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); GtkWidget *shiftF2label = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), shiftF2label); gtk_entry_set_text (GTK_ENTRY(shiftF2label), ini_settings.label[9]); GtkWidget *shiftF2text = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), shiftF2text); gtk_entry_set_text (GTK_ENTRY(shiftF2text), ini_settings.text[9]); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); GtkWidget *shiftF3label = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), shiftF3label); gtk_entry_set_text (GTK_ENTRY(shiftF3label), ini_settings.label[10]); GtkWidget *shiftF3text = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), shiftF3text); gtk_entry_set_text (GTK_ENTRY(shiftF3text), ini_settings.text[10]); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); GtkWidget *shiftF4label = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), shiftF4label); gtk_entry_set_text (GTK_ENTRY(shiftF4label), ini_settings.label[11]); GtkWidget *shiftF4text = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), shiftF4text); gtk_entry_set_text (GTK_ENTRY(shiftF4text), ini_settings.text[11]); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); GtkWidget *shiftF5label = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), shiftF5label); gtk_entry_set_text (GTK_ENTRY(shiftF5label), ini_settings.label[12]); GtkWidget *shiftF5text = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), shiftF5text); gtk_entry_set_text (GTK_ENTRY(shiftF5text), ini_settings.text[12]); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); GtkWidget *shiftF6label = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), shiftF6label); gtk_entry_set_text (GTK_ENTRY(shiftF6label), ini_settings.label[13]); GtkWidget *shiftF6text = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), shiftF6text); gtk_entry_set_text (GTK_ENTRY(shiftF6text), ini_settings.text[13]); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); GtkWidget *shiftF7label = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), shiftF7label); gtk_entry_set_text (GTK_ENTRY(shiftF7label), ini_settings.label[14]); GtkWidget *shiftF7text = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), shiftF7text); gtk_entry_set_text (GTK_ENTRY(shiftF7text), ini_settings.text[14]); hbox = gtk_hbox_new (TRUE, 0); gtk_container_add (GTK_CONTAINER (vbox), hbox); GtkWidget *shiftF8label = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), shiftF8label); gtk_entry_set_text (GTK_ENTRY(shiftF8label), ini_settings.label[15]); GtkWidget *shiftF8text = gtk_entry_new (); gtk_container_add (GTK_CONTAINER (hbox), shiftF8text); gtk_entry_set_text (GTK_ENTRY(shiftF8text), ini_settings.text[15]); gtk_widget_show_all (window); gint response = gtk_dialog_run (GTK_DIALOG(window)); if (response == GTK_RESPONSE_OK) { /* Modem */ ini_settings.freq = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(freqspin)); ini_settings.dcd_level = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(dcdspin)); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (lsbcheck))) ini_settings.lsb = 1; else ini_settings.lsb = 0; /* Options */ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (newrxcheck))) ini_settings.new_rx = 1; else ini_settings.new_rx = 0; const gchar *logname = gtk_entry_get_text (GTK_ENTRY(logentry)); if (strlen(logname) > 0) ini_settings.log_filename = g_strdup (logname); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (xlogautocheck))) ini_settings.xlog_auto_freq = 1; else ini_settings.xlog_auto_freq = 0; const gchar *tcpport = gtk_entry_get_text (GTK_ENTRY(tcpportentry)); if (strlen(tcpport) > 0) ini_settings.tcp_listen_port = atoi (tcpport); /* TX window */ gtk_color_button_get_color (GTK_COLOR_BUTTON(txwindowcolorbutton), &color); ini_settings.tx_window_color = g_strdup_printf ("#%02x%02x%02x", color.red >> 8, color.green >> 8, color.blue >> 8); const gchar *temp = gtk_font_button_get_font_name (GTK_FONT_BUTTON(txwindowfontbutton)); ini_settings.tx_window_font = g_strdup (temp); /* tx colors and font */ GtkTextBuffer *txbuffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (main_screen.txwindow)); highlight.tx = g_strdup_printf ("%d", rand ()); gtk_text_buffer_create_tag (txbuffer, highlight.tx, "foreground", ini_settings.tx_window_color, NULL); PangoFontDescription *txfont = pango_font_description_from_string (ini_settings.tx_window_font); gtk_widget_modify_font (main_screen.txwindow, txfont); pango_font_description_free(txfont); /* RX window */ gtk_color_button_get_color (GTK_COLOR_BUTTON(rxwindowrxcolorbutton), &color); ini_settings.rx_window_color_rx = g_strdup_printf ("#%02x%02x%02x", color.red >> 8, color.green >> 8, color.blue >> 8); gtk_color_button_get_color (GTK_COLOR_BUTTON(rxwindowtxcolorbutton), &color); ini_settings.rx_window_color_tx = g_strdup_printf ("#%02x%02x%02x", color.red >> 8, color.green >> 8, color.blue >> 8); temp = gtk_font_button_get_font_name (GTK_FONT_BUTTON(rxwindowfontbutton)); ini_settings.rx_window_font = g_strdup (temp); /* rx colors and font */ GtkTextBuffer *rxbuffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (main_screen.rxwindow)); highlight.rxrx = g_strdup_printf ("%d", rand ()); gtk_text_buffer_create_tag (rxbuffer, highlight.rxrx, "foreground", ini_settings.rx_window_color_rx, NULL); highlight.rxtx = g_strdup_printf ("%d", rand ()); gtk_text_buffer_create_tag (rxbuffer, highlight.rxtx, "foreground", ini_settings.rx_window_color_rx, NULL); PangoFontDescription *rxfont = pango_font_description_from_string (ini_settings.rx_window_font); gtk_widget_modify_font (main_screen.rxwindow, rxfont); pango_font_description_free(rxfont); /* Phase scope */ gtk_color_button_get_color (GTK_COLOR_BUTTON(dcd_oncolorbutton), &color); ini_settings.phase_scope_dcd_on_color = g_strdup_printf ("#%02x%02x%02x", color.red >> 8, color.green >> 8, color.blue >> 8); gtk_color_button_get_color (GTK_COLOR_BUTTON(dcd_offcolorbutton), &color); ini_settings.phase_scope_dcd_off_color = g_strdup_printf ("#%02x%02x%02x", color.red >> 8, color.green >> 8, color.blue >> 8); gtk_color_button_get_color (GTK_COLOR_BUTTON(arccolorbutton), &color); ini_settings.phase_scope_arc_color = g_strdup_printf ("#%02x%02x%02x", color.red >> 8, color.green >> 8, color.blue >> 8); phase_scope_init (); draw_arc (); /* Spectrum */ gtk_color_button_get_color (GTK_COLOR_BUTTON(spectrumcolorbutton), &color); ini_settings.spectrum_color = g_strdup_printf ("#%02x%02x%02x", color.red >> 8, color.green >> 8, color.blue >> 8); gtk_color_button_get_color (GTK_COLOR_BUTTON(spectrumtunelinecolorbutton), &color); ini_settings.spectrum_tune_line_color = g_strdup_printf ("#%02x%02x%02x", color.red >> 8, color.green >> 8, color.blue >> 8); gtk_color_button_get_color (GTK_COLOR_BUTTON(spectrumcenterlinecolorbutton), &color); ini_settings.spectrum_center_line_color = g_strdup_printf ("#%02x%02x%02x", color.red >> 8, color.green >> 8, color.blue >> 8); ini_settings.spectrum_width = gtk_combo_box_get_active (GTK_COMBO_BOX(bwcombo)); ini_settings.spectrum_speed = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(speedspin)); spectrum_setup (); /* Devices */ const gchar *pttname = gtk_entry_get_text (GTK_ENTRY(pttentry)); ini_settings.ptt_device = g_strdup (pttname); const gchar *audioname = gtk_entry_get_text (GTK_ENTRY(audioentry)); ini_settings.audio_device = g_strdup (audioname); /* Personal */ const gchar *name = gtk_entry_get_text (GTK_ENTRY(nameentry)); ini_settings.name = g_strdup (name); const gchar *qth = gtk_entry_get_text (GTK_ENTRY(qthentry)); ini_settings.qth = g_strdup (qth); const gchar *call = gtk_entry_get_text (GTK_ENTRY(callentry)); ini_settings.call = g_strdup (call); const gchar *cw_string = gtk_entry_get_text (GTK_ENTRY(cwentry)); ini_settings.cw_string = g_strdup (cw_string); /* F1-F8 */ const char *str = gtk_entry_get_text (GTK_ENTRY(F1label)); ini_settings.label[0] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(F1text)); ini_settings.text[0] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(F2label)); ini_settings.label[1] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(F2text)); ini_settings.text[1] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(F3label)); ini_settings.label[2] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(F3text)); ini_settings.text[2] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(F4label)); ini_settings.label[3] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(F4text)); ini_settings.text[3] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(F5label)); ini_settings.label[4] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(F5text)); ini_settings.text[4] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(F6label)); ini_settings.label[5] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(F6text)); ini_settings.text[5] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(F7label)); ini_settings.label[6] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(F7text)); ini_settings.text[6] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(F8label)); ini_settings.label[7] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(F8text)); ini_settings.text[7] = g_strdup (str); /* SHIFT F1-F8 */ str = gtk_entry_get_text (GTK_ENTRY(shiftF1label)); ini_settings.label[8] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(shiftF1text)); ini_settings.text[8] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(shiftF2label)); ini_settings.label[9] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(shiftF2text)); ini_settings.text[9] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(shiftF3label)); ini_settings.label[10] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(shiftF3text)); ini_settings.text[10] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(shiftF4label)); ini_settings.label[11] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(shiftF4text)); ini_settings.text[11] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(shiftF5label)); ini_settings.label[12] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(shiftF5text)); ini_settings.text[12] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(shiftF6label)); ini_settings.label[13] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(shiftF6text)); ini_settings.text[13] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(shiftF7label)); ini_settings.label[14] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(shiftF7text)); ini_settings.text[14] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(shiftF8label)); ini_settings.label[15] = g_strdup (str); str = gtk_entry_get_text (GTK_ENTRY(shiftF8text)); ini_settings.text[15] = g_strdup (str); } gtk_widget_destroy (window); } /* This unchecks the qso_details_menu */ void check_menu(const char *path, int state) { GtkWidget *item = gtk_ui_manager_get_widget (ui_manager, path); gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(item), state); } /* * This functions sends the info entered in the qso details dialog */ void send_call () { commPutData (qsodata.call, -1); put_tx_window (qsodata.call); } void send_name () { commPutData (qsodata.name, -1); put_tx_window (qsodata.name); } void send_qth () { commPutData (qsodata.qth, -1); put_tx_window (qsodata.qth); } void send_rsts () { commPutData (qsodata.rst_s, -1); put_tx_window (qsodata.rst_s); } void send_rstr () { commPutData (qsodata.rst_r, -1); put_tx_window (qsodata.rst_r); } void send_frequency () { commPutData (qsodata.freq, -1); put_tx_window (qsodata.freq); } void send_mycall () { commPutData (ini_settings.call, -1); put_tx_window (ini_settings.call); } void send_myqth () { commPutData (ini_settings.qth, -1); put_tx_window (ini_settings.qth); } void send_myname () { commPutData (ini_settings.name, -1); put_tx_window (ini_settings.name); } const char *trx_get_mode_name(void) { return trx_mode_names[mode]; } void mode_qpsk_toggled () { if (GTK_CHECK_MENU_ITEM (gtk_ui_manager_get_widget (ui_manager, "/MainMenu/ModeMenu/QPSK"))->active) { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (main_screen.mode_qpsk), TRUE); mode = QPSK31; } else { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (main_screen.mode_qpsk), FALSE); mode = BPSK31; } } void mode_afc_toggled () { if (GTK_CHECK_MENU_ITEM (gtk_ui_manager_get_widget (ui_manager, "/MainMenu/ModeMenu/AFC"))->active) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (main_screen.afc), TRUE); else gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (main_screen.afc), FALSE); } void mode_net_toggled () { if (GTK_CHECK_MENU_ITEM (gtk_ui_manager_get_widget (ui_manager, "/MainMenu/ModeMenu/NET"))->active) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (main_screen.net), TRUE); else gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (main_screen.net), FALSE); } void mode_cwid_toggled () { if (GTK_CHECK_MENU_ITEM (gtk_ui_manager_get_widget (ui_manager, "/MainMenu/ModeMenu/CW_ID"))->active) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (main_screen.cwid), TRUE); else gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (main_screen.cwid), FALSE); } gpsk31-0.5/src/text.C0000644000175000017500000000522711031177040011266 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* * text.C functions for the text widgets on the main window */ #include #include "text.h" #include "globals.h" #include #include /* * This functions adds an character to the rx window */ void put_rx_window (const gchar *text, gint txstate) { GtkTextBuffer *buffer; GtkTextIter end; GtkTextMark *mark; GError *err = NULL; const gchar *from="UTF-8"; const gchar *to="ISO-8859-1"; gchar *ch = g_strdup ("."); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (main_screen.rxwindow)); gtk_text_buffer_get_end_iter (buffer, &end); gtk_text_buffer_place_cursor (buffer, &end); gchar *buf = g_convert_with_fallback (text, -1, from, to, ch, NULL, NULL, &err); if (!buf || err) return; if (txstate == 1) { gtk_text_buffer_insert_with_tags_by_name (buffer, &end, buf, -1, highlight.rxtx, NULL); } else { gtk_text_buffer_insert_with_tags_by_name (buffer, &end, buf, -1, highlight.rxrx, NULL); } mark = gtk_text_buffer_get_mark (buffer, "insert"); gtk_text_view_scroll_to_mark (GTK_TEXT_VIEW(main_screen.rxwindow), mark, 0.0, FALSE, 0.0, 1.0); } /* * Put a char in the tx window */ void put_tx_window (const gchar *text) { GtkTextBuffer *buffer; GtkTextIter iter, end; GtkTextMark *mark; buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (main_screen.txwindow)); gtk_text_buffer_get_end_iter (buffer, &end); gtk_text_buffer_get_end_iter (buffer, &iter); gtk_text_iter_backward_chars (&iter, 1); gtk_text_buffer_delete (buffer, &iter, &end); gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, text, -1, "tx_window_color", NULL); mark = gtk_text_buffer_get_mark (buffer, "insert"); gtk_text_view_scroll_to_mark (GTK_TEXT_VIEW(main_screen.txwindow), mark, 0.0, FALSE, 0.0, 1.0); } gpsk31-0.5/src/log.C0000644000175000017500000000713211031177035011064 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* * log.c - functions to log the data to xlog, mostly taken from gmfsk * */ #include #include #include #include #include #include #include #include "log.h" #include "globals.h" #include "menu.h" #define LOG_MVERSION "1" #define LOG_MKEY 1238 #define LOG_MTYPE 88 #define LOG_MSEPARATOR 1 #define LOG_MSG_LEN 1024 typedef struct { long mtype; char mtext[LOG_MSG_LEN]; } msgtype; static msgtype msgbuf; time_t starttime = 0; static void log_msg_reset(void) { msgbuf.mtext[0] = 0; } static void log_msg_append(const gchar *type, const gchar *data) { gchar *entry; entry = g_strdup_printf("%s:%s%c", type, data, LOG_MSEPARATOR); if (strlen(msgbuf.mtext) + strlen(entry) + 1 > LOG_MSG_LEN) { g_warning("log message too long, entry dropped: %s\n", entry); g_free(entry); return; } strcat(msgbuf.mtext, entry); g_free(entry); } static int log_msg_send(void) { gint msqid, len; if ((msqid = msgget(LOG_MKEY, 0666 | IPC_CREAT)) == -1) { g_print("msgget: %s\n", strerror(errno)); return -1; } msgbuf.mtype = LOG_MTYPE; /* allow for the NUL */ len = strlen(msgbuf.mtext) + 1; if (msgsnd(msqid, &msgbuf, len, IPC_NOWAIT) < 0) { g_print("msgsnd: %m\n"); return -1; } #if 0 g_print("msg sent: (%02ld) '%s'\n", msgbuf.mtype, msgbuf.mtext); #endif return 0; } void qsodata_log(void) { char date[32], stime[32], etime[32], *message; const char *mode; struct tm *tm; time_t t; tm = gmtime (&starttime); strftime (date, sizeof(date), "%d %b %Y", tm); strftime (stime, sizeof(stime), "%H%M", tm); time (&t); tm = gmtime (&t); strftime (etime, sizeof(etime), "%H%M", tm); mode = trx_get_mode_name(); /* freq field empty & shall xlog fill in frequency */ if (ini_settings.xlog_auto_freq) { if (g_ascii_strcasecmp (qsodata.freq, "") == 0) { strcpy(qsodata.freq, "HAMLIB"); } } log_msg_reset(); log_msg_append("program", "gpsk31 v" VERSION); log_msg_append("version", LOG_MVERSION); log_msg_append("date", date); log_msg_append("time", stime); log_msg_append("endtime", etime); log_msg_append("call", qsodata.call); log_msg_append("mhz", qsodata.freq); log_msg_append("mode", mode); log_msg_append("tx", qsodata.rst_s); log_msg_append("rx", qsodata.rst_r); log_msg_append("name", qsodata.name); log_msg_append("qth", qsodata.qth); log_msg_append("notes", qsodata.notes); message = g_strdup_printf ("%s logged", qsodata.call); gtk_statusbar_pop (GTK_STATUSBAR (statusbar.logged), 1); gtk_statusbar_push (GTK_STATUSBAR (statusbar.logged), 1, message); g_free (message); log_msg_send(); } gpsk31-0.5/src/call_dialog.C0000644000175000017500000003165011031177034012536 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2008 Thomas Ries * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ /* * call_dialog.c - Functions for the QSO Data Window */ #include #include #include #include #include "main_screen.h" #include "misc.h" #include "call_dialog.h" #include "menu.h" #include "globals.h" #include "log.h" #include "support.h" extern int shift_key_down; /* is shift-key pressed? */ static int x=-1,y=-1; /* The Position of the dialog */ struct qsodata qsodata; struct qso_dialog qso_dialog; extern time_t starttime; /* Will be called when we hit a key in the Call Dialog */ gboolean call_dialog_key_input (GtkWidget * widget, GdkEventKey * event) { int state; gint key; state = event->state; key = event->keyval; if (state & GDK_MOD1_MASK) { // ALT-Key if (key == 'c' || key == 'C') gtk_widget_grab_focus (GTK_WIDGET (qso_dialog.call_text)); if (key == 'n' || key == 'N') gtk_widget_grab_focus (GTK_WIDGET (qso_dialog.name_text)); if (key == 'q' || key == 'Q') gtk_widget_grab_focus (GTK_WIDGET (qso_dialog.qth_text)); if (key == 's' || key == 'S') gtk_widget_grab_focus (GTK_WIDGET (qso_dialog.rst_s_text)); if (key == 'r' || key == 'R') gtk_widget_grab_focus (GTK_WIDGET (qso_dialog.rst_r_text)); if (key == 'o' || key == 'O') gtk_widget_grab_focus (GTK_WIDGET (qso_dialog.notes_text)); if (key == 'f' || key == 'F') gtk_widget_grab_focus (GTK_WIDGET (qso_dialog.freq_text)); if (key == 'h' || key == 'H') toggle_call_dialog (); if (key == 'l' || key == 'L') qsodata_log (); if (key == 'e' || key == 'E') clear_values (); // clear the current values from window } /* F-keys also active in QSO dialog window */ else if (event->keyval >= 65470 && event->keyval <= 65477) { // F1 <--> F8 //macro_to_send = event->keyval - 65469; /* check_autotx(); if ctrl-q pressed, it start to transmit. So by now it is disabled. */ gtk_button_clicked (GTK_BUTTON ( main_screen.f_button[event->keyval - 65470])); } else if (event->keyval >= 0xFD00 ) { /* special keys */ switch (event->keyval) { case 65505: case 65506: { // Shift key pushed set_button (1); shift_key_down = 1; break; } } } return FALSE; } // This will be called, when we release a key int call_dialog_key_released (GtkWidget * widget, GdkEventKey * event) { if (event->keyval == 65505 || event->keyval == 65506) { set_button (0); shift_key_down = 0; } return 0; } static void entry_changed (GtkEditable *editable, gpointer user_data) { set_values (); } void init_call_dialog () // This function inits the Dialog { GtkWidget *hbox; GtkWidget *vbox; GtkWidget *label; GtkWidget *separator; GtkWidget *table; GtkWidget *save_button; GtkWidget *ok_button; GtkWidget *clear_button; qso_dialog.window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (qso_dialog.window), "GPSK31 - QSO Details"); GdkPixbuf *pixbuf = create_pixbuf ("gpsk31.png"); if (pixbuf) { gtk_window_set_icon (GTK_WINDOW (qso_dialog.window), pixbuf); g_object_unref (pixbuf); } vbox = gtk_vbox_new (FALSE, 5); table = gtk_table_new (6, 4, FALSE); /* Create the Table with the text entry */ gtk_table_set_row_spacings (GTK_TABLE (table), 7); gtk_table_set_col_spacings (GTK_TABLE (table), 7); gtk_container_add (GTK_CONTAINER (qso_dialog.window), vbox); gtk_container_set_border_width (GTK_CONTAINER (qso_dialog.window), 7); label = gtk_label_new ("Call:"); gtk_label_set_pattern (GTK_LABEL (label), "_"); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); qso_dialog.call_text = gtk_entry_new (); gtk_entry_set_max_length (GTK_ENTRY(qso_dialog.call_text), 12); gtk_widget_set_size_request (GTK_WIDGET (qso_dialog.call_text), 90, -1); gtk_table_attach_defaults (GTK_TABLE (table), GTK_WIDGET (label), 0, 1, 0, 1); gtk_table_attach_defaults (GTK_TABLE (table), GTK_WIDGET (qso_dialog.call_text), 1, 3, 0, 1); label = gtk_label_new ("Name:"); gtk_label_set_pattern (GTK_LABEL (label), "_"); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); qso_dialog.name_text = gtk_entry_new (); gtk_entry_set_max_length (GTK_ENTRY(qso_dialog.name_text), 12); gtk_widget_set_size_request (GTK_WIDGET (qso_dialog.name_text), 160, -1); gtk_table_attach_defaults (GTK_TABLE (table), GTK_WIDGET (label), 0, 1, 1, 2); gtk_table_attach_defaults (GTK_TABLE (table), GTK_WIDGET (qso_dialog.name_text), 1, 4, 1, 2); label = gtk_label_new ("QTH:"); gtk_label_set_pattern (GTK_LABEL (label), "_"); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); qso_dialog.qth_text = gtk_entry_new (); gtk_entry_set_max_length (GTK_ENTRY(qso_dialog.qth_text), 25); gtk_widget_set_size_request (GTK_WIDGET (qso_dialog.qth_text), 160, -1); gtk_table_attach_defaults (GTK_TABLE (table), GTK_WIDGET (label), 0, 1, 2, 3); gtk_table_attach_defaults (GTK_TABLE (table), GTK_WIDGET (qso_dialog.qth_text), 1, 4, 2, 3); label = gtk_label_new ("RST S:"); qso_dialog.rst_s_text = gtk_entry_new (); gtk_entry_set_max_length (GTK_ENTRY(qso_dialog.rst_s_text), 8); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_pattern (GTK_LABEL (label), " _"); gtk_widget_set_size_request (GTK_WIDGET (qso_dialog.rst_s_text), 50, -1); gtk_table_attach_defaults (GTK_TABLE (table), GTK_WIDGET (label), 0, 1, 3, 4); gtk_table_attach_defaults (GTK_TABLE (table), GTK_WIDGET (qso_dialog.rst_s_text), 1, 2, 3, 4); label = gtk_label_new ("RST R:"); gtk_misc_set_alignment (GTK_MISC (label), 1, 0.5); qso_dialog.rst_r_text = gtk_entry_new (); gtk_entry_set_max_length (GTK_ENTRY(qso_dialog.rst_r_text), 8); gtk_label_set_pattern (GTK_LABEL (label), " _"); gtk_widget_set_size_request (GTK_WIDGET (qso_dialog.rst_r_text), 50, -1); gtk_table_attach_defaults (GTK_TABLE (table), GTK_WIDGET (label), 2, 3, 3, 4); gtk_table_attach_defaults (GTK_TABLE (table), GTK_WIDGET (qso_dialog.rst_r_text), 3, 4, 3, 4); label = gtk_label_new ("Notes:"); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); qso_dialog.notes_text = gtk_entry_new (); gtk_entry_set_max_length (GTK_ENTRY(qso_dialog.notes_text), 40); gtk_label_set_pattern (GTK_LABEL (label), " _"); gtk_widget_set_size_request (GTK_WIDGET (qso_dialog.notes_text), 160, -1); gtk_table_attach_defaults (GTK_TABLE (table), GTK_WIDGET (label), 0, 1, 4, 5); gtk_table_attach_defaults (GTK_TABLE (table), GTK_WIDGET (qso_dialog.notes_text), 1, 4, 4, 5); label = gtk_label_new ("Freq.:"); qso_dialog.freq_text = gtk_entry_new (); gtk_entry_set_max_length (GTK_ENTRY(qso_dialog.freq_text), 10); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_label_set_pattern (GTK_LABEL (label), "_"); gtk_widget_set_size_request (GTK_WIDGET (qso_dialog.freq_text), 50, -1); gtk_table_attach_defaults (GTK_TABLE (table), GTK_WIDGET (label), 0, 1, 5, 6); gtk_table_attach_defaults (GTK_TABLE (table), GTK_WIDGET (qso_dialog.freq_text), 1, 2, 5, 6); /* Put the table in the vbox */ gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (table), FALSE, FALSE, 0); /* Create a separator, and put it into the box */ separator = gtk_hseparator_new (); gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (separator), FALSE, FALSE, 3); /* Create the buttons of our dialog */ label = gtk_label_new ("Hide"); ok_button = gtk_button_new (); gtk_label_set_pattern (GTK_LABEL (label), "_"); gtk_container_add (GTK_CONTAINER (ok_button), label); label = gtk_label_new ("Xlog"); save_button = gtk_button_new (); gtk_label_set_pattern (GTK_LABEL (label), "_"); gtk_container_add (GTK_CONTAINER (save_button), label); label = gtk_label_new ("New"); clear_button = gtk_button_new (); gtk_label_set_pattern (GTK_LABEL (label), " _"); gtk_container_add (GTK_CONTAINER (clear_button), label); /* Generate an hbox for the Buttons, and put them into the box */ hbox = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (ok_button), TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (save_button), TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (clear_button), TRUE, TRUE, 0); /* Pack the hbox into the dialog */ gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (hbox), FALSE, FALSE, 5); /* Acivate the callsign entry */ gtk_widget_grab_focus (GTK_WIDGET (qso_dialog.call_text)); gtk_window_set_resizable (GTK_WINDOW (qso_dialog.window), FALSE); //// And Now the callbacks ///////////////////////////// g_signal_connect (G_OBJECT (qso_dialog.window), "key_press_event", G_CALLBACK (call_dialog_key_input), NULL); g_signal_connect (G_OBJECT (qso_dialog.window), "key_release_event", G_CALLBACK (call_dialog_key_released), NULL); g_signal_connect (G_OBJECT (qso_dialog.window), "delete_event", G_CALLBACK (toggle_call_dialog), NULL); g_signal_connect (G_OBJECT (ok_button), "clicked", G_CALLBACK (toggle_call_dialog), NULL); g_signal_connect (G_OBJECT (clear_button), "clicked", G_CALLBACK (clear_values), NULL); g_signal_connect (G_OBJECT (save_button), "clicked", G_CALLBACK (log_values), NULL); g_signal_connect ((gpointer)qso_dialog.call_text, "changed", G_CALLBACK(entry_changed), NULL); g_signal_connect ((gpointer)qso_dialog.name_text, "changed", G_CALLBACK(entry_changed), NULL); g_signal_connect ((gpointer)qso_dialog.qth_text, "changed", G_CALLBACK(entry_changed), NULL); g_signal_connect ((gpointer)qso_dialog.rst_s_text, "changed", G_CALLBACK(entry_changed), NULL); g_signal_connect ((gpointer)qso_dialog.rst_r_text, "changed", G_CALLBACK(entry_changed), NULL); g_signal_connect ((gpointer)qso_dialog.freq_text, "changed", G_CALLBACK(entry_changed), NULL); g_signal_connect ((gpointer)qso_dialog.notes_text, "changed", G_CALLBACK(entry_changed), NULL); } void log_values () { gint i; set_values (); i = 0; while (i <= 12) { qsodata.call[i] = toupper (qsodata.call[i]); ++i; } /* HB9XAR: set QSO time at registration of QSO */ time (&starttime); qsodata_log (); } void clear_values () // Clear the values { gtk_editable_delete_text (GTK_EDITABLE (qso_dialog.call_text), 0, -1); gtk_editable_delete_text (GTK_EDITABLE (qso_dialog.name_text), 0, -1); gtk_editable_delete_text (GTK_EDITABLE (qso_dialog.qth_text), 0, -1); gtk_editable_delete_text (GTK_EDITABLE (qso_dialog.rst_s_text), 0, -1); gtk_editable_delete_text (GTK_EDITABLE (qso_dialog.rst_r_text), 0, -1); gtk_editable_delete_text (GTK_EDITABLE (qso_dialog.freq_text), 0, -1); gtk_editable_delete_text (GTK_EDITABLE (qso_dialog.notes_text), 0, -1); time (&starttime); /* set the focus to the call entry */ gtk_widget_grab_focus (GTK_WIDGET (qso_dialog.call_text)); } void set_values () // Read the dialog, and set the Values { int n; char *s; strcpy (qsodata.call, gtk_entry_get_text (GTK_ENTRY (qso_dialog.call_text))); /* Call: convert to uppercase */ s=qsodata.call; n=strlen(s); while (n) { *s = g_ascii_toupper (*s); s++; n--; } strcpy (qsodata.name, gtk_entry_get_text (GTK_ENTRY (qso_dialog.name_text))); strcpy (qsodata.qth, gtk_entry_get_text (GTK_ENTRY (qso_dialog.qth_text))); strcpy (qsodata.rst_s, gtk_entry_get_text (GTK_ENTRY (qso_dialog.rst_s_text))); strcpy (qsodata.rst_r, gtk_entry_get_text (GTK_ENTRY (qso_dialog.rst_r_text))); strcpy (qsodata.notes, gtk_entry_get_text (GTK_ENTRY (qso_dialog.notes_text))); strcpy (qsodata.freq, gtk_entry_get_text (GTK_ENTRY (qso_dialog.freq_text))); } void toggle_call_dialog () { // The Dialog is Visible, we save the coordinates and hide it if (GTK_WIDGET_VISIBLE(qso_dialog.window)) { gdk_window_get_root_origin (qso_dialog.window->window, &x, &y); check_menu("/MainMenu/WindowMenu/Details", 0); gtk_widget_hide_all (qso_dialog.window); } else { if (x != -1 && y != -1) gtk_window_move (GTK_WINDOW (qso_dialog.window), x, y); time (&starttime); // Show the logbook entry gtk_widget_show_all (GTK_WIDGET (qso_dialog.window)); } } gpsk31-0.5/src/misc.h0000644000175000017500000000230111031177035011274 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ void init_text_color (); gint spectrum_motion_event (GtkWidget * widget, GdkEventMotion * event); gint display_time (gpointer data); gchar *get_time_string (gchar *format); void read_config (); void set_config (); void set_button (int x); gpsk31-0.5/src/spectrum.h0000644000175000017500000000241711031177040012207 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2000 Luc Langehegermann, LX2GT * Copyright (C) 2008 Thomas Ries * Copyright (C) 2005,2006,2007,2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ void spectrum_setup(); void fft_setup (int samps, int speed); float spectrum_new_fc (int x); void spectrum_updateFFT(float *val, int len); void spectrum_calc_power (float *buffer); void spectrum_draw_display (); void spectrum_offset (float freq); int getsamplecnt(); gpsk31-0.5/src/backtrace.C0000644000175000017500000000245511031177034012224 00000000000000/* * gpsk31 - PSK31 for Linux with a GTK+ Interface * * Copyright (C) 2008 Thomas Ries * Copyright (C) 2008 Joop Stakenborg * * 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 3 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, see . * * The main author can be reached at pg4i@amsat.org or by smail-mail: * Joop Stakenborg, Bramengaarde 24, 3992KG Houten, The Netherlands. * */ #include #include #include void show_stackframe() { void *trace[16]; char **messages = (char **)NULL; int i, trace_size = 0; trace_size = backtrace(trace, 16); messages = backtrace_symbols(trace, trace_size); printf("[bt] Execution path:\n"); for (i=0; i. */ #undef DGUX /* Define if you have . */ #undef DIRENT /* Define to the type of elements in the array set by `getgroups'. Usually this is either `int' or `gid_t'. */ #undef GETGROUPS_T /* Define if the `getloadavg' function needs to be run setuid or setgid. */ #undef GETLOADAVG_PRIVILEGED /* Define if the `getpgrp' function takes no argument. */ #undef GETPGRP_VOID /* Define to `int' if doesn't define. */ #undef gid_t /* Define if you have alloca, as a function or macro. */ #undef HAVE_ALLOCA /* Define if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define if you don't have vprintf but do have _doprnt. */ #undef HAVE_DOPRNT /* Define if your system has a working fnmatch function. */ #undef HAVE_FNMATCH /* Define if your system has its own `getloadavg' function. */ #undef HAVE_GETLOADAVG /* Define if you have the getmntent function. */ #undef HAVE_GETMNTENT /* Define if the `long double' type works. */ #undef HAVE_LONG_DOUBLE /* Define if you support file names longer than 14 characters. */ #undef HAVE_LONG_FILE_NAMES /* Define if you have a working `mmap' system call. */ #undef HAVE_MMAP /* Define if system calls automatically restart after interruption by a signal. */ #undef HAVE_RESTARTABLE_SYSCALLS /* Define if your struct stat has st_blksize. */ #undef HAVE_ST_BLKSIZE /* Define if your struct stat has st_blocks. */ #undef HAVE_ST_BLOCKS /* Define if you have the strcoll function and it is properly defined. */ #undef HAVE_STRCOLL /* Define if your struct stat has st_rdev. */ #undef HAVE_ST_RDEV /* Define if you have the strftime function. */ #undef HAVE_STRFTIME /* Define if you have the ANSI # stringizing operator in cpp. */ #undef HAVE_STRINGIZE /* Define if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define if your struct tm has tm_zone. */ #undef HAVE_TM_ZONE /* Define if you don't have tm_zone but do have the external array tzname. */ #undef HAVE_TZNAME /* Define if you have . */ #undef HAVE_UNISTD_H /* Define if utime(file, NULL) sets file's timestamp to the present. */ #undef HAVE_UTIME_NULL /* Define if you have . */ #undef HAVE_VFORK_H /* Define if you have the vprintf function. */ #undef HAVE_VPRINTF /* Define if you have the wait3 system call. */ #undef HAVE_WAIT3 /* Define as __inline if that's what the C compiler calls it. */ #undef inline /* Define if int is 16 bits instead of 32. */ #undef INT_16_BITS /* Define if long int is 64 bits. */ #undef LONG_64_BITS /* Define if major, minor, and makedev are declared in . */ #undef MAJOR_IN_MKDEV /* Define if major, minor, and makedev are declared in . */ #undef MAJOR_IN_SYSMACROS /* Define if on MINIX. */ #undef _MINIX /* Define to `int' if doesn't define. */ #undef mode_t /* Define if you don't have , but have . */ #undef NDIR /* Define if you have , and doesn't declare the mem* functions. */ #undef NEED_MEMORY_H /* Define if your struct nlist has an n_un member. */ #undef NLIST_NAME_UNION /* Define if you have . */ #undef NLIST_STRUCT /* Define if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* Define if your Fortran 77 compiler doesn't accept -c and -o together. */ #undef F77_NO_MINUS_C_MINUS_O /* Define to `long' if doesn't define. */ #undef off_t /* Define to `int' if doesn't define. */ #undef pid_t /* Define if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define if you need to in order for stat and other things to work. */ #undef _POSIX_SOURCE /* Define as the return type of signal handlers (int or void). */ #undef RETSIGTYPE /* Define to the type of arg1 for select(). */ #undef SELECT_TYPE_ARG1 /* Define to the type of args 2, 3 and 4 for select(). */ #undef SELECT_TYPE_ARG234 /* Define to the type of arg5 for select(). */ #undef SELECT_TYPE_ARG5 /* Define if the `setpgrp' function takes no argument. */ #undef SETPGRP_VOID /* Define if the setvbuf function takes the buffering type as its second argument and the buffer pointer as the third, as on System V before release 3. */ #undef SETVBUF_REVERSED /* Define to `unsigned' if doesn't define. */ #undef size_t /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define if the `S_IS*' macros in do not work properly. */ #undef STAT_MACROS_BROKEN /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define on System V Release 4. */ #undef SVR4 /* Define if you don't have , but have . */ #undef SYSDIR /* Define if you don't have , but have . */ #undef SYSNDIR /* Define if `sys_siglist' is declared by . */ #undef SYS_SIGLIST_DECLARED /* Define if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define if your declares struct tm. */ #undef TM_IN_SYS_TIME /* Define to `int' if doesn't define. */ #undef uid_t /* Define for Encore UMAX. */ #undef UMAX /* Define for Encore UMAX 4.3 that has instead of . */ #undef UMAX4_3 /* Define if you do not have , index, bzero, etc.. */ #undef USG /* Define vfork as fork if vfork does not work. */ #undef vfork /* Define if the closedir function returns void instead of int. */ #undef VOID_CLOSEDIR /* Define if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ #undef WORDS_BIGENDIAN /* Define if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Define if lex declares yytext as a char * by default, not a char[]. */ #undef YYTEXT_POINTER /* Define the DATE of our package */ #undef DATE /* Leave that blank line there!! Autoheader needs it. If you're adding to this file, keep in mind: The entries are in sort -df order: alphabetical, case insensitive, ignoring punctuation (such as underscores). */ gpsk31-0.5/psk31.cod0000644000175000017500000000525410350336635011051 000000000000001010101011 1011011011 1011101101 1101110111 1011101011 1101011111 1011101111 1011111101 1011111111 11101111 11101 1101101111 1011011101 11111 1101110101 1110101011 1011110111 1011110101 1110101101 1110101111 1101011011 1101101011 1101101101 1101010111 1101111011 1101111101 1110110111 1101010101 1101011101 1110111011 1011111011 1101111111 1 111111111 101011111 111110101 111011011 1011010101 1010111011 101111111 11111011 11110111 101101111 111011111 1110101 110101 1010111 110101111 10110111 10111101 11101101 11111111 101110111 101011011 101101011 110101101 110101011 110110111 11110101 110111101 111101101 1010101 111010111 1010101111 1010111101 1111101 11101011 10101101 10110101 1110111 11011011 11111101 101010101 1111111 111111101 101111101 11010111 10111011 11011101 10101011 11010101 111011101 10101111 1101111 1101101 101010111 110110101 101011101 101110101 101111011 1010101101 111110111 111101111 111111011 1010111111 101101101 1011011111 1011 1011111 101111 101101 11 111101 1011011 101011 1101 111101011 10111111 11011 111011 1111 111 111111 110111111 10101 10111 101 110111 1111011 1101011 11011111 1011101 111010101 1010110111 110111011 1010110101 1011010111 1110110101 1110111101 1110111111 1111010101 1111010111 1111011011 1111011101 1111011111 1111101011 1111101101 1111101111 1111110101 1111110111 1111111011 1111111101 1111111111 10101010101 10101010111 10101011011 10101011101 10101011111 10101101011 10101101101 10101101111 10101110101 10101110111 10101111011 10101111101 10101111111 10110101011 10110101101 10110101111 10110110101 10110110111 10110111011 10110111101 10110111111 10111010101 10111010111 10111011011 10111011101 10111011111 10111101011 10111101101 10111101111 10111110101 10111110111 10111111011 10111111101 10111111111 11010101011 11010101101 11010101111 11010110101 11010110111 11010111011 11010111101 11010111111 11011010101 11011010111 11011011011 11011011101 11011011111 11011101011 11011101101 11011101111 11011110101 11011110111 11011111011 11011111101 11011111111 11101010101 11101010111 11101011011 11101011101 11101011111 11101101011 11101101101 11101101111 11101110101 11101110111 11101111011 11101111101 11101111111 11110101011 11110101101 11110101111 11110110101 11110110111 11110111011 11110111101 11110111111 11111010101 11111010111 11111011011 11111011101 11111011111 11111101011 11111101101 11111101111 11111110101 11111110111 11111111011 11111111101 11111111111 101010101011 101010101101 101010101111 101010110101 101010110111 101010111011 101010111101 101010111111 101011010101 101011010111 101011011011 101011011101 101011011111 101011101011 101011101101 101011101111 101011110101 101011110111 101011111011 101011111101 101011111111 101101010101 101101010111 101101011011