- more cleanups to configure

- ptt_linux.c is no longer needed (replaced with generic ptt_unix.c)
- Makefile should be created from configure (and Makefile.in)



git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@59 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Diane Bruce 2006-01-07 21:24:49 +00:00
parent b6b89b6cd7
commit e59ac5dd3c
5 changed files with 36 additions and 124 deletions

View File

@ -1,78 +0,0 @@
#
# This part all goes away when configure is written
# working on it --db
#
CC ?= gcc
FC ?= f77
FFLAGS = -g -O2
#
# WSJT specific Fortran flags
FFLAGS += -Wall -fbounds-check
OS=FreeBSD
G95=/usr/local/bin/g95
COMPILER=/usr/local/lib/gcc-lib/i386-unknown-freebsd5.4/4.0.1/
#OS=Linux
#COMPILER=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/
PYTHON ?= /usr/local/bin/python
RM ?= /bin/rm
F2PY = /usr/local/bin/f2py
F2PY_PY = "f2py.py"
OBJS1 = JT65code.o nchar.o grid2deg.o packmsg.o packtext.o \
packcall.o packgrid.o unpackmsg.o unpacktext.o unpackcall.o \
unpackgrid.o deg2grid.o packdxcc.o chkmsg.o getpfx1.o \
getpfx2.o k2grid.o grid2k.o interleave63.o graycode.o set.o \
igray.o init_rs_int.o encode_rs_int.o decode_rs_int.o \
wrapkarn.o
OBJS0= init_rs.o encode_rs.o decode_rs.o
SRCS0= init_rs.c encode_rs.c decode_rs.c
JT65SRCS = JT65code_all.f igray.o wrapkarn.o init_rs.o encode_rs.o decode_rs.o
all: JT65code
JT65code_demo: $(OBJS1)
$(FC) -o JT65code_demo $(OBJS1)
# $(OBJS0) regenerated by Audio.so target for now
JT65code: Audio.so wrapkarn.o igray.o $(JT65SRCS) # $(OBJS0)
$(FC) -o JT65code $(JT65SRCS)
wrapkarn.o: wrapkarn.c
$(CC) -c wrapkarn.c
igray.o: igray.c
$(CC) -c igray.c
$(OBJS0): $(SRCS0)
$(CC) -c -DBIGSYM=1 $(SRCS0)
init_rs_int.o: init_rs.c
$(CC) -c -DBIGSYM=1 -o init_rs_int.o init_rs.c
encode_rs_int.o: encode_rs.c
$(CC) -c -DBIGSYM=1 -o encode_rs_int.o encode_rs.c
decode_rs_int.o: decode_rs.c
$(CC) -c -DBIGSYM=1 -o decode_rs_int.o decode_rs.c
Audio.so: $(OBJS0)
${PYTHON} ${F2PY_PY} -c --quiet --opt="-O -cpp -D${OS} \
-fno-second-underscore" init_rs.o encode_rs.o decode_rs.o -m Audio \
--f77exec=${G95} --f90exec=${G95} -L${COMPILER} -lpthread -lg2c \
only: ftn_init ftn_quit audio_init spec getfile azdist0 astro0 \
: a2d.f90 abc441.f90 astro0.f90 audio_init.f90 azdist0.f90 \
blanker.f90 decode1.f90 decode2.f90 decode3.f90 ftn_init.f90 \
ftn_quit.f90 get_fname.f90 getfile.f90 horizspec.f90 hscroll.f90 \
i1tor4.f90 pix2d.f90 pix2d65.f90 rfile.f90 savedata.f90 spec.f90 \
wsjtgen.f90 runqqq.f90 wsjt1.f fsubs1.f fsubs.f astro.f astropak.f \
jtaudio.c ptt_bsd.c igray.c wrapkarn.c start_threads.c cutil.c \
fivehz.f90
.PHONY : clean
clean:
${RM} -f *.o *.so JT65code JT65code_demo

View File

@ -43,6 +43,9 @@
/* Define to `unsigned long long' if <sys/types.h> does not define. */
#undef uint64_t
/* Define if you have /usr/include/sys/param.h */
#undef HAVE_SYS_PARAM_H
#undef HAVE_ALSA_ALSASOUND_H
#undef HAVE_SYS_SOUNDCARD_H
#undef HAVE_AUDIOFILE_H

25
configure vendored
View File

@ -2,7 +2,7 @@
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.53 for wsjt 0.9.
#
# $Id: $
# $Id: configure.ac 58 2006-01-07 20:14:23Z va3db $
#
# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
@ -921,7 +921,7 @@ Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
$Id: $
$Id: configure.ac 58 2006-01-07 20:14:23Z va3db $
_ACEOF
exit 0
fi
@ -3306,6 +3306,25 @@ echo "${ECHO_T}no" >&6
fi
echo "$as_me:$LINENO: checking g95 lib path" >&5
echo $ECHO_N "checking g95 lib path... $ECHO_C" >&6
G95_LIB_PATH=`${G95} -print-file-name=`
echo "$as_me:$LINENO: result: ${G95_LIB_PATH}" >&5
echo "${ECHO_T}${G95_LIB_PATH}" >&6
cat >>confdefs.h <<_ACEOF
#define G95_LIB_PATH "${G95_LIB_PATH}"
_ACEOF
G95_LIB_PATH="${G95_LIB_PATH}"
echo "$as_me:$LINENO: checking OS" >&5
echo $ECHO_N "checking OS... $ECHO_C" >&6
OS=`uname`
OS="${OS}"
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
@ -4634,6 +4653,8 @@ s,@TEST@,$TEST,;t t
s,@PYTHON@,$PYTHON,;t t
s,@F2PY@,$F2PY,;t t
s,@G95@,$G95,;t t
s,@G95_LIB_PATH@,$G95_LIB_PATH,;t t
s,@OS@,$OS,;t t
s,@SNPRINTF_C@,$SNPRINTF_C,;t t
s,@CLOBBER@,$CLOBBER,;t t
s,@WSJT_CFLAGS@,$WSJT_CFLAGS,;t t

View File

@ -80,6 +80,16 @@ AC_PATH_PROG(PYTHON, python)
AC_PATH_PROG(F2PY, f2py)
AC_PATH_PROG(G95, g95)
AC_MSG_CHECKING([g95 lib path])
G95_LIB_PATH=`${G95} -print-file-name=`
AC_MSG_RESULT(${G95_LIB_PATH})
AC_DEFINE_UNQUOTED(G95_LIB_PATH, "${G95_LIB_PATH}", [Path to G95 libs.])
AC_SUBST(G95_LIB_PATH, "${G95_LIB_PATH}")
AC_MSG_CHECKING([OS])
OS=`uname`
AC_SUBST(OS, "${OS}")
dnl Checks for header files.
AC_HEADER_STDC

View File

@ -1,44 +0,0 @@
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/io.h>
int ptt_(int *nport, int *ntx, int *iptt)
{
static int nopen=0;
int control = TIOCM_RTS | TIOCM_DTR;
int fd;
char s[11];
if(*nport < 0) {
*iptt=*ntx;
return(0);
}
if(*ntx && (!nopen)) {
sprintf(s,"/dev/ttyS%d",*nport);
//open the device
if ((fd = open(s, O_RDWR | O_NDELAY)) < 0) {
fprintf(stderr, "device not found");
return(1);
}
nopen=1;
return(0);
}
if(*ntx && nopen) {
// printf("Set DTR/RTS %d %d\n",TIOCMBIS,control);
ioctl(fd, TIOCMBIS, &control); // Set DTR and RTS
*iptt=1;
}
else {
// printf("Clear DTR/RTS %d %d\n",TIOCMBIC,control);
ioctl(fd, TIOCMBIC, &control);
close(fd);
*iptt=0;
nopen=0;
}
return(0);
}