-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
141 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,28 @@ | ||
bin_PROGRAMS = harminv | ||
lib_LTLIBRARIES = libharminv.la | ||
include_HEADERS = harminv.h | ||
dist_man_MANS = harminv.1 | ||
noinst_PROGRAMS = sines | ||
|
||
harminv_SOURCES = harminv-main.c harminv.c check.h config.h \ | ||
copyright.h harminv.h | ||
sines_SOURCES = sines.c harminv.c | ||
EXTRA_DIST = COPYRIGHT | ||
|
||
libharminv_la_SOURCES = harminv.c harminv.h harminv-int.h check.h | ||
libharminv_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ | ||
|
||
harminv_SOURCES = harminv-main.c copyright.h | ||
harminv_LDADD = libharminv.la | ||
|
||
sines_SOURCES = sines.c | ||
|
||
BUILT_SOURCES = copyright.h | ||
|
||
# Generate built sources only in maintainer mode | ||
if MAINTAINER_MODE | ||
|
||
copyright.h: COPYRIGHT | ||
(echo '#define COPYRIGHT \'; sed 's,^/\* *,",;s,^ \* *,",;s,$$,\\n" \\,' COPYRIGHT |egrep -v '^"/|^[^"]'; echo) > $@ | ||
|
||
maintainer-clean-local: | ||
rm -f $(BUILT_SOURCES) | ||
|
||
endif # MAINTAINER_MODE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
# Process this file with autoconf to produce a configure script. | ||
AC_INIT(harminv, 0.2) | ||
AM_INIT_AUTOMAKE | ||
AC_INIT(harminv, 1.0, [email protected]) | ||
AM_INIT_AUTOMAKE(1.6) | ||
AC_CONFIG_SRCDIR(harminv.c) | ||
AM_CONFIG_HEADER(config.h) | ||
AM_MAINTAINER_MODE | ||
|
||
# Shared-library version number; indicates api compatibility, and is | ||
# not the same as the "public" version number. (Don't worry about this | ||
# except for public releases.) | ||
SHARED_VERSION_INFO="1:0:0" | ||
AC_SUBST(SHARED_VERSION_INFO) | ||
AM_ENABLE_SHARED(no) dnl shared libs cause too many headaches to be default | ||
|
||
# Checks for programs. | ||
AC_PROG_CC | ||
|
@@ -16,7 +24,7 @@ AC_F77_WRAPPERS | |
|
||
# Add lots of compiler warnings to check for if we are using gcc: | ||
# (The variable $GCC is set to "yes" by AC_PROG_CC if we are using gcc.) | ||
if test "$GCC" = "yes"; then | ||
if test "$GCC" = "yes" && test "$USE_MAINTAINER_MODE" = yes; then | ||
CFLAGS="$CFLAGS -Wall -W -Wbad-function-cast -Wcast-qual -Wpointer-arith -Wcast-align -pedantic" | ||
fi | ||
|
||
|
@@ -74,16 +82,21 @@ fi # C has complex keyword | |
|
||
fi # $with_cxx = no | ||
|
||
if test "$have_c_complex" = "yes"; then | ||
AC_CHECK_FUNCS(carg) | ||
fi | ||
|
||
########################################################################### | ||
|
||
AC_PROG_CXX | ||
if test "$with_cxx" = "yes" -o "$have_c_complex" = "no"; then | ||
AC_PROG_CXX | ||
CC="$CXX" | ||
CFLAGS="$CXXFLAGS" | ||
fi | ||
|
||
if test "$have_c_complex" = "yes"; then | ||
AC_CHECK_FUNCS(carg) | ||
fi | ||
########################################################################### | ||
|
||
AC_PROG_LIBTOOL | ||
########################################################################### | ||
|
||
# Checks for header files. | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* Copyright (C) 2000 Massachusetts Institute of Technology. | ||
* | ||
* 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 | ||
*/ | ||
|
||
#ifndef HARMINV_INT_H | ||
#define HARMINV_INT_H 1 | ||
|
||
#include "config.h" | ||
|
||
#ifndef __cplusplus | ||
/* Require C99 complex number support; this is just too painful | ||
without it. Alternatively, use the complex<double> STL class in | ||
C++. */ | ||
|
||
# include <complex.h> | ||
#endif | ||
|
||
#include "harminv.h" | ||
|
||
typedef harminv_complex cmplx; /* shortcut */ | ||
|
||
#ifdef __cplusplus | ||
# define I cmplx(0,1) | ||
# define creal(c) real(c) | ||
# define cimag(c) imag(c) | ||
# define cabs(c) abs(c) | ||
# define carg(c) arg(c) | ||
# define cexp(c) exp(c) | ||
# define csqrt(c) sqrt(c) | ||
#else | ||
# ifndef HAVE_CARG /* Cray doesn't have this for some reason */ | ||
# define carg(c) atan2(cimag(c), creal(c)) | ||
# endif | ||
#endif | ||
|
||
struct harminv_data_struct { | ||
const cmplx *c; | ||
int n, K, J, nfreqs; | ||
double fmin, fmax; | ||
cmplx *z; | ||
cmplx *U0, *U1; | ||
cmplx *B, *u; /* eigen-solutions of U1*B = u*U0*B */ | ||
}; | ||
|
||
#endif /* HARMINV_INT_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters