diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index d3eec067..00000000 --- a/Makefile.am +++ /dev/null @@ -1,101 +0,0 @@ -## Process this file with automake to produce Makefile.in -# -# Makefile.am -# -# Automake input file. -# -# Copyright (C) 2003, 2004 Stefan Jahn -# -# This 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 software 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 package; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, -# Boston, MA 02110-1301, USA. -# - -AM_DISTCHECK_CONFIGURE_FLAGS=--without-gtest - -# Ignore external headers and sources, -# enable branch coverage (default disabled on lcov 1.10) -CODE_COVERAGE_LCOV_OPTIONS ?= --no-external --rc lcov_branch_coverage=1 $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) -CODE_COVERAGE_GENHTML_OPTIONS ?= --rc lcov_branch_coverage=1 -@CODE_COVERAGE_RULES@ - -SUBDIRS = src doc tests - -ACLOCAL_AMFLAGS = -I m4 - -nodist_pkginclude_HEADERS = qucs_typedefs.h - -EXTRA_DIST = BUGS bootstrap RELEASE - -pkginclude_HEADERS = config.h - -CLEANFILES = *~ *.orig *.rej -MAINTAINERCLEANFILES = aclocal.m4 configure Makefile.in \ - stamp-h.in stamp-h[0-9].in -DISTCLEANFILES = config.cache config.log -MOSTLYCLEANFILES = \ - *.gcda *.gcno *.gcov - -## Test suite -# Run with: make check -# These tests rely on the assert and bugon functions. -# The functions are used as equations on the schematic. -# Fail on these functions will abort the simulation of netlist generated -# from the schematic. -# -# See also qucs-test for another way of testing. -# https://github.com/Qucs/qucs-test. -TEST_EXTENSIONS = .net .txt -NET_LOG_COMPILER = $(top_srcdir)/tests/runqucsator.sh -AM_NET_LOG_FLAGS = $(abs_top_builddir)/src/qucsator - -TESTS = - -# U=RI variation -TESTS += \ - tests/basic/u=ri/u=ri@dc.net \ - tests/basic/u=ri/u=ri@ac.net \ - tests/basic/u=ri/u=ri@tr.net \ - tests/basic/u=ri/u=ri@dc+sweep.net \ - tests/basic/u=ri/u=ri@ac+sweep.net \ - tests/basic/u=ri/u=ri@tr+sweep.net \ - tests/basic/u=ri/u=ri@sp.net - -# voltage diviser -TESTS += \ - tests/basic/voltagediviser/voltagediviser@tr.net - -# component -TESTS += \ - tests/basic/components/capacitor/capacitor@dc.net \ - tests/basic/components/capacitor/capacitor@ac.net \ - tests/basic/components/capacitor/capacitor@tr.net \ - tests/basic/components/spfile/spfile@sp.net - - -if USE_QUCS_TEST - TXT_LOG_COMPILER = src/qucsator - AM_TXT_LOG_FLAGS = -i - TESTS += tests/qucs-test/testsuite/DC_SW_bridge_prj/netlist.txt \ - tests/qucs-test/testsuite/DC_SW_bsim4v30nMOS_Ids_Vgs_prj/netlist.txt \ - tests/qucs-test/testsuite/DC_SW_bsim4v30pMOS_Ids_Vgs_prj/netlist.txt \ - tests/qucs-test/testsuite/DC_SW_charac_prj/netlist.txt \ - tests/qucs-test/testsuite/DC_SW_diff1_prj/netlist.txt \ - tests/qucs-test/testsuite/DC_TR_SW_spice_BFR520_prj/netlist.txt -endif - -# this is a VILE HACK -# (but better than nothing, for now) -dist-hook: - cp -r $(top_srcdir)/tests/basic $(distdir)/tests diff --git a/README.md b/README.md new file mode 100644 index 00000000..4a73bebe --- /dev/null +++ b/README.md @@ -0,0 +1,60 @@ +# Description + +QucsatorRF is a command line driven circuit simulator targeted for RF and microwave circuits. +It takes a network list in a certain format as input and outputs a Qucs XML dataset. This repository +also contians a QucsconvRF tool for data file formats conversion. + +The Qucs-S project https://github.com/ra3xdh/qucs_s is a recommended GUI for both tools. + +# Build instruction + +## Dependencies + +QucsatorRF uses CMake build system and has the following build dependencies: + +* CMake +* Flex +* Bison +* Gperf +* Dos2unix +* ADMS is optional. It is disbaled by default and could be enabled using `-DWITH_ADMS=ON` flag + +QucsatorRF has no runtime dependencies except the standard C++ library (libstdc++). ADMS is an optional. + +Use the following command to install build dependencies on Debian/Ubuntu. Refer to your package manager +documentation for other platfroms. + +~~~ +sudo apt-get install build-essential cmake flex bison gperf dos2unix +~~~ + +## Linux + +Perform the following step to build the project: + +* Clone this git repository: +~~~ +git clone https://github.com/ra3xdh/qucsator_rf +~~~ +* Go to the source directory and create the build directory +~~~ +cd qucsator_rf +mkdir build +~~~ +* Configure project with Cmake; define the desired installation path using `CMAKE_INSTALL_PREFIX`. +~~~ +cd build +cmake -DCMAKE_INSTALL_PREFIX=/path_to_install/ .. +~~~ +* Build and install the `qucsator_rf` and `qucsconv_rf` +~~~ +make +make install +~~~ + +## Windows + +Use MSYS2 environment to build QucsatorRF. Install the GCC compiler and use CMake. +The build procedure and dependencies are the same as for Linux version. + + diff --git a/README b/README.old similarity index 100% rename from README rename to README.old diff --git a/autodsp.sh b/autodsp.sh deleted file mode 100755 index 14a709c8..00000000 --- a/autodsp.sh +++ /dev/null @@ -1,646 +0,0 @@ -#! /usr/bin/perl -# -# autodsp -- Run this script to re-generate all Windows projects. -# -# Copyright (C) 2001, 2002, 2005 Stefan Jahn -# -# This 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 software 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 package; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# $Id$ -# - -use strict; - -# package constants -my $VERSION = "1.0.2"; -my $PACKAGE = "autodsp"; - -# options -my $verbose = 0; -my $version = "5.00"; -my $codepage = "0x409"; -my $extradefs = " /D \"__MINGW32__\" /D \"HAVE_CONFIG_H\" /D __STDC__=0"; - -my @input_files = find_input_files (); - -check_arguments (@ARGV); - -foreach (@input_files) { - my $file = $_; - create_ap ($file, read_ap ($file)); -} - -# -# find input files -# -sub find_input_files { - - my @files = `find . -name "*.ap" -type f`; - foreach (@files) { - chop $_; - s/^\.\/(.*)$/$1/; - } - return @files; -} - -# -# check the command line -# -sub check_arguments { - - my (@args) = @_; - - while (@args) { - - if (@args[0] eq "--verbose" || @args[0] eq "-v") { - $verbose = 1; - } elsif (@args[0] eq "--vc5" || @args[0] eq "-5") { - $version = "5.00"; - } elsif (@args[0] eq "--vc6" || @args[0] eq "-6") { - $version = "6.00"; - } elsif (@args[0] eq "--version" || @args[0] eq "-V") { - print "$PACKAGE $VERSION\n"; - exit 0; - } elsif (@args[0] eq "--help" || @args[0] eq "-h") { - print "Usage: autodsp [options] -Options: - -h, --help display this help message - -v, --verbose list processed file(s) - -5, --vc5 generate version 5.00 files (default) - -6, --vc6 generate version 6.00 files - -V, --version print version number, then exit\n"; - exit 0; - } - shift @args; - } -} - -# -# convert -l linker flags -# -sub replace_libs { - - my ($prefix) = @_; - my $libs = ""; - foreach (split (/ /, shift @_)) { - if (m/^.*\.lib$/) { - s/^-l(\S+)$/$1/; - } else { - s/^-l(\S+)$/lib$1\.lib/; - } - $libs .= " " . $_; - } - return $libs; -} - -# -# convert -L linker flags -# -sub replace_ldflags { - - my ($ldflags, $prefix) = @_; - my $flags = ""; - foreach (split (/ /, $ldflags)) { - if ($prefix =~ m/^$/) { - s/^-L(\S+)$/\/libpath:\"$1\"/; - } else { - s/^-L(\S+)$/\/libpath:\"$1\/$prefix\"/; - } - $flags .= " " . $_; - } - return $flags; -} - -# -# convert -D cpp flags -# -sub replace_defs { - - my $defs = ""; - foreach (split (/ /, shift @_)) { - if (/^-D(\S+)=(.*)$/) { - $_ = "/D $1=$2"; - } else { - s/^-D(\S+)$/\/D \"$1\"/; - } - $defs .= " " . $_; - } - return $defs; -} - -# -# convert -I cpp flags -# -sub replace_includes { - - my $includes = ""; - foreach (split (/ /, shift @_)) { - s/^-I(\S+)$/\/I \"$1\"/; - $includes .= " " . $_; - } - return $includes; -} - -# -# creates DSP (Developer Studio Project) file or DSW (Developer Studio -# Workspace) file depending on the target type -# -sub create_ap { - - my ($file, %variables) = @_; - - die "autodsp: No TARGET_TYPE specified\n" unless - defined $variables{'TARGET_TYPE'}; - - if ($variables{'TARGET_TYPE'} =~ /project/i) { - create_dsw ($file, %variables); - } else { - create_dsp ($file, %variables); - } -} - -# -# creates a Workspace file -# -sub create_dsw { - - my ($infile, %variables) = @_; - local (*OUT_FILE); - my ($f, $s, $orgfile, $p, $file, $suffix); - - # create output file - $suffix = ".dsw"; - $file = $infile; - $orgfile = $file; - $file =~ s/^(.*)\.ap$/$1$suffix/; - open (OUT_FILE, ">".$file) || - die "autodsp: couldn't create \`$file': $!\n"; - print "autodsp: creating $file\n" if $verbose; - - # check OWNER; then print file header - die "autodsp: $orgfile: No OWNER specified\n" - unless defined $variables{'OWNER'}; - print OUT_FILE - "Microsoft Developer Studio Workspace File, " . - "Format Version ". $version ."\r\n"; - - # print autodsp header - $orgfile = `basename $orgfile`; chop $orgfile; - $file = `basename $file`; chop $file; - print OUT_FILE - "#\r\n" . - "# $file generated by $PACKAGE $VERSION from $orgfile\r\n" . - "#\r\n\r\n"; - - # check PROJECTS; then print all - die "autodsp: $orgfile: No PROJECTS specified\n" - unless defined $variables{'PROJECTS'}; - foreach $s (split (/ /, $variables{'PROJECTS'})) { - - $p = `basename $s`; - chop $p; - $f = $s; - $f =~ s/\\/\//g; - $f .= ".dsp"; - - print OUT_FILE - "Project: \"" . $p . "\"=\"" . $f . "\"" . - " - Package Owner=" . $variables{'OWNER'} . "\r\n\r\n"; - - # check dependencies - if (defined ($variables{$p."_DEPENDENCIES"})) { - - print OUT_FILE - "Package=" . $variables{'OWNER'} . "\r\n" . - "{{{\r\n"; - # output each dependency - foreach (split (/ /, $variables{$p."_DEPENDENCIES"})) { - print OUT_FILE - " Begin Project Dependency\r\n" . - " Project_Dep_Name " . $_ . "\r\n" . - " End Project Dependency\r\n"; - } - print OUT_FILE "}}}\r\n"; - } - } - - close (OUT_FILE); - return; -} - -# -# creates a Project file -# -sub create_dsp { - - my ($infile, %variables) = @_; - local (*OUT_FILE); - my ($o, $b, $s, $type, %types, $orgfile, $file, $suffix, $special, $c, $d); - - # types of targets - %types = ( - "0x0103" => "\"Win32 (x86) Console Application\"", - "0x0102" => "\"Win32 (x86) Dynamic-Link Library\"", - "0x0104" => "\"Win32 (x86) Static Library\"", - "0x0101" => "\"Win32 (x86) Application\"", - ); - - # create output file - $suffix = ".dsp"; - $file = $infile; - $orgfile = $file; - $file =~ s/^(.*)\.ap$/$1$suffix/; - open (OUT_FILE, ">".$file) || - die "autodsp: couldn't create \`$file': $!\n"; - print "autodsp: creating $file\n" if $verbose; - - # check OWNER and NAME; then print file header - die "autodsp: $orgfile: No OWNER specified\n" - unless defined $variables{'OWNER'}; - die "autodsp: $orgfile: No NAME specified\n" - unless defined $variables{'NAME'}; - die "autodsp: $orgfile: Invalid OWNER specified\n" - unless $variables{'OWNER'} =~ m/^<[0-9]>$/; - die "autodsp: $orgfile: Invalid NAME specified\n" - unless $variables{'NAME'} =~ m/^[a-zA-Z0-9]*$/; - print OUT_FILE - "# Microsoft Developer Studio Project File - Name=\"" . - $variables{'NAME'} . - "\" - Package Owner=" . $variables{'OWNER'} . "\r\n"; - print OUT_FILE - "# Microsoft Developer Studio Generated Build File, " . - "Format Version ". $version ."\r\n"; - - # print autodsp header - $orgfile = `basename $orgfile`; chop $orgfile; - $file = `basename $file`; chop $file; - print OUT_FILE - "#\r\n" . - "# $file generated by $PACKAGE $VERSION from $orgfile\r\n" . - "#\r\n\r\n"; - - # check TARGET_TYPE; then print it - $s = $variables{'TARGET_TYPE'}; - if ($s =~ /console.*app/i) { - $type = "0x0103"; - } elsif ($s =~ /dll/i) { - $type = "0x0102"; - } elsif ($s =~ /static.*lib/i) { - $type = "0x0104"; - } elsif ($s =~ /win32.*app/i) { - $type = "0x0101"; - } else { - die "autodsp: $orgfile: Invalid TARGET_TYPE specified\n"; - } - print OUT_FILE "# TARGTYPE " . $types{$type} . " " . $type . "\r\n\r\n"; - - # check special App/Lib type - if ($s =~ /Qt/) { - $special = "Qt"; - } - else { - $special = ""; - } - - # these !MESSAGE's are necessary - print OUT_FILE "!MESSAGE There are 2 configurations.\r\n"; - print OUT_FILE - "!MESSAGE \"" . $variables{'NAME'} . " - Win32 Release\" " . - "(based on " . $types{$type} . ")\r\n"; - print OUT_FILE - "!MESSAGE \"" . $variables{'NAME'} . " - Win32 Debug\" " . - "(based on " . $types{$type} . ")\r\n"; - - # output project header - print OUT_FILE "\r\n# Begin Project\r\n"; - print OUT_FILE - "CPP=cl.exe\r\n" . - "RSC=rc.exe\r\n" . - "BSC32=bscmake.exe\r\n" . - "LINK32=link.exe\r\n" . - "LIB32=link.exe -lib\r\n" . - "MTL=midl.exe\r\n"; - - # generate release target - print OUT_FILE - "\r\n!IF \"\$(CFG)\" == \"" . $variables{'NAME'} . - " - Win32 Release\"\r\n\r\n"; - print OUT_FILE create_opt ($type, $special, %variables); - - # generate debug target - print OUT_FILE - "\r\n!ELSEIF \"\$(CFG)\" == \"" . $variables{'NAME'} . - " - Win32 Debug\"\r\n\r\n"; - print OUT_FILE create_dbg ($type, $special, %variables); - - print OUT_FILE "\r\n!ENDIF\r\n\r\n"; - - # print target header - print OUT_FILE - "# Begin Target\r\n" . - "# Name \"" . $variables{'NAME'} . " - Win32 Release\"\r\n" . - "# Name \"" . $variables{'NAME'} . " - Win32 Debug\"\r\n\r\n"; - - # check SOURCES; then print all - die "autodsp: No SOURCES specified\n" - unless defined $variables{'SOURCES'}; - foreach $s (split (/ /, $variables{'SOURCES'})) { - $s =~ s/\\/\//g; - print OUT_FILE - "# Begin Source File\r\n" . - "SOURCE=\"" . $s . "\"\r\n" . - "# End Source File\r\n\r\n"; - } - - foreach $s (split (/ /, $variables{'MOCHEADERS'})) { - $s =~ s/\\/\//g; - $o = $s; - $o =~ s/\.h/.moc.cpp/g; - $b = $s; - $b =~ s/\.h//g; - $d = $b; - $d =~ s/[^a-zA-Z]/_/g; - $c = - "# Begin Custom Build - MOC'ing " . $s . " ...\r\n" . - "InputPath=" . $s . "\r\n" . - "InputName=" . $b . "\r\n" . - "\"\$(InputName).moc.cpp\" : " . - "\$(SOURCE) \"\$(INTDIR)\" \"\$(OUTDIR)\"" . "\r\n" . - "\t%QTDIR%\\bin\\moc -o \$(InputName).moc.cpp \$(InputName).h\r\n". - "# End Custom Build\r\n"; - - print OUT_FILE - "# Begin Source File\r\n" . - "SOURCE=\"" . $s . "\"\r\n" . - "\r\n!IF \"\$(CFG)\" == \"" . $variables{'NAME'} . - " - Win32 Release\"\r\n\r\n" . - $c . - "\r\n!ELSEIF \"\$(CFG)\" == \"" . $variables{'NAME'} . - " - Win32 Debug\"\r\n\r\n" . - $c . - "\r\n!ENDIF\r\n\r\n" . - "# End Source File\r\n\r\n" . - "# Begin Source File\r\n" . - "SOURCE=\"" . $o . "\"\r\n" . - "USERDEP_" . $d . "=\"" . $s . "\"\r\n" . - "# End Source File\r\n\r\n"; - } - - # print target and project footer - print OUT_FILE - "# End Target\r\n" . - "# End Project\r\n"; - - close (OUT_FILE); - return; -} - -# -# returns linker and cflags depending on the $debugdef variable and the -# target type (DLL or Application) -# -sub check_target_type { - - my ($type, $debugdef) = @_; - my ($submode, $mktyplib, $subsys, $suffix); - - if ($type eq "0x0102") { - $submode = "/D " . $debugdef . " /D \"_WINDOWS\""; - $mktyplib = "# ADD MTL /nologo /D " . $debugdef . - " /mktyplib203 /o NUL /win32\r\n"; - $subsys = "/subsystem:windows /dll"; - $suffix = ".dll"; - } elsif ($type eq "0x0103") { - $submode = "/D " . $debugdef . " /D \"_CONSOLE\" /D \"_MBCS\""; - $mktyplib = ""; - $subsys = "/subsystem:console"; - $suffix = ".exe"; - } elsif ($type eq "0x0104") { - $submode = "/D " . $debugdef . " /D \"_WINDOWS\""; - $mktyplib = ""; - $subsys = "/subsystem:windows /dll"; - $suffix = ".lib"; - } elsif ($type eq "0x0101") { - $submode = "/D " . $debugdef . " /D \"_CONSOLE\" /D \"_MBCS\""; - $mktyplib = ""; - $subsys = "/subsystem:windows"; - $suffix = ".exe"; - } - return ($submode, $mktyplib, $subsys, $suffix); -} - -# -# generates `General' dialog -# -sub create_general { - - my ($builddir, $debuglib) = @_; - return - "# PROP Use_MFC 0\r\n" . - "# PROP Use_Debug_Libraries " . $debuglib . "\r\n" . - "# PROP Output_Dir \"" . $builddir . "\"\r\n" . - "# PROP Intermediate_Dir \"" . $builddir . "\"\r\n" . - "# PROP Ignore_Export_Lib 0\r\n" . - "# PROP Target_Dir \"\"\r\n"; -} - -# -# generates `Other' dialogs -# -sub create_others { - - my ($mktyplib, $debugdef) = @_; - return - $mktyplib . - "# ADD RSC /l " . $codepage . " /d " . $debugdef . "\r\n" . - "# ADD BSC32 /nologo\r\n" . - "# ADD LIB32 /nologo\r\n" ; -} - -# -# generates the Release target -# -sub create_opt { - - my ($type, $special, %variables) = @_; - my ($debugdef, $debugldflag, $ret, $s, $submode, $mktyplib, $subsys, - $suffix, $builddir, $debuglib, $cflags); - - $debugdef = "\"NDEBUG\""; - $debugldflag = " "; - $builddir = "Opt"; - $debuglib = "0"; - if ($special eq "Qt") { - $cflags = "/MD "; - } else { - $cflags = "/MD "; - } - $cflags .= "/W3 /GX /O2 /Ob2"; - - ($submode, $mktyplib, $subsys, $suffix) = - check_target_type ($type, $debugdef); - - $ret = create_general ($builddir, $debuglib); - - $ret .= "# ADD CPP /nologo " . $cflags; - if (defined $variables{'INCLUDES'}) { - $ret .= replace_includes ($variables{'INCLUDES'}); - } - $ret .= " /D \"WIN32\" " . $submode; - $ret .= $extradefs; - if (defined $variables{'DEFS'}) { - $ret .= replace_defs ($variables{'DEFS'}); - } - if (defined $variables{'opt_DEFS'}) { - $ret .= replace_defs ($variables{'opt_DEFS'}); - } - $ret .= " /FD /c\r\n"; - - $ret .= create_others ($mktyplib, $debugdef); - - $ret .= "# ADD LINK32 kernel32.lib"; - if (defined $variables{'LIBS'}) { - $ret .= replace_libs ($variables{'LIBS'}); - } - $ret .= " /nologo " . $subsys . " /pdb:none /incremental:no" . - $debugldflag . "/machine:I386"; - if ($special eq "Qt") { - $ret .= " /nodefaultlib:\"msvcrtd\""; - } - if (defined $variables{'TARGET'}) { - $ret .= " /out:\"". $variables{'TARGET'} . $suffix . "\""; - } - if (defined $variables{'LDFLAGS'}) { - $ret .= replace_ldflags ($variables{'LDFLAGS'}, $builddir); - } - if (defined $variables{'all_LDFLAGS'}) { - $ret .= replace_ldflags ($variables{'all_LDFLAGS'}, ""); - } - $ret .= "\r\n"; - - return $ret; -} - -# -# generates the Debug target -# -sub create_dbg { - - my ($type, $special, %variables) = @_; - my ($debugdef, $ret, $s, $submode, $mktyplib, $subsys, $suffix, - $debugldflag, $builddir, $debuglib, $cflags); - - $debugdef = "\"_DEBUG\""; - $debugldflag = " /debug "; - $builddir = "Dbg"; - $debuglib = "1"; - if ($special eq "Qt") { - $cflags = "/MDd "; - } else { - $cflags = "/MDd "; - } - $cflags .= "/W3 /GX /Zi /Od"; - - ($submode, $mktyplib, $subsys, $suffix) = - check_target_type ($type, $debugdef); - - $ret = create_general ($builddir, $debuglib); - - $ret .= "# ADD CPP /nologo " . $cflags; - if (defined $variables{'INCLUDES'}) { - $ret .= replace_includes ($variables{'INCLUDES'}); - } - $ret .= " /D \"WIN32\" " . $submode; - $ret .= $extradefs; - if (defined $variables{'DEFS'}) { - $ret .= replace_defs ($variables{'DEFS'}); - } - if (defined $variables{'dbg_DEFS'}) { - $ret .= replace_defs ($variables{'dbg_DEFS'}); - } - $ret .= " /FD /c\r\n"; - - $ret .= create_others ($mktyplib, $debugdef); - - $ret .= "# ADD LINK32 kernel32.lib"; - if (defined $variables{'LIBS'}) { - $ret .= replace_libs ($variables{'LIBS'}); - } - $ret .= " /nologo " . $subsys . " /pdb:none /incremental:no" . - $debugldflag . "/machine:I386"; - if ($special eq "Qt") { - #$ret .= " /nodefaultlib:\"msvcrtd\""; - $ret .= ""; - } - if (defined $variables{'TARGET'}) { - $ret .= " /out:\"". $variables{'TARGET'} . $suffix . "\""; - } - if (defined $variables{'LDFLAGS'}) { - $ret .= replace_ldflags ($variables{'LDFLAGS'}, $builddir); - } - if (defined $variables{'all_LDFLAGS'}) { - $ret .= replace_ldflags ($variables{'all_LDFLAGS'}, ""); - } - $ret .= "\r\n"; - - return $ret; -} - -# -# read a single .ap file and return a var->value hash -# -sub read_ap { - - my ($file) = @_; - local (*IN_FILE); - my ($line, $var, $value, %ret); - - open (IN_FILE, $file) || die "autodsp: couldn't open \`$file': $!\n"; - print "autodsp: reading $file\n" if $verbose; - - while () { - - # clear end of lines; skips comments - $line = $_; - $line =~ s/[\r\n]//g; - $line =~ s/^(.*)\#.*/$0/; - - # continues reading after trailing '\' - while ($line =~ m/^.*\\$/) { - chop $line; - $line .= " " . ; - $line =~ s/[\r\n]//g; - $line =~ s/^([^\#]*)\#.*/$1/; - } - - # drop tabs and replace double spaces - $line =~ s/\t/ /g; - $line =~ s/[ ]+/ /g; - - # parse VAR=VALUE assignments - if ($line =~ m/^([^=]*)=(.*)$/) { - $var = $1; - $value = $2; - $var =~ s/^\s*(\S*)/$1/; - $var =~ s/(\S*)\s*$/$1/; - $value =~ s/^\s*(\S*)/$1/; - $value =~ s/(\S*)\s*$/$1/; - $ret{$var} = $value; - } - } - close (IN_FILE); - return %ret; -} diff --git a/bootstrap b/bootstrap deleted file mode 100755 index 9a56988f..00000000 --- a/bootstrap +++ /dev/null @@ -1,51 +0,0 @@ -#! /bin/sh -# -# bootstrap.sh -# -# Run this script in preparation for running configure and make. -# -# Copyright (C) 2013 Richard Crozier -# Copyright (C) 2015 Guilherme Brondani Torri -# -# This 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 software 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 package; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, -# Boston, MA 02110-1301, USA. -# - -AUTOMAKE=${AUTOMAKE:-automake} - -here=`pwd` -cd `dirname $0` - -echo "bootstrapping the qucs-core sources..." -echo -n "Creating aclocal.m4... " -${ACLOCAL:-aclocal} -I m4 || exit 1 -echo "done." -echo -n "Creating config.h.in... " -${AUTOHEADER:-autoheader} || exit 1 -echo "done." -echo -n "Libtoolizing... " -LIBTOOLIZE=${LIBTOOLIZE:-libtoolize} -case `uname` in - *Darwin*) LIBTOOLIZE=glibtoolize ;; -esac -$LIBTOOLIZE || exit 1 -echo "done." -echo -n "Creating Makefile.in(s)... " -$AUTOMAKE -a -f -c || exit 1 -echo "done." -echo -n "Creating configure... " -${AUTOCONF:-autoconf} || exit 1 -echo "done" - diff --git a/configure.ac b/configure.ac deleted file mode 100644 index d7b50cc9..00000000 --- a/configure.ac +++ /dev/null @@ -1,962 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ(2.64) - -dnl Read version from file -m4_define([QUCS_VERSION], m4_esyscmd([tr -d '\n' < VERSION])) - -AC_INIT([qucsator], [QUCS_VERSION], [qucs-bugs@lists.sourceforge.net], [], [https://sf.net/p/qucs]) -AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_AUX_DIR([build-aux]) -LT_PREREQ([2.2.2]) -dnl use AM_PROG_AR if present -m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) -LT_INIT([disable-static dlopen win32-dll]) -AC_CONFIG_MACRO_DIR([m4]) - -AC_CONFIG_SRCDIR([src/circuit.cpp]) - -AC_CANONICAL_BUILD -AC_CANONICAL_HOST -AC_CANONICAL_TARGET - -dnl AM_INIT_AUTOMAKE does several things, including defining VERSION and PACKAGE -AM_INIT_AUTOMAKE([1.12 no-define]) - -AC_PREFIX_DEFAULT([/usr/local]) -test "x$prefix" = xNONE && prefix="/usr/local" - -dnl Checks for programs. -AC_PROG_CXX(clang++ g++) -AX_CXX_COMPILE_STDCXX_11 -AC_PROG_CC -AC_PROG_LN_S -AC_PROG_INSTALL -AC_PROG_CC_C_O - -AX_COMPILER_VENDOR -AC_LANG_PUSH(C++) -AX_COMPILER_VENDOR -AC_LANG_POP(C++) - -dnl Check for Win32. -case $host_os in - *mingw* | *msys* ) WIN32=yes ;; - *) WIN32=no ;; -esac -AM_CONDITIONAL(COND_WIN32, test x$WIN32 = xyes) - -dnl check for compiler problem -# see http://llvm.org/bugs/show_bug.cgi?id=13530 -m4_define([CHECK_CLANG13530_PROGRAM],dnl - [AC_LANG_PROGRAM([ - #include - ], - [std::cout << "Hello, world!" << std::endl;])]) -AC_MSG_CHECKING([whether c++ compiler is affected by clang bug 13530]) -AC_LANG_PUSH(C++) -AS_IF([test "x$ax_cv_cxx_compiler_vendor" = "xclang"], - [dnl - AC_COMPILE_IFELSE(dnl - [CHECK_CLANG13530_PROGRAM], - [dnl - clang13530_workarround_needed="no" - ], - [dnl - AX_SAVE_FLAGS - CXXFLAGS="$CXXFLAGS -D__STRICT_ANSI__" - AC_COMPILE_IFELSE(dnl - [CHECK_CLANG13530_PROGRAM], - [dnl - clang13530_workarround_needed="yes" - ], - [AC_MSG_FAILURE([Cannot compile test suite for clang 13530 even with workaround])]) - AX_RESTORE_FLAGS - ]dnl - )dnl - ], - [dnl - clang13530_workarround_needed="no"dnl - ]) -AS_IF([test "x$clang13530_workarround_needed" = "xyes"], - [AX_APPEND_COMPILE_FLAGS([-D__STRICT_ANSI__],CXXFLAGS)], - []) -AC_LANG_POP(C++) -AC_MSG_RESULT([$clang13530_workarround_needed]) - -dnl Check for parser and lexer generators. -AC_PROG_YACC -AC_PROG_LEX - -lexver_req="2.5.9"; - -if test "x$LEX" != "x:"; then - if test yes = yes; then - AC_MSG_CHECKING([for $LEX >= $lexver_req]) - [lexver=`eval $LEX --version 2>/dev/null | head -1 | sed 's/[^0-9\.]//g'`] - if test -n "$lexver"; then - AS_VERSION_COMPARE(${lexver},${lexver_req}, - [cmp=-1],[cmp=0],[cmp=1]) - AS_IF([test "${cmp}" != "-1"], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_ERROR([need $LEX >= $lexver_req])]) - else - AC_MSG_RESULT([not identified]) - fi - unset lexver - fi - AC_MSG_CHECKING([whether $LEX accepts --nounistd]) - cat < lextest.l -%% -token action; -EOF - lexout="`$LEX --nounistd -olextest.c lextest.l 2>&1`" - rm -f lextest.l lextest.c - if test "x$lexout" != "x"; then - AC_MSG_RESULT([no]) - else - AC_MSG_RESULT([yes]) - LEX="$LEX --nounistd" - fi - unset lexout -fi - -dnl Check for debugging. -AC_ARG_ENABLE([debug], - AS_HELP_STRING([--enable-debug], - [include debug output @<:@default=no@:>@]), - [case "$enableval" in - yes) enable_debug="yes" ;; - no) enable_debug="no" ;; - *) enable_debug="no" ;; - esac], - [enable_debug="no"]) -if test "$enable_debug" = yes; then - AC_DEFINE(DEBUG, 1, [Define if debug output should be supported.]) -else - AC_DEFINE(NDEBUG, 1, [Define if debug code should be suppressed.]) - if test "x$GCC" = xyes; then - CFLAGS="`echo $CFLAGS | sed -e 's/\-g //g'`" - CXXFLAGS="`echo $CXXFLAGS | sed -e 's/\-g //g'`" -# disable stripping (debian bug #437876) -# case $host_os in -# *darwin*) LDFLAGS="$LDFLAGS" ;; -# *) LDFLAGS="$LDFLAGS -s" ;; -# esac - fi -fi - -dnl append -O0 to CXXFLAGS if in debug mode and using gcc -dnl to assist with debugging by preventing optimisation. -dnl gcc will use the final invocation of -OX and ignore earlier -dnl values -if test "$enable_debug" = yes; then - if test "x$GCC" = xyes; then - CXXFLAGS="$CXXFLAGS -O0" - AC_MSG_NOTICE([Appending gcc optimisation flag -O0 due to --enable-debug setting.]) - fi -fi -unset enable_debug - - -dnl MacOSX build and runtime environment options -dnl borrowed from http://cgit.freedesktop.org/libreoffice/core/tree/configure.ac - -dnl Default-disabled search for SDK -AC_ARG_ENABLE([sdk], - AS_HELP_STRING([--enable-sdk], - [search for Mac OSX SDK @<:@default=yes@:>@. \ - Disable this option to set custom compiler flags CXX, CXXFLAGS]), - [case "$enableval" in - yes) enable_sdk="yes" ;; - no) enable_sdk="no" ;; - *) enable_sdk="yes" ;; - esac], - [enable_sdk="no"]) - -dnl Specify version of SDK -AC_ARG_WITH(macosx-sdk, - AS_HELP_STRING([--with-macosx-sdk], - [Use a specific SDK for building.]) - [ - Usage: --with-macosx-sdk= - - e. g.: --with-macosx-sdk=10.6 - - there are 3 options to control the MacOSX build: - --with-macosx-sdk (referred to as 'sdk' below) - --with-macosx-version-min-required (referred to as 'min' below) - --with-macosx-version-max-allowed (referred to as 'max' below) - - the connection between these value and the default they take is as follow: - ( ? means not specified on the command line, s means the SDK version found, - constraint: x <= y <= z) - - ========================================== - command line || config result - ========================================== - min | max | sdk || min | max | sdk | - ? | ? | ? || 10.6 | 10.s | 10.s | - ? | ? | 10.x || 10.6 | 10.x | 10.x | - ? | 10.x | ? || 10.6 | 10.s | 10.s | - ? | 10.x | 10.y || 10.6 | 10.x | 10.y | - 10.x | ? | ? || 10.x | 10.s | 10.s | - 10.x | ? | 10.y || 10.x | 10.y | 10.y | - 10.x | 10.y | ? || 10.x | 10.y | 10.y | - 10.x | 10.y | 10.z || 10.x | 10.y | 10.z | - - - see: http://developer.apple.com/library/mac/#technotes/tn2064/_index.html - for a detailed technical explanation of these variables - - Note: MACOSX_DEPLOYMENT_TARGET will be set to the value of 'min'. - - Note that even if in theory using a --with-macosx-version-max-allowed - (i.e. the MAC_OS_X_VERSION_MAX_ALLOWED macro) less than the SDK version - should work, in practice Apple does not seem to test that, and at least - compiling with -DMAC_OS_X_VERSION_MAX_ALLOWED=1060 against the 10.7 SDK - fails in a couple of places. Just because of oversights in ifdefs in the SDK - headers, but still. - ], -,) - -AC_ARG_WITH(macosx-version-min-required, - AS_HELP_STRING([--with-macosx-version-min-required], - [set the minimum OS version needed to run the built Qucsator]) - [ - Usage: --with-macosx-version-min-required= - - e. g.: --with-macosx-version-min-required=10.6 - see --with-macosx-sdk for more info - ], -,) - -AC_ARG_WITH(macosx-version-max-allowed, - AS_HELP_STRING([--with-macosx-version-max-allowed], - [set the maximum allowed OS version the Qucsator compilation can use APIs from]) - [ - Usage: --with-macosx-version-max-allowed= - - e. g.: --with-macosx-version-max-allowed=10.6 - see --with-macosx-sdk for more info - ], -,) - - - - -case $host_os in - *linux* | *cygwin* ) - - dnl Set Clang - AS_IF([test "x$ax_cv_cxx_compiler_vendor" = "xclang"], - [CFLAGS="$CFLAGS -pipe" - CXXFLAGS="$CXXFLAGS -pipe -fno-exceptions -D__STRICT_ANSI__" - LDFLAGS="$LDFLAGS -ldl" - use_CLANG="yes"],[]) - - dnl Set GCC - AS_IF([test "x$use_CLANG" != "xyes" -a "x$GCC" = "xyes"], - [CFLAGS="$CFLAGS -pipe" - CXXFLAGS="$CXXFLAGS -pipe -fno-exceptions -fno-check-new -ldl -rdynamic" - LDFLAGS="$LDFLAGS -ldl"],[]) - - if test "$enable_debug" = yes; then - CFLAGS="$CFLAGS -W -Wall -Wmissing-prototypes" - CXXFLAGS="$CXXFLAGS -W -Wall" - fi - ;; - - *darwin* ) - - dnl =================================================================== - dnl Test if search for SDK was enabled - AS_IF([test "x$enable_sdk" = "xyes"], [ - - dnl Check OS X SDK and compiler - dnl borrowed from http://cgit.freedesktop.org/libreoffice/core/tree/configure.ac - AC_MSG_CHECKING([what Mac OS X SDK to use]) - - bitness=-m64 - - if test -z "$with_macosx_sdk"; then - if test -d /Developer/SDKs/MacOSX10.6.sdk; then - with_macosx_sdk=10.6 - elif test -d /Developer-old/SDKs/MacOSX10.6.sdk; then - with_macosx_sdk=10.6 - elif test -d /Xcode3/SDKs/MacOSX10.6.sdk; then - with_macosx_sdk=10.6 - elif test -d /Developer/SDKs/MacOSX10.7.sdk; then - with_macosx_sdk=10.7 - elif test -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"; then - with_macosx_sdk=10.6 - elif test -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"; then - with_macosx_sdk=10.7 - elif test -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk"; then - with_macosx_sdk=10.8 - elif test -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"; then - with_macosx_sdk=10.9 - elif test -x /usr/bin/xcode-select; then - xcodepath="`xcode-select -print-path`" - if test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"; then - with_macosx_sdk=10.6 - elif test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"; then - with_macosx_sdk=10.7 - elif test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk"; then - with_macosx_sdk=10.8 - elif test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"; then - with_macosx_sdk=10.9 - fi - fi - if test -z "$with_macosx_sdk"; then - AC_MSG_ERROR([Could not figure out the location of a Mac OS X SDK and its version]) - fi - fi - - case $with_macosx_sdk in - 10.5) - MACOSX_SDK_VERSION=1050 - ;; - 10.6) - MACOSX_SDK_VERSION=1060 - ;; - 10.7) - MACOSX_SDK_VERSION=1070 - ;; - 10.8) - MACOSX_SDK_VERSION=1080 - ;; - 10.9) - MACOSX_SDK_VERSION=1090 - ;; - 10.10) - MACOSX_SDK_VERSION=101000 - ;; - *) - AC_MSG_ERROR([with-macosx-sdk $with_macosx_sdk is not a supported value, supported values are 10.5--10]) - ;; - esac - - # Next find it (again, if we deduced its version above by finding - # it... but we need to look for it once more in case - # --with-macosx-sdk was given so that the above search did not - # happen). - if test -z "$MACOSX_SDK_PATH"; then - case $with_macosx_sdk in - 10.5) - if test -x /usr/bin/xcode-select; then - xcodepath="`xcode-select -print-path`" - if test -d "$xcodepath/SDKs/MacOSX$with_macosx_sdk.sdk"; then - MACOSX_SDK_PATH="$xcodepath/SDKs/MacOSX$with_macosx_sdk.sdk" - fi - elif test -d /Developer/SDKs/MacOSX10.5.sdk; then - MACOSX_SDK_PATH=/Developer/SDKs/MacOSX10.5.sdk - elif test -d /Developer-old/SDKs/MacOSX10.5.sdk; then - MACOSX_SDK_PATH=/Developer-old/SDKs/MacOSX10.5.sdk - elif test -d /Xcode3/SDKs/MacOSX10.5.sdk; then - MACOSX_SDK_PATH=/Xcode3/SDKs/MacOSX10.5.sdk - fi - ;; - 10.6) - if test -d /Developer/SDKs/MacOSX10.6.sdk; then - MACOSX_SDK_PATH=/Developer/SDKs/MacOSX10.6.sdk - elif test -d /Developer-old/SDKs/MacOSX10.6.sdk; then - MACOSX_SDK_PATH=/Developer-old/SDKs/MacOSX10.6.sdk - elif test -d /Xcode3/SDKs/MacOSX10.6.sdk; then - MACOSX_SDK_PATH=/Xcode3/SDKs/MacOSX10.6.sdk - elif test -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"; then - MACOSX_SDK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk - elif test -x /usr/bin/xcode-select; then - xcodepath="`xcode-select -print-path`" - if test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"; then - MACOSX_SDK_PATH="$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk" - fi - fi - ;; - 10.7) - if test -d /Developer/SDKs/MacOSX$with_macosx_sdk.sdk; then - MACOSX_SDK_PATH=/Developer/SDKs/MacOSX$with_macosx_sdk.sdk - elif test -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"; then - MACOSX_SDK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk - elif test -x /usr/bin/xcode-select; then - xcodepath="`xcode-select -print-path`" - if test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"; then - MACOSX_SDK_PATH="$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk" - fi - fi - ;; - 10.8|10.9|10.10) - xcodepath="`xcode-select -print-path`" - if test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"; then - MACOSX_SDK_PATH="$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk" - fi - ;; - esac - if test -z "$MACOSX_SDK_PATH"; then - AC_MSG_ERROR([Could not figure out the location of Mac OS X $with_macosx_sdk SDK]) - fi - fi - AC_MSG_RESULT([SDK $with_macosx_sdk at $MACOSX_SDK_PATH]) - - if test "$with_macosx_version_min_required" = ""; then - case $with_macosx_sdk in - 10.5) - with_macosx_version_min_required="10.5";; - *) - with_macosx_version_min_required="10.6";; - esac - fi - - if test "$with_macosx_version_max_allowed" = ""; then - with_macosx_version_max_allowed="$with_macosx_sdk" - fi - - # export this so that "xcrun" invocations later return matching values - DEVELOPER_DIR="${MACOSX_SDK_PATH%/SDKs*}" - DEVELOPER_DIR="${DEVELOPER_DIR%/Platforms*}" - export DEVELOPER_DIR - FRAMEWORKSHOME="$MACOSX_SDK_PATH/System/Library/Frameworks" - MACOSX_DEPLOYMENT_TARGET="$with_macosx_version_min_required" - - case "$with_macosx_version_min_required" in - 10.5) - MAC_OS_X_VERSION_MIN_REQUIRED="1050" - ;; - 10.6) - MAC_OS_X_VERSION_MIN_REQUIRED="1060" - ;; - 10.7) - MAC_OS_X_VERSION_MIN_REQUIRED="1070" - ;; - 10.8) - MAC_OS_X_VERSION_MIN_REQUIRED="1080" - ;; - 10.9) - MAC_OS_X_VERSION_MIN_REQUIRED="1090" - ;; - 10.10) - MAC_OS_X_VERSION_MIN_REQUIRED="101000" - ;; - *) - AC_MSG_ERROR([with-macosx-version-min-required $with_macosx_version_min_required is not a supported value, supported values are 10.5--10]) - ;; - esac - - if test "$BITNESS_OVERRIDE" = ""; then - case "$with_macosx_version_min_required" in - 10.5) - case "$with_macosx_sdk" in - 10.5) - ;; - *) - AC_MSG_WARN([Building with a SDK > 10.5 possibly breaks 10.5 compatibility.]) - add_warning "Building with a SDK > 10.5 possibly breaks 10.5 compatibility." - ;; - esac - ;; - esac - fi - - # If no CC and CXX environment vars, try to guess where the compiler is - #LIBTOOL=libtool - INSTALL_NAME_TOOL=install_name_tool - if test -z "$save_CC"; then - AC_MSG_CHECKING([what compiler to use]) - case $with_macosx_sdk in - 10.5) - CC="${gccprefix}gcc-4.2 $arch -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH" - CXX="${gccprefix}g++-4.2 $arch -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH" - INSTALL_NAME_TOOL=`xcrun -find install_name_tool` - ;; - 10.6) - # did someone copy her 10.6 sdk into xcode 4 (needed on Mountain Lion)? - if test "$(echo $MACOSX_SDK_PATH | cut -c1-23)" = "/Applications/Xcode.app"; then - CC="`xcrun -find gcc` $bitness -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH" - CXX="`xcrun -find g++` $bitness -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH" - else - CC="gcc-4.2 $bitness -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH" - CXX="g++-4.2 $bitness -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH" - fi - INSTALL_NAME_TOOL=`xcrun -find install_name_tool` - #LIBTOOL=libtool - ;; - 10.7|10.8|10.9|10.10) - if test "$with_macosx_version_min_required" != 10.6; then - # Use libc++ instead of libstdc++ when possible - stdlib=-stdlib=libc++ - fi - #if test "$ENABLE_LTO" = TRUE; then - # lto=-flto - #fi - CC="`xcrun -find clang` $bitness $lto -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH" - CXX="`xcrun -find clang++` $bitness $lto $stdlib -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH" - INSTALL_NAME_TOOL=`xcrun -find install_name_tool` - AR=`xcrun -find ar` - NM=`xcrun -find nm` - STRIP=`xcrun -find strip` - #LIBTOOL=`xcrun -find libtool` - RANLIB=`xcrun -find ranlib` - ;; - esac - AC_MSG_RESULT([$CC and $CXX]) - fi - - case "$with_macosx_version_max_allowed" in - 10.5) - MAC_OS_X_VERSION_MAX_ALLOWED="1050" - ;; - 10.6) - MAC_OS_X_VERSION_MAX_ALLOWED="1060" - ;; - 10.7) - MAC_OS_X_VERSION_MAX_ALLOWED="1070" - ;; - 10.8) - MAC_OS_X_VERSION_MAX_ALLOWED="1080" - ;; - 10.9) - MAC_OS_X_VERSION_MAX_ALLOWED="1090" - ;; - 10.10) - MAC_OS_X_VERSION_MAX_ALLOWED="101000" - ;; - *) - AC_MSG_ERROR([with-macosx-version-max-allowed $with_macosx_version_max_allowed is not a supported value, supported values are 10.5--10]) - ;; - esac - - AC_MSG_CHECKING([that macosx-version-min-required is coherent with macosx-version-max-allowed]) - if test $MAC_OS_X_VERSION_MIN_REQUIRED -gt $MAC_OS_X_VERSION_MAX_ALLOWED; then - AC_MSG_ERROR([the version minimum required must be inferior or equal to the version maximum allowed]) - else - AC_MSG_RESULT([ok]) - fi - - AC_MSG_CHECKING([that macosx-version-max-allowed is coherent with macos-with-sdk]) - if test $MAC_OS_X_VERSION_MAX_ALLOWED -gt $MACOSX_SDK_VERSION; then - AC_MSG_ERROR([the version maximum allowed cannot be greater than the sdk level]) - else - AC_MSG_RESULT([ok]) - fi - AC_MSG_NOTICE([MAC_OS_X_VERSION_MIN_REQUIRED=$MAC_OS_X_VERSION_MIN_REQUIRED]) - AC_MSG_NOTICE([MAC_OS_X_VERSION_MAX_ALLOWED=$MAC_OS_X_VERSION_MAX_ALLOWED]) - - - if test "$enable_debug" = yes; then - CFLAGS="$CFLAGS -W -Wall -Wmissing-prototypes" - CXXFLAGS="$CXXFLAGS -W -Wall" - fi - - dnl End test for enable_sdk - ]) - - ;; - - *mingw* ) - if test "x$GCC" = xyes; then - CFLAGS="$CFLAGS -pipe" - CXXFLAGS="$CXXFLAGS -pipe -fno-exceptions -fno-check-new" - if test "$enable_debug" = yes; then - CFLAGS="$CFLAGS -W -Wall -Wmissing-prototypes" - CXXFLAGS="$CXXFLAGS -W -Wall" - fi - fi - ;; -esac - -dnl Check for new platforms. -osversion="`grep \"$host\" $srcdir/doc/PLATFORMS 2>/dev/null`" -if test "x$osversion" = "x"; then - AC_MSG_RESULT([ - The $PACKAGE package has never been compiled or run on this platform. - Please send an email to including your - compiler version and whether it worked correctly or not. '$host' - will then be added to the PLATFORMS file included in this package. -]) -fi -unset osversion - -dnl Check for additional programs in PATH -AC_PATH_PROG([GPERF],[gperf],[]) -AS_IF([test -z "$GPERF"], - [AC_MSG_ERROR([please install gperf])]) - -dnl check for adms (queued for removal) -dnl The default behaviour is "check for adms, if it's not there, -dnl error out. -dnl override with --with-mkadms=alternative_executable -ADMSXML=admsXml -AC_ARG_WITH([mkadms], - [AS_HELP_STRING([--with-mkadms], [specify alternative admsXml])], - [ADMSXML=$withval],) - -AC_MSG_CHECKING([Checking if ${ADMSXML} is working]) -AS_IF([${ADMSXML} --version > /dev/null 2>&1], , ADMSXML="") -AS_IF([test -z $ADMSXML], - [ AC_MSG_RESULT([ no ]) - ADMSXML=no], - [ AC_MSG_RESULT([ yes ])]) - -AS_IF([test "$ADMSXML" = no], - [AC_MSG_ERROR([need admsXml, but not found. consider --with-mkadms=])]) -AC_SUBST([ADMSXML]) - -dnl Checks for libraries. -AC_CHECK_LIB(m, sin) - -dnl Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS([stddef.h stdlib.h string.h unistd.h ieeefp.h]) - -dnl gtest.h, Google Test support -AC_LANG_PUSH(C++) -GTEST_CPPFLAGS= - -dnl use if available, don't use otherwise. -AC_ARG_WITH([gtest], AS_HELP_STRING( - [--with-gtest=DIR], [Run tests that are implemented for gtest.] - ), - [ - AS_IF([test "x$with_gtest" != "xno"], [ - GTEST_CPPFLAGS="-I$withval/include -I$withval" - with_gtest=manual - ]) - ], -[ - AC_CHECK_HEADER([gtest/gtest.h], - [ with_gtest=yes ], - [ with_gtest=no ]) - ] -) - -# don't know how to check. fix later. -# GTEST_VERSION="1.7.0" - -AM_CONDITIONAL(USE_GTEST, test "x$with_gtest" != "xno") - -AS_IF([test "x$with_gtest" == "xmanual"], [ - OLD_CPPFLAGS="$CPPFLAGS" - CPPFLAGS+=" $GTEST_CPPFLAGS" - AC_CHECK_HEADER([gtest/gtest.h],,[AC_MSG_ERROR([cannot find gtest headers])]) - CPPFLAGS="$OLD_CPPFLAGS" -]) -AC_LANG_POP() - -AC_SUBST(GTEST_CPPFLAGS) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_SIZE_T - -dnl Check for type sizes. -AC_CHECK_SIZEOF([short]) -AC_CHECK_SIZEOF([int]) -AC_CHECK_SIZEOF([long]) - -dnl Check for double type. -AC_ARG_ENABLE([double], - AS_HELP_STRING([--enable-double=TYPE], - [type of double representation @<:@default=double@:>@]), - [case "$enableval" in - no | yes | double) - double_type="double" - double_size=8 - ;; - ldouble) - double_type="long double" - AC_CHECK_SIZEOF([long double],12) - double_size=$ac_cv_sizeof_long_double - ;; - float) - double_type="float" - double_size=4 - ;; - *) - AC_MSG_ERROR([valid types are double, float and ldouble.]) - ;; - esac], - [double_type="double"; double_size=8]) -AC_DEFINE_UNQUOTED(nr_double_t, $double_type, - [The global type of double representation.]) -AC_SUBST(QUCS_DOUBLE_TYPE, $double_type) -AC_DEFINE_UNQUOTED(NR_DOUBLE_SIZE, $double_size, - [The size of the double representation.]) -AC_SUBST(QUCS_DOUBLE_SIZE, $double_size) -unset double_type -unset double_size - -AC_MSG_NOTICE([Check functions in the global namespace]) -dnl http://www.cplusplus.com/reference/cmath/ - -# Trigonometric functions -AC_CHECK_FUNCS([ \ -cos \ -sin \ -tan \ -acos \ -asin \ -atan \ -atan2 \ -]) - -#Hyperbolic functions -AC_CHECK_FUNCS([ \ -cosh \ -sinh \ -tanh \ -acosh \ -asinh \ -atanh \ -]) - -#Exponential and logarithmic functions -AC_CHECK_FUNCS([ \ -exp \ -log \ -log10 \ -modf \ -]) - -#Power functions -AC_CHECK_FUNCS([ \ -pow \ -sqrt \ -hypot \ -]) - -#Error and gamma functions -AC_CHECK_FUNCS([ \ -erf \ -erfc \ -]) - -# Rounding and remainder functions -AC_CHECK_FUNCS([ \ -ceil \ -floor \ -fmod \ -trunc \ -round \ -]) - -# Other functions -AC_CHECK_FUNCS([ \ -fabs \ -]) - -# Bessel functions (libc ?) -AC_CHECK_FUNCS([ jn yn ]) - -# C strings -# \bug strdup not in C++ STL -AC_CHECK_FUNCS([ strdup strerror strchr]) - -dnl Checks for complex classes and functions. -AX_CXX_NAMESPACES -AS_VAR_IF([ax_cv_cxx_namespaces],[yes], - [], - [AC_MSG_ERROR([require a c++ namespace])]) -AX_CXX_HAVE_NUMERIC_LIMITS -AS_VAR_IF([ax_cv_cxx_have_numeric_limits],[yes], - [], - [AC_MSG_ERROR([require a c++ std::numeric_limits<> class])]) - -AC_CXX_HAVE_COMPLEX -AS_IF([test "X$ac_cv_cxx_have_complex" = "X"],[AC_MSG_ERROR([Qucs needs a templated complex class])]) - -AX_CXX_ERASE_ITERATOR_TYPE - - -AC_MSG_NOTICE([Check complex transcendental overload in namespace std]) -dnl http://www.cplusplus.com/reference/complex/ - -AC_CHECK_CXX_COMPLEX_FUNCS([ \ - cos \ - cosh \ - exp \ - log \ - log2 \ - log10 \ -dnl pow \ skip, see below - sin \ - sinh \ - sqrt \ - tan \ - tanh \ -dnl C++11 - acos \ - acosh \ - asin \ - asinh \ - atan \ - atanh ]) - -dnl Check complex values in namespace std -AC_CHECK_CXX_COMPLEX_FUNCS([ \ - real \ - imag \ - abs \ - arg \ - norm \ - conj \ -dnl polar \ skip, see below -dnl C++11 - proj ]) - -dnl functions with two arguments -AC_CHECK_CXX_COMPLEX_POW -AC_CHECK_CXX_COMPLEX_ATAN2 -AC_CHECK_CXX_COMPLEX_FMOD -AC_CHECK_CXX_COMPLEX_POLAR -AC_CHECK_CXX_COMPLEX_POLAR_COMPLEX - - -dnl Depending on the implementation, functions may or may not be included on the std namespace -AC_MSG_NOTICE([Check for functions in std:: namespace]) - for f in std::acosh std::asinh std::atanh std::hypot std::trunc std::round std::erf std::erfc; do - AC_MSG_CHECKING([for $f]) - AC_LINK_IFELSE([AC_LANG_SOURCE( - [[#include - int main() { return $f(0.7) ? 1 : 0; } - ]])], - [AC_MSG_RESULT([yes]) - if test $f = "std::acosh"; then - AC_DEFINE(HAVE_STD_ACOSH, 1, - [Define to 1 if you have the `std::acosh` function.]) - - elif test $f = "std::asinh"; then - AC_DEFINE(HAVE_STD_ASINH, 1, - [Define to 1 if you have the `std::asinh` function.]) - - elif test $f = "std::atanh"; then - AC_DEFINE(HAVE_STD_ATANH, 1, - [Define to 1 if you have the `std::atanh` function.]) - - elif test $f = "std::hypot"; then - AC_DEFINE(HAVE_STD_HYPOT, 1, - [Define to 1 if you have the `std::hypot` function.]) - - elif test $f = "std::fmod"; then - AC_DEFINE(HAVE_STD_FMOD, 1, - [Define to 1 if you have the `std::fmod` function.]) - - elif test $f = "std::trund"; then - AC_DEFINE(HAVE_STD_TRUNC, 1, - [Define to 1 if you have the `std::trunc` function.]) - - elif test $f = "std::round"; then - AC_DEFINE(HAVE_STD_ROUND, 1, - [Define to 1 if you have the `std::round` function.]) - - elif test $f = "std::erf"; then - AC_DEFINE(HAVE_STD_ERF, 1, - [Define to 1 if you have the `std::erf` function.]) - - elif test $f = "std::erfc"; then - AC_DEFINE(HAVE_STD_ERFC, 1, - [Define to 1 if you have the `std::erfc` function.]) - fi], - [AC_MSG_RESULT([no])]) - done - - -dnl BUG. remove option. always run tests -dnl FIXME: skip tests that are not applicable (and be verbose about that). -AC_ARG_ENABLE([qucs-test], - AS_HELP_STRING([--enable-qucs-test], [Enable running qucs test project])) -AM_CONDITIONAL([USE_QUCS_TEST], [test "$enable_qucs_test" = yes]) - -# enable gcov -AX_CODE_COVERAGE -AS_IF([ test "$enable_code_coverage" = "yes" ], - [AX_APPEND_COMPILE_FLAGS([--coverage],CFLAGS) - AX_APPEND_COMPILE_FLAGS([-fno-inline],CFLAGS) - AX_APPEND_COMPILE_FLAGS([--coverage],CXXFLAGS) - AX_APPEND_COMPILE_FLAGS([-fno-inline],CXXFLAGS) - AX_APPEND_LINK_FLAGS([--coverage],LDFLAGS) - AX_APPEND_LINK_FLAGS([-lgcov],LDFLAGS) - ],[]) - -dnl Definitions at top of . -AH_TOP([ -/* __BEGIN_DECLS should be used at the beginning of your declarations, - so that C++ compilers do not mangle their names. Use __END_DECLS at - the end of C declarations. */ -#undef __BEGIN_DECLS -#undef __END_DECLS -#ifdef __cplusplus -# define __BEGIN_DECLS extern "C" { -# define __END_DECLS } -#else -# define __BEGIN_DECLS -# define __END_DECLS -#endif - -#ifndef _GNU_SOURCE -#define _GNU_SOURCE 1 -#endif -]) - - - -dnl Add here all your Makefiles. These are created by configure. -AC_CONFIG_FILES([Makefile - qucs_typedefs.h - doc/Makefile - src/Makefile - src/math/Makefile - src/interface/Makefile - src/converter/Makefile - src/components/Makefile - src/components/microstrip/Makefile - src/components/devices/Makefile - src/components/digital/Makefile - src/components/verilog/Makefile - tests/Makefile - doc/qucsator.1 - doc/qucsconv.1 - ]) - - -dnl Check for Git short SHA to tag version -dnl The release package should also keep it on the config.h -AC_PATH_PROG([GIT],[git],[]) -AS_IF([test -d "../.git"], - [AS_IF([test X"$GIT" != "X"], - [AC_MSG_CHECKING([for git tree revision]) - GIT_REVISION=`git log --pretty=format:'%h' -n 1u` - AC_DEFINE_UNQUOTED([GIT_REVISION], ["$GIT_REVISION"], [Git short revision hash.]) - AC_MSG_RESULT($GIT_REVISION)])]) - -AC_OUTPUT - -dnl Print results. -AC_MSG_RESULT([]) -AC_MSG_RESULT([ $PACKAGE version $VERSION ($GIT_REVISION) configured successfully.]) -AC_MSG_RESULT([ -Configure Information: - AdmsXml : $ADMSXML - - C Compiler : $CC - DEFS : $DEFS - CPPFLAGS : $CPPFLAGS - CFLAGS : $CFLAGS - - C++ Compiler : $CXX - DEFS : $DEFS - CPPFLAGS : $CPPFLAGS - CXXFLAGS : $CXXFLAGS - - Linker : $LD - LDFLAGS : $LDFLAGS - LIBS : $LIBS - - gtest : $with_gtest - CPPFLAGS : $GTEST_CPPFLAGS - - Prefix : $prefix -]) - -# vim:ts=8:sw=2:noet diff --git a/doc/Makefile.am b/doc/Makefile.am deleted file mode 100644 index 6ce66344..00000000 --- a/doc/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -## Process this file with automake to produce Makefile.in -# -# doc/Makefile.am -# -# Automake input file. -# -# Copyright (C) 2003, 2004, 2005 Stefan Jahn -# -# This 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 software 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 package; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, -# Boston, MA 02110-1301, USA. -# - -EXTRA_DIST = PLATFORMS - -dist_man_MANS = qucsator.1 qucsconv.1 - -CLEANFILES = *~ *.orig *.rej -MAINTAINERCLEANFILES = Makefile.in diff --git a/m4/ax_append_compile_flags.m4 b/m4/ax_append_compile_flags.m4 deleted file mode 100644 index dc7b8660..00000000 --- a/m4/ax_append_compile_flags.m4 +++ /dev/null @@ -1,65 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS]) -# -# DESCRIPTION -# -# For every FLAG1, FLAG2 it is checked whether the compiler works with the -# flag. If it does, the flag is added FLAGS-VARIABLE -# -# If FLAGS-VARIABLE is not specified, the current language's flags (e.g. -# CFLAGS) is used. During the check the flag is always added to the -# current language's flags. -# -# If EXTRA-FLAGS is defined, it is added to the current language's default -# flags (e.g. CFLAGS) when the check is done. The check is thus made with -# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to -# force the compiler to issue an error when a bad flag is given. -# -# NOTE: This macro depends on the AX_APPEND_FLAG and -# AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with -# AX_APPEND_LINK_FLAGS. -# -# LICENSE -# -# Copyright (c) 2011 Maarten Bosmans -# -# 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 . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 4 - -AC_DEFUN([AX_APPEND_COMPILE_FLAGS], -[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) -AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) -for flag in $1; do - AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3]) -done -])dnl AX_APPEND_COMPILE_FLAGS diff --git a/m4/ax_append_flag.m4 b/m4/ax_append_flag.m4 deleted file mode 100644 index d26286c1..00000000 --- a/m4/ax_append_flag.m4 +++ /dev/null @@ -1,71 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_append_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE]) -# -# DESCRIPTION -# -# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space -# added in between. -# -# If FLAGS-VARIABLE is not specified, the current language's flags (e.g. -# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains -# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly -# FLAG. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2011 Maarten Bosmans -# -# 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 . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 4 - -AC_DEFUN([AX_APPEND_FLAG], -[dnl -AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF -AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])]) -AS_VAR_SET_IF(FLAGS,[ - AS_CASE([AS_VAR_GET(FLAGS)], - ["* $1 *|*$1"],[AC_RUN_LOG([: FLAGS already contains $1])], - [ - AS_VAR_APPEND(FLAGS," $1") - AC_RUN_LOG([: FLAGS="$FLAGS"]) - ]) - ], - [ - AS_VAR_SET(FLAGS,[$1]) - AC_RUN_LOG([: FLAGS="$FLAGS"]) - ]) -AS_VAR_POPDEF([FLAGS])dnl -])dnl AX_APPEND_FLAG diff --git a/m4/ax_append_link_flags.m4 b/m4/ax_append_link_flags.m4 deleted file mode 100644 index c73ddafc..00000000 --- a/m4/ax_append_link_flags.m4 +++ /dev/null @@ -1,63 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS]) -# -# DESCRIPTION -# -# For every FLAG1, FLAG2 it is checked whether the linker works with the -# flag. If it does, the flag is added FLAGS-VARIABLE -# -# If FLAGS-VARIABLE is not specified, the linker's flags (LDFLAGS) is -# used. During the check the flag is always added to the linker's flags. -# -# If EXTRA-FLAGS is defined, it is added to the linker's default flags -# when the check is done. The check is thus made with the flags: "LDFLAGS -# EXTRA-FLAGS FLAG". This can for example be used to force the linker to -# issue an error when a bad flag is given. -# -# NOTE: This macro depends on the AX_APPEND_FLAG and AX_CHECK_LINK_FLAG. -# Please keep this macro in sync with AX_APPEND_COMPILE_FLAGS. -# -# LICENSE -# -# Copyright (c) 2011 Maarten Bosmans -# -# 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 . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 4 - -AC_DEFUN([AX_APPEND_LINK_FLAGS], -[AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) -AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) -for flag in $1; do - AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3]) -done -])dnl AX_APPEND_LINK_FLAGS diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4 deleted file mode 100644 index f9d83e8c..00000000 --- a/m4/ax_check_compile_flag.m4 +++ /dev/null @@ -1,74 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) -# -# DESCRIPTION -# -# Check whether the given FLAG works with the current language's compiler -# or gives an error. (Warnings, however, are ignored) -# -# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -# success/failure. -# -# If EXTRA-FLAGS is defined, it is added to the current language's default -# flags (e.g. CFLAGS) when the check is done. The check is thus made with -# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to -# force the compiler to issue an error when a bad flag is given. -# -# INPUT gives an alternative input source to AC_COMPILE_IFELSE. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2011 Maarten Bosmans -# -# 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 . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 4 - -AC_DEFUN([AX_CHECK_COMPILE_FLAG], -[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX -AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl -AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ - ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS - _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" - AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) - _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) -AS_VAR_IF(CACHEVAR,yes, - [m4_default([$2], :)], - [m4_default([$3], :)]) -AS_VAR_POPDEF([CACHEVAR])dnl -])dnl AX_CHECK_COMPILE_FLAGS diff --git a/m4/ax_check_link_flag.m4 b/m4/ax_check_link_flag.m4 deleted file mode 100644 index eb01a6ce..00000000 --- a/m4/ax_check_link_flag.m4 +++ /dev/null @@ -1,74 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) -# -# DESCRIPTION -# -# Check whether the given FLAG works with the linker or gives an error. -# (Warnings, however, are ignored) -# -# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -# success/failure. -# -# If EXTRA-FLAGS is defined, it is added to the linker's default flags -# when the check is done. The check is thus made with the flags: "LDFLAGS -# EXTRA-FLAGS FLAG". This can for example be used to force the linker to -# issue an error when a bad flag is given. -# -# INPUT gives an alternative input source to AC_LINK_IFELSE. -# -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG. -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2011 Maarten Bosmans -# -# 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 . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 4 - -AC_DEFUN([AX_CHECK_LINK_FLAG], -[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF -AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl -AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ - ax_check_save_flags=$LDFLAGS - LDFLAGS="$LDFLAGS $4 $1" - AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], - [AS_VAR_SET(CACHEVAR,[yes])], - [AS_VAR_SET(CACHEVAR,[no])]) - LDFLAGS=$ax_check_save_flags]) -AS_VAR_IF(CACHEVAR,yes, - [m4_default([$2], :)], - [m4_default([$3], :)]) -AS_VAR_POPDEF([CACHEVAR])dnl -])dnl AX_CHECK_LINK_FLAGS diff --git a/m4/ax_code_coverage.m4 b/m4/ax_code_coverage.m4 deleted file mode 100644 index 2751459c..00000000 --- a/m4/ax_code_coverage.m4 +++ /dev/null @@ -1,229 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_code_coverage.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CODE_COVERAGE() -# -# DESCRIPTION -# -# Defines CODE_COVERAGE_CFLAGS and CODE_COVERAGE_LDFLAGS which should be -# included in the CFLAGS and LIBS/LDFLAGS variables of every build target -# (program or library) which should be built with code coverage support. -# Also defines CODE_COVERAGE_RULES which should be substituted in your -# Makefile; and $enable_code_coverage which can be used in subsequent -# configure output. CODE_COVERAGE_ENABLED is defined and substituted, and -# corresponds to the value of the --enable-code-coverage option, which -# defaults to being disabled. -# -# Test also for gcov program and create GCOV variable that could be -# substituted. -# -# Note that all optimisation flags in CFLAGS must be disabled when code -# coverage is enabled. -# -# Usage example: -# -# configure.ac: -# -# AX_CODE_COVERAGE -# -# Makefile.am: -# -# @CODE_COVERAGE_RULES@ -# my_program_LIBS = ... $(CODE_COVERAGE_LDFLAGS) ... -# my_program_CFLAGS = ... $(CODE_COVERAGE_CFLAGS) ... -# -# This results in a "check-code-coverage" rule being added to any -# Makefile.am which includes "@CODE_COVERAGE_RULES@" (assuming the module -# has been configured with --enable-code-coverage). Running `make -# check-code-coverage` in that directory will run the module's test suite -# (`make check`) and build a code coverage report detailing the code which -# was touched, then print the URI for the report. -# -# This code was derived from Makefile.decl in GLib, originally licenced -# under LGPLv2.1+. -# -# LICENSE -# -# Copyright (c) 2012 Philip Withnall -# Copyright (c) 2012 Xan Lopez -# Copyright (c) 2012 Christian Persch -# Copyright (c) 2012 Paolo Borelli -# Copyright (c) 2012 Dan Winship -# Copyright (c) 2015 Bastien ROUCARIES -# -# This library is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or (at -# your option) any later version. -# -# This library 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 Lesser -# General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see . - -#serial 5 - -AC_DEFUN([AX_CODE_COVERAGE],[ - dnl Check for --enable-code-coverage - AC_REQUIRE([AC_PROG_SED]) - - # allow to override gcov location - AC_ARG_WITH([gcov], - [AS_HELP_STRING([--with-gcov[=GCOV]], [use given GCOV for coverage (GCOV=gcov).])], - [_AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov], - [_AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov]) - - AC_MSG_CHECKING([whether to build with code coverage support]) - AC_ARG_ENABLE([code-coverage], - AS_HELP_STRING([--enable-code-coverage], - [Whether to enable code coverage support]),, - enable_code_coverage=no) - - AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test x$enable_code_coverage = xyes]) - AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage]) - AC_MSG_RESULT($enable_code_coverage) - - AS_IF([ test "$enable_code_coverage" = "yes" ], [ - # check for gcov - AC_CHECK_TOOL([GCOV], - [$_AX_CODE_COVERAGE_GCOV_PROG_WITH], - [:]) - AS_IF([test "X$GCOV" = "X:"], - [AC_MSG_ERROR([gcov is needed to do coverage])]) - AC_SUBST([GCOV]) - - dnl Check if gcc is being used - AS_IF([ test "$GCC" = "no" ], [ - AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage]) - ]) - - # List of supported lcov versions. - lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11" - - AC_CHECK_PROG([LCOV], [lcov], [lcov]) - AC_CHECK_PROG([GENHTML], [genhtml], [genhtml]) - - AS_IF([ test "$LCOV" ], [ - AC_CACHE_CHECK([for lcov version], ax_cv_lcov_version, [ - ax_cv_lcov_version=invalid - lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'` - for lcov_check_version in $lcov_version_list; do - if test "$lcov_version" = "$lcov_check_version"; then - ax_cv_lcov_version="$lcov_check_version (ok)" - fi - done - ]) - ], [ - lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list" - AC_MSG_ERROR([$lcov_msg]) - ]) - - case $ax_cv_lcov_version in - ""|invalid[)] - lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)." - AC_MSG_ERROR([$lcov_msg]) - LCOV="exit 0;" - ;; - esac - - AS_IF([ test -z "$GENHTML" ], [ - AC_MSG_ERROR([Could not find genhtml from the lcov package]) - ]) - - dnl Build the code coverage flags - CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" - CODE_COVERAGE_LDFLAGS="-lgcov" - - AC_SUBST([CODE_COVERAGE_CFLAGS]) - AC_SUBST([CODE_COVERAGE_LDFLAGS]) - ]) - -CODE_COVERAGE_RULES=' -# Code coverage -# -# Optional: -# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. -# (Default: $(top_builddir)) -# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated -# by lcov for code coverage. (Default: -# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info) -# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage -# reports to be created. (Default: -# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage) -# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov -# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the lcov instance. -# (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) -# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the lcov instance. -# (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) -# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml -# instance. (Default: empty) -# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore -# -# The generated report will be titled using the $(PACKAGE_NAME) and -# $(PACKAGE_VERSION). In order to add the current git hash to the title, -# use the git-version-gen script, available online. - -# Optional variables -CODE_COVERAGE_DIRECTORY ?= $(top_builddir) -CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info -CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage -CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)" -CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) -CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) -CODE_COVERAGE_GENHTML_OPTIONS ?= -CODE_COVERAGE_IGNORE_PATTERN ?= - -code_coverage_quiet = $(code_coverage_quiet_$(V)) -code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY)) -code_coverage_quiet_0 = --quiet - -# Use recursive makes in order to ignore errors during check -check-code-coverage: -ifeq ($(CODE_COVERAGE_ENABLED),yes) - -$(MAKE) $(AM_MAKEFLAGS) -k check - $(MAKE) $(AM_MAKEFLAGS) code-coverage-capture -else - @echo "Need to reconfigure with --enable-code-coverage" -endif - -# Capture code coverage data -code-coverage-capture: code-coverage-capture-hook -ifeq ($(CODE_COVERAGE_ENABLED),yes) - $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_OPTIONS) - $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" - -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp - LANG=C $(GENHTML) $(code_coverage_quiet) --prefix $(CODE_COVERAGE_DIRECTORY) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) - @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" -else - @echo "Need to reconfigure with --enable-code-coverage" -endif - -# Hook rule executed before code-coverage-capture, overridable by the user -code-coverage-capture-hook: - -ifeq ($(CODE_COVERAGE_ENABLED),yes) -clean: code-coverage-clean -code-coverage-clean: - -$(LCOV) --directory $(top_builddir) -z - -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) - -find . -name "*.gcda" -o -name "*.gcov" -delete -endif - -GITIGNOREFILES ?= -GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) - -DISTCHECK_CONFIGURE_FLAGS ?= -DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage - -.PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean -' - - AC_SUBST([CODE_COVERAGE_RULES]) - m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([CODE_COVERAGE_RULES])]) -]) diff --git a/m4/ax_compiler_vendor.m4 b/m4/ax_compiler_vendor.m4 deleted file mode 100644 index c2f421bc..00000000 --- a/m4/ax_compiler_vendor.m4 +++ /dev/null @@ -1,85 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_compiler_vendor.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_COMPILER_VENDOR -# -# DESCRIPTION -# -# Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, sun, -# hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, microsoft, -# watcom, etc. The vendor is returned in the cache variable -# $ax_cv_c_compiler_vendor for C and $ax_cv_cxx_compiler_vendor for C++. -# -# LICENSE -# -# Copyright (c) 2008 Steven G. Johnson -# Copyright (c) 2008 Matteo Frigo -# -# 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 . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 12 - -AC_DEFUN([AX_COMPILER_VENDOR], -[AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor, - [# note: don't check for gcc first since some other compilers define __GNUC__ - vendors="intel: __ICC,__ECC,__INTEL_COMPILER - ibm: __xlc__,__xlC__,__IBMC__,__IBMCPP__ - pathscale: __PATHCC__,__PATHSCALE__ - clang: __clang__ - fujitsu: __FUJITSU - gnu: __GNUC__ - sun: __SUNPRO_C,__SUNPRO_CC - hp: __HP_cc,__HP_aCC - dec: __DECC,__DECCXX,__DECC_VER,__DECCXX_VER - borland: __BORLANDC__,__TURBOC__ - comeau: __COMO__ - cray: _CRAYC - kai: __KCC - lcc: __LCC__ - sgi: __sgi,sgi - microsoft: _MSC_VER - metrowerks: __MWERKS__ - watcom: __WATCOMC__ - portland: __PGI - unknown: UNKNOWN" - for ventest in $vendors; do - case $ventest in - *:) vendor=$ventest; continue ;; - *) vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")" ;; - esac - AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[ - #if !($vencpp) - thisisanerror; - #endif - ])], [break]) - done - ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=`echo $vendor | cut -d: -f1` - ]) -]) diff --git a/m4/ax_cxx_compile_stdcxx_11.m4 b/m4/ax_cxx_compile_stdcxx_11.m4 deleted file mode 100644 index 163a4c64..00000000 --- a/m4/ax_cxx_compile_stdcxx_11.m4 +++ /dev/null @@ -1,142 +0,0 @@ -# ============================================================================ -# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html -# ============================================================================ -# -# SYNOPSIS -# -# AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional]) -# -# DESCRIPTION -# -# Check for baseline language coverage in the compiler for the C++11 -# standard; if necessary, add switches to CXXFLAGS to enable support. -# -# The first argument, if specified, indicates whether you insist on an -# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. -# -std=c++11). If neither is specified, you get whatever works, with -# preference for an extended mode. -# -# The second argument, if specified 'mandatory' or if left unspecified, -# indicates that baseline C++11 support is required and that the macro -# should error out if no mode with that support is found. If specified -# 'optional', then configuration proceeds regardless, after defining -# HAVE_CXX11 if and only if a supporting mode is found. -# -# LICENSE -# -# Copyright (c) 2008 Benjamin Kosnik -# Copyright (c) 2012 Zack Weinberg -# Copyright (c) 2013 Roy Stogner -# Copyright (c) 2014 Alexey Sokolov -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 4 - -m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[ - template - struct check - { - static_assert(sizeof(int) <= sizeof(T), "not big enough"); - }; - - struct Base { - virtual void f() {} - }; - struct Child : public Base { - virtual void f() override {} - }; - - typedef check> right_angle_brackets; - - int a; - decltype(a) b; - - typedef check check_type; - check_type c; - check_type&& cr = static_cast(c); - - auto d = a; - auto l = [](){}; -]]) - -AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl - m4_if([$1], [], [], - [$1], [ext], [], - [$1], [noext], [], - [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl - m4_if([$2], [], [ax_cxx_compile_cxx11_required=true], - [$2], [mandatory], [ax_cxx_compile_cxx11_required=true], - [$2], [optional], [ax_cxx_compile_cxx11_required=false], - [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])]) - AC_LANG_PUSH([C++])dnl - ac_success=no - AC_CACHE_CHECK(whether $CXX supports C++11 features by default, - ax_cv_cxx_compile_cxx11, - [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], - [ax_cv_cxx_compile_cxx11=yes], - [ax_cv_cxx_compile_cxx11=no])]) - if test x$ax_cv_cxx_compile_cxx11 = xyes; then - ac_success=yes - fi - - m4_if([$1], [noext], [], [dnl - if test x$ac_success = xno; then - for switch in -std=gnu++11 -std=gnu++0x; do - cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) - AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, - $cachevar, - [ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $switch" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], - [eval $cachevar=yes], - [eval $cachevar=no]) - CXXFLAGS="$ac_save_CXXFLAGS"]) - if eval test x\$$cachevar = xyes; then - CXXFLAGS="$CXXFLAGS $switch" - ac_success=yes - break - fi - done - fi]) - - m4_if([$1], [ext], [], [dnl - if test x$ac_success = xno; then - for switch in -std=c++11 -std=c++0x; do - cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) - AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, - $cachevar, - [ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $switch" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], - [eval $cachevar=yes], - [eval $cachevar=no]) - CXXFLAGS="$ac_save_CXXFLAGS"]) - if eval test x\$$cachevar = xyes; then - CXXFLAGS="$CXXFLAGS $switch" - ac_success=yes - break - fi - done - fi]) - AC_LANG_POP([C++]) - if test x$ax_cxx_compile_cxx11_required = xtrue; then - if test x$ac_success = xno; then - AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.]) - fi - else - if test x$ac_success = xno; then - HAVE_CXX11=0 - AC_MSG_NOTICE([No compiler with C++11 support was found]) - else - HAVE_CXX11=1 - AC_DEFINE(HAVE_CXX11,1, - [define if the compiler supports basic C++11 syntax]) - fi - - AC_SUBST(HAVE_CXX11) - fi -]) diff --git a/m4/ax_cxx_erase_iterator_type.m4 b/m4/ax_cxx_erase_iterator_type.m4 deleted file mode 100644 index 83bc85e4..00000000 --- a/m4/ax_cxx_erase_iterator_type.m4 +++ /dev/null @@ -1,72 +0,0 @@ -# ================================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_cxx_erase_iterator_type.html -# ================================================================================== -# -# SYNOPSIS -# -# AX_CXX_ERASE_ITERATOR_TYPE -# -# DESCRIPTION -# -# If the compiler supports define erase with constant iterator or with -# classical iterator. -# -# Define autoconfigured_erase_iterator to const_iterator if supported -# and iterator if not supported. -# -# Define HAVE_ERASE_CONSTANT_ITERATOR if supported -# -# LICENSE -# -# Copyright (c) 2015 Bastien ROUCARIES -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 1 - -AC_DEFUN([AX_CXX_ERASE_ITERATOR_TYPE], -[dnl - AC_CACHE_CHECK([the type of iterator inside erase function], - ax_cv_cxx_erase_iterator_type, - [dnl - AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([dnl - AC_LANG_PROGRAM([ - #include - - typedef std::vector intvector; - - struct myvector { - myvector() { v.push_back(1); } - typedef intvector::const_iterator const_iterator; - typedef intvector::iterator iterator; - iterator erase (const_iterator position) - { return v.erase(position); }; - iterator erase (const_iterator first, const_iterator last) - { return v.erase(first,last); }; - intvector v; - }; - ], - [myvector v; - v.erase(v.v.begin(),v.v.end()); - return 1; - ])], - ax_cv_cxx_erase_iterator_type="const_iterator", - ax_cv_cxx_erase_iterator_type="iterator") - AC_LANG_POP([C++]) - ]) - AS_IF([test "X$ax_cv_cxx_erase_iterator_type" = Xconst_iterator], - [AC_DEFINE(HAVE_ERASE_CONSTANT_ITERATOR,,[define if the compiler supports iterator erase(const_iterator position)])]) - AH_VERBATIM([autoconfigured_erase_iterator], - [/* Define to the keyword(s) used to specify the type of the - erase iterator. Define to const_iterator if constant - or iterator if not constant. */ - #undef autoconfigured_erase_iterator - ]) - AC_DEFINE_UNQUOTED([autoconfigured_erase_iterator], - [$ax_cv_cxx_erase_iterator_type], - [iterator type for erase]) -]) diff --git a/m4/ax_cxx_have_numeric_limits.m4 b/m4/ax_cxx_have_numeric_limits.m4 deleted file mode 100644 index 776e4d70..00000000 --- a/m4/ax_cxx_have_numeric_limits.m4 +++ /dev/null @@ -1,42 +0,0 @@ -# ============================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_cxx_have_numeric_limits.html -# ============================================================================== -# -# SYNOPSIS -# -# AX_CXX_HAVE_NUMERIC_LIMITS -# -# DESCRIPTION -# -# If the compiler has numeric_limits, define HAVE_NUMERIC_LIMITS. -# -# LICENSE -# -# Copyright (c) 2008 Todd Veldhuizen -# Copyright (c) 2008 Luc Maisonobe -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 6 - -AU_ALIAS([AC_CXX_HAVE_NUMERIC_LIMITS], [AX_CXX_HAVE_NUMERIC_LIMITS]) -AC_DEFUN([AX_CXX_HAVE_NUMERIC_LIMITS], -[AC_CACHE_CHECK(whether the compiler has numeric_limits, -ax_cv_cxx_have_numeric_limits, -[AC_REQUIRE([AX_CXX_NAMESPACES]) - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([#include -#ifdef HAVE_NAMESPACES -using namespace std; -#endif],[double e = numeric_limits::epsilon(); return 0;], - ax_cv_cxx_have_numeric_limits=yes, ax_cv_cxx_have_numeric_limits=no) - AC_LANG_RESTORE -]) -if test "$ax_cv_cxx_have_numeric_limits" = yes; then - AC_DEFINE(HAVE_NUMERIC_LIMITS,,[define if the compiler has numeric_limits]) -fi -]) diff --git a/m4/ax_cxx_namespaces.m4 b/m4/ax_cxx_namespaces.m4 deleted file mode 100644 index 664c8cba..00000000 --- a/m4/ax_cxx_namespaces.m4 +++ /dev/null @@ -1,40 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_cxx_namespaces.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CXX_NAMESPACES -# -# DESCRIPTION -# -# If the compiler can prevent names clashes using namespaces, define -# HAVE_NAMESPACES. -# -# LICENSE -# -# Copyright (c) 2008 Todd Veldhuizen -# Copyright (c) 2008 Luc Maisonobe -# Copyright (c) 2013 Bastien Roucaries -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 8 - -AU_ALIAS([AC_CXX_NAMESPACES], [AX_CXX_NAMESPACES]) -AC_DEFUN([AX_CXX_NAMESPACES], -[AC_CACHE_CHECK(whether the compiler implements namespaces, -ax_cv_cxx_namespaces, -[AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([namespace Outer { namespace Inner { int i = 0; }} - using namespace Outer::Inner; int foo(void) { return i;} ])], - ax_cv_cxx_namespaces=yes, ax_cv_cxx_namespaces=no) - AC_LANG_POP -]) -if test "$ax_cv_cxx_namespaces" = yes; then - AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) -fi -]) diff --git a/m4/ax_prefix_config_h.m4 b/m4/ax_prefix_config_h.m4 deleted file mode 100644 index 67be7b93..00000000 --- a/m4/ax_prefix_config_h.m4 +++ /dev/null @@ -1,209 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_prefix_config_h.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PREFIX_CONFIG_H [(OUTPUT-HEADER [,PREFIX [,ORIG-HEADER]])] -# -# DESCRIPTION -# -# This is a new variant from ac_prefix_config_ this one will use a -# lowercase-prefix if the config-define was starting with a -# lowercase-char, e.g. "#define const", "#define restrict", or "#define -# off_t", (and this one can live in another directory, e.g. -# testpkg/config.h therefore I decided to move the output-header to be the -# first arg) -# -# takes the usual config.h generated header file; looks for each of the -# generated "#define SOMEDEF" lines, and prefixes the defined name (ie. -# makes it "#define PREFIX_SOMEDEF". The result is written to the output -# config.header file. The PREFIX is converted to uppercase for the -# conversions. -# -# Defaults: -# -# OUTPUT-HEADER = $PACKAGE-config.h -# PREFIX = $PACKAGE -# ORIG-HEADER, from AM_CONFIG_HEADER(config.h) -# -# Your configure.ac script should contain both macros in this order, and -# unlike the earlier variations of this prefix-macro it is okay to place -# the AX_PREFIX_CONFIG_H call before the AC_OUTPUT invocation. -# -# Example: -# -# AC_INIT(config.h.in) # config.h.in as created by "autoheader" -# AM_INIT_AUTOMAKE(testpkg, 0.1.1) # makes #undef VERSION and PACKAGE -# AM_CONFIG_HEADER(config.h) # prep config.h from config.h.in -# AX_PREFIX_CONFIG_H(mylib/_config.h) # prep mylib/_config.h from it.. -# AC_MEMORY_H # makes "#undef NEED_MEMORY_H" -# AC_C_CONST_H # makes "#undef const" -# AC_OUTPUT(Makefile) # creates the "config.h" now -# # and also mylib/_config.h -# -# if the argument to AX_PREFIX_CONFIG_H would have been omitted then the -# default outputfile would have been called simply "testpkg-config.h", but -# even under the name "mylib/_config.h" it contains prefix-defines like -# -# #ifndef TESTPKG_VERSION -# #define TESTPKG_VERSION "0.1.1" -# #endif -# #ifndef TESTPKG_NEED_MEMORY_H -# #define TESTPKG_NEED_MEMORY_H 1 -# #endif -# #ifndef _testpkg_const -# #define _testpkg_const _const -# #endif -# -# and this "mylib/_config.h" can be installed along with other -# header-files, which is most convenient when creating a shared library -# (that has some headers) where some functionality is dependent on the -# OS-features detected at compile-time. No need to invent some -# "mylib-confdefs.h.in" manually. :-) -# -# Note that some AC_DEFINEs that end up in the config.h file are actually -# self-referential - e.g. AC_C_INLINE, AC_C_CONST, and the AC_TYPE_OFF_T -# say that they "will define inline|const|off_t if the system does not do -# it by itself". You might want to clean up about these - consider an -# extra mylib/conf.h that reads something like: -# -# #include -# #ifndef _testpkg_const -# #define _testpkg_const const -# #endif -# -# and then start using _testpkg_const in the header files. That is also a -# good thing to differentiate whether some library-user has starting to -# take up with a different compiler, so perhaps it could read something -# like this: -# -# #ifdef _MSC_VER -# #include -# #else -# #include -# #endif -# #ifndef _testpkg_const -# #define _testpkg_const const -# #endif -# -# LICENSE -# -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2008 Marten Svantesson -# Copyright (c) 2008 Gerald Point -# -# 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 . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 11 - -AC_DEFUN([AX_PREFIX_CONFIG_H],[dnl -AC_PREREQ([2.62]) -AC_BEFORE([AC_CONFIG_HEADERS],[$0])dnl -AC_CONFIG_COMMANDS([ifelse($1,,$PACKAGE-config.h,$1)],[dnl -AS_VAR_PUSHDEF([_OUT],[ac_prefix_conf_OUT])dnl -AS_VAR_PUSHDEF([_DEF],[ac_prefix_conf_DEF])dnl -AS_VAR_PUSHDEF([_PKG],[ac_prefix_conf_PKG])dnl -AS_VAR_PUSHDEF([_LOW],[ac_prefix_conf_LOW])dnl -AS_VAR_PUSHDEF([_UPP],[ac_prefix_conf_UPP])dnl -AS_VAR_PUSHDEF([_INP],[ac_prefix_conf_INP])dnl -m4_pushdef([_script],[conftest.prefix])dnl -m4_pushdef([_symbol],[m4_cr_Letters[]m4_cr_digits[]_])dnl -_OUT=`echo ifelse($1, , $PACKAGE-config.h, $1)` -_DEF=`echo _$_OUT | sed -e "y:m4_cr_letters:m4_cr_LETTERS[]:" -e "s/@<:@^m4_cr_Letters@:>@/_/g"` -_PKG=`echo ifelse($2, , $PACKAGE, $2)` -_LOW=`echo _$_PKG | sed -e "y:m4_cr_LETTERS-:m4_cr_letters[]_:"` -_UPP=`echo $_PKG | sed -e "y:m4_cr_letters-:m4_cr_LETTERS[]_:" -e "/^@<:@m4_cr_digits@:>@/s/^/_/"` -_INP=`echo "ifelse($3,,,$3)" | sed -e 's/ *//'` -if test ".$_INP" = "."; then - for ac_file in : $CONFIG_HEADERS; do test "_$ac_file" = _: && continue - case "$ac_file" in - *.h) _INP=$ac_file ;; - *) - esac - test ".$_INP" != "." && break - done -fi -if test ".$_INP" = "."; then - case "$_OUT" in - */*) _INP=`basename "$_OUT"` - ;; - *-*) _INP=`echo "$_OUT" | sed -e "s/@<:@_symbol@:>@*-//"` - ;; - *) _INP=config.h - ;; - esac -fi -if test -z "$_PKG" ; then - AC_MSG_ERROR([no prefix for _PREFIX_PKG_CONFIG_H]) -else - if test ! -f "$_INP" ; then if test -f "$srcdir/$_INP" ; then - _INP="$srcdir/$_INP" - fi fi - AC_MSG_NOTICE(creating $_OUT - prefix $_UPP for $_INP defines) - if test -f $_INP ; then - AS_ECHO(["s/^@%:@undef *\\(@<:@m4_cr_LETTERS[]_@:>@\\)/@%:@undef $_UPP""_\\1/"]) > _script - AS_ECHO(["s/^@%:@undef *\\(@<:@m4_cr_letters@:>@\\)/@%:@undef $_LOW""_\\1/"]) >> _script - AS_ECHO(["s/^@%:@def[]ine *\\(@<:@m4_cr_LETTERS[]_@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_UPP""_\\1\\"]) >> _script - AS_ECHO(["@%:@def[]ine $_UPP""_\\1\\2\\"]) >> _script - AS_ECHO(["@%:@endif/"]) >> _script - AS_ECHO(["s/^@%:@def[]ine *\\(@<:@m4_cr_letters@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_LOW""_\\1\\"]) >> _script - AS_ECHO(["@%:@define $_LOW""_\\1\\2\\"]) >> _script - AS_ECHO(["@%:@endif/"]) >> _script - # now executing _script on _DEF input to create _OUT output file - echo "@%:@ifndef $_DEF" >$tmp/pconfig.h - echo "@%:@def[]ine $_DEF 1" >>$tmp/pconfig.h - echo ' ' >>$tmp/pconfig.h - echo /'*' $_OUT. Generated automatically at end of configure. '*'/ >>$tmp/pconfig.h - - sed -f _script $_INP >>$tmp/pconfig.h - echo ' ' >>$tmp/pconfig.h - echo '/* once:' $_DEF '*/' >>$tmp/pconfig.h - echo "@%:@endif" >>$tmp/pconfig.h - if cmp -s $_OUT $tmp/pconfig.h 2>/dev/null; then - AC_MSG_NOTICE([$_OUT is unchanged]) - else - ac_dir=`AS_DIRNAME(["$_OUT"])` - AS_MKDIR_P(["$ac_dir"]) - rm -f "$_OUT" - mv $tmp/pconfig.h "$_OUT" - fi - cp _script _configs.sed - else - AC_MSG_ERROR([input file $_INP does not exist - skip generating $_OUT]) - fi - rm -f conftest.* -fi -m4_popdef([_symbol])dnl -m4_popdef([_script])dnl -AS_VAR_POPDEF([_INP])dnl -AS_VAR_POPDEF([_UPP])dnl -AS_VAR_POPDEF([_LOW])dnl -AS_VAR_POPDEF([_PKG])dnl -AS_VAR_POPDEF([_DEF])dnl -AS_VAR_POPDEF([_OUT])dnl -],[PACKAGE="$PACKAGE"])]) diff --git a/m4/ax_require_defined.m4 b/m4/ax_require_defined.m4 deleted file mode 100644 index cae11112..00000000 --- a/m4/ax_require_defined.m4 +++ /dev/null @@ -1,37 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_require_defined.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_REQUIRE_DEFINED(MACRO) -# -# DESCRIPTION -# -# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have -# been defined and thus are available for use. This avoids random issues -# where a macro isn't expanded. Instead the configure script emits a -# non-fatal: -# -# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found -# -# It's like AC_REQUIRE except it doesn't expand the required macro. -# -# Here's an example: -# -# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) -# -# LICENSE -# -# Copyright (c) 2014 Mike Frysinger -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 1 - -AC_DEFUN([AX_REQUIRE_DEFINED], [dnl - m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])]) -])dnl AX_REQUIRE_DEFINED diff --git a/m4/ax_restore_flags.m4 b/m4/ax_restore_flags.m4 deleted file mode 100644 index aafd3638..00000000 --- a/m4/ax_restore_flags.m4 +++ /dev/null @@ -1,52 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_restore_flags.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_RESTORE_FLAGS([namespace]) -# -# DESCRIPTION -# -# Restore common compilation flags from temporary variables. -# -# Compilation flags includes: CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS, LIBS, -# OBJCFLAGS. -# -# By default these flags are restored to a global (empty) namespace, but -# user could restore from specific NAMESPACE by using -# AX_RESTORE_FLAGS(NAMESPACE) macro. -# -# Typical usage is like: -# -# AX_SAVE_FLAGS(mypackage) -# CPPFLAGS="-Imypackagespath ${CPPFLAGS}" -# dnl ... do some detection ... -# AX_RESTORE_FLAGS(mypackage) -# -# LICENSE -# -# Copyright (c) 2009 Filippo Giunchedi -# Copyright (c) 2011 The Board of Trustees of the Leland Stanford Junior University -# Copyright (c) 2011 Russ Allbery -# Copyright (c) 2013 Bastien ROUCARIES -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 6 - -# save one flag in name space -AC_DEFUN([_AX_RESTORE_ONE_FLAG],[dnl - AS_VAR_PUSHDEF([_ax_restore_flag_var], [$2[]_$1[]_ax_save_flags]) - AS_VAR_COPY($2[],_ax_restore_flag_var) - AS_VAR_POPDEF([_ax_restore_flag_var]) -]) - -AC_DEFUN([AX_RESTORE_FLAGS], [dnl - m4_foreach([FLAG], dnl - [_AX_SAVE_FLAGS_LIST()], dnl - [_AX_RESTORE_ONE_FLAG([$1],FLAG)]) -]) diff --git a/m4/ax_save_flags.m4 b/m4/ax_save_flags.m4 deleted file mode 100644 index 39f45be4..00000000 --- a/m4/ax_save_flags.m4 +++ /dev/null @@ -1,71 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_save_flags.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_SAVE_FLAGS([NAMESPACE]) -# -# DESCRIPTION -# -# Save common compilation flags into temporary variables. -# -# Compilation flags includes: CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS, LIBS, -# OBJCFLAGS. -# -# By default these flags are saved to a global (empty) namespace, but user -# could specify a specific NAMESPACE to AX_SAVE_FLAGS macro and latter -# restore it by using AX_RESTORE_FLAGS(NAMESPACE). -# -# AX_SAVE_FLAGS(mypackage) -# CPPFLAGS="-Imypackagespath ${CPPFLAGS}" -# dnl .. do some detection ... -# AX_RESTORE_FLAGS(mypackage) -# -# LICENSE -# -# Copyright (c) 2009 Filippo Giunchedi -# Copyright (c) 2011 The Board of Trustees of the Leland Stanford Junior University -# Copyright (c) 2011 Russ Allbery -# Copyright (c) 2013 Bastien ROUCARIES -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 7 - -# list of flag to save -AC_DEFUN([_AX_SAVE_FLAGS_LIST],[dnl -[CCASFLAGS],dnl -[CFLAGS],dnl -[CPPFLAGS],dnl -[CXXFLAGS],dnl -[ERLCFLAGS],dnl -[FCFLAGS],dnl -[FCLIBS],dnl -[FFLAGS],dnl -[FLIBS],dnl -[GCJFLAGS],dnl -[JAVACFLAGS],dnl -[LDFLAGS],dnl -[LIBS],dnl -[OBJCFLAGS],dnl -[OBJCXXFLAGS],dnl -[UPCFLAGS],dnl -[VALAFLAGS]dnl -]) - -# save one flag in name space -AC_DEFUN([_AX_SAVE_ONE_FLAG],[ - AS_VAR_PUSHDEF([_ax_save_flag_var], [$2[]_$1[]_ax_save_flags]) - AS_VAR_COPY(_ax_save_flag_var, $2[]) - AS_VAR_POPDEF([_ax_save_flag_var]) -]) - -AC_DEFUN([AX_SAVE_FLAGS],[dnl - m4_foreach([FLAG], dnl - [_AX_SAVE_FLAGS_LIST()], dnl - [_AX_SAVE_ONE_FLAG([$1],FLAG)]) -]) diff --git a/m4/complexcxx.m4 b/m4/complexcxx.m4 deleted file mode 100644 index 377074ea..00000000 --- a/m4/complexcxx.m4 +++ /dev/null @@ -1,210 +0,0 @@ -# Test C++ complex implementation -# -# Copyright (C) 2008 Bastien ROUCARIES -# -# Copying and distribution of this file, with or without modification, -# are permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. -# -# This script use script from http://autoconf-archive.cryp.to/ -# under the following licence -# -# Copyright © 2004 Todd Veldhuizen -# Copyright © 2004 Luc Maisonobe -# Copying and distribution of this file, with or without modification, -# are permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. - -dnl Tests for the presence of a std::complex class -AC_DEFUN([AC_CXX_HAVE_COMPLEX], -[AC_CACHE_CHECK(whether the compiler has complex, - ac_cv_cxx_have_complex, - [AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - using namespace std; - ]], - [[ - complex a; - complex b; - abs(b); - real(b); - imag(b); - arg(b); - conj(b); - return 0; ]])], - ac_cv_cxx_have_complex=yes, ac_cv_cxx_have_complex=no) - AC_LANG_POP - ]) - if test "$ac_cv_cxx_have_complex" = yes; then - AC_DEFINE(HAVE_COMPLEX,[1],[Define if the compiler has complex.]) - fi -]) - - -dnl equivalent of AC_CHECK_FUNC -AC_DEFUN([AC_CHECK_CXX_COMPLEX_FUNC], -[AC_REQUIRE([AC_CXX_HAVE_COMPLEX]) - AS_VAR_PUSHDEF([ac_var], [ac_cv_cpp_complex_func_$1])dnl - AC_CACHE_CHECK([for complex $1], [ac_var], -[AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - using namespace std; - #ifdef log2 - #undef log2 - #endif - ]], - [[ - complex a; - $1(a); - return 0; ]])], - [AS_VAR_SET([ac_var], [yes])], - [AS_VAR_SET([ac_var], [no])])]) - AS_VAR_IF([ac_var], [yes], [$2], [$3])dnl - AS_VAR_POPDEF([ac_var])dnl -]) - - -m4_define([_AH_CHECK_CXX_COMPLEX_FUNCS], -[m4_foreach_w([AC_Func], [$1], - [AH_TEMPLATE(AS_TR_CPP([HAVE_CXX_COMPLEX_]m4_defn([AC_Func])), - [Define to 1 if you have the complex `]m4_defn([AC_Func])[' function.])])]) - -dnl equivalent of AC_CHECK_FUNCS -AC_DEFUN([AC_CHECK_CXX_COMPLEX_FUNCS], -[_AH_CHECK_CXX_COMPLEX_FUNCS([$1])dnl -for ac_func in $1; do -AC_CHECK_CXX_COMPLEX_FUNC($ac_func, - [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_CXX_COMPLEX_$ac_func])) $2], - [$3]);dnl -done -]) - -dnl equivalent of AC_CHECK_FUNC, but for checking for -dnl complex functions in the -AC_DEFUN([AC_CHECK_CXX_COMPLEX_POW], - [AC_REQUIRE([AC_CXX_HAVE_COMPLEX]) - AS_VAR_PUSHDEF([ac_var], [ac_cv_cpp_complex_func_pow])dnl - AC_CACHE_CHECK([for complex pow], [ac_var], - [AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - # include - using namespace std; - ]], - [[ - complex x,y; - std::pow(x,double(2.0)); - std::pow(x, y); - std::pow(double(2.0), x); - return 0; ]])], - [AS_VAR_SET([ac_var], [yes])], - [AS_VAR_SET([ac_var], [no])])]) - AS_VAR_IF([ac_var], [yes], - [AC_DEFINE(HAVE_CXX_COMPLEX_POW, 1, - [Define to 1 if you have the complex pow function.])], - [])dnl - AS_VAR_POPDEF([ac_var])dnl -]) - -dnl equivalent of AC_CHECK_FUNC -AC_DEFUN([AC_CHECK_CXX_COMPLEX_ATAN2], -[AC_REQUIRE([AC_CXX_HAVE_COMPLEX]) - AS_VAR_PUSHDEF([ac_var], [ac_cv_cpp_complex_func_atan2])dnl - AC_CACHE_CHECK([for complex atan2], [ac_var], - [AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - # include - using namespace std; - ]], - [[ - complex x(1,1),y(1,1); - atan2(x,double(1.0)); - atan2(x, y); - atan2(double(1.0), x); - return 0; ]])], - [AS_VAR_SET([ac_var], [yes])], - [AS_VAR_SET([ac_var], [no])])]) -AS_VAR_IF([ac_var], [yes], - [AC_DEFINE(HAVE_CXX_COMPLEX_ATAN2, 1, - [Define to 1 if you have the complex atan2 function.])], - [])dnl -AS_VAR_POPDEF([ac_var])dnl -]) - -dnl equivalent of AC_CHECK_FUNC -AC_DEFUN([AC_CHECK_CXX_COMPLEX_FMOD], -[AC_REQUIRE([AC_CXX_HAVE_COMPLEX]) - AS_VAR_PUSHDEF([ac_var], [ac_cv_cpp_complex_func_fmod])dnl - AC_CACHE_CHECK([for complex fmod], [ac_var], - [AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - # include - using namespace std; - ]], - [[ - complex x,y; - fmod(x,double(2.0)); - fmod(x, y); - fmod(double(2.0), x); - return 0; ]])], - [AS_VAR_SET([ac_var], [yes])], - [AS_VAR_SET([ac_var], [no])])]) -AS_VAR_IF([ac_var], [yes], - [AC_DEFINE(HAVE_CXX_COMPLEX_FMOD, 1, - [Define to 1 if you have the complex fmod function.])], - [])dnl -AS_VAR_POPDEF([ac_var])dnl -]) - - -dnl equivalent of AC_CHECK_FUNC -AC_DEFUN([AC_CHECK_CXX_COMPLEX_POLAR], -[AC_REQUIRE([AC_CXX_HAVE_COMPLEX]) - AS_VAR_PUSHDEF([ac_var], [ac_cv_cpp_complex_func_polar])dnl - AC_CACHE_CHECK([for complex polar (double, double)], [ac_var], - [AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - # include - using namespace std; - ]], - [[ - /* In order to get an error with g++ need to take real */ - double d; - d=real(polar(double(1.0),double(2.0))); - return 0; ]])], - [AS_VAR_SET([ac_var], [yes])], - [AS_VAR_SET([ac_var], [no])])]) -AS_VAR_IF([ac_var], [yes], - [AC_DEFINE(HAVE_CXX_COMPLEX_POLAR, 1, - [Define to 1 if you have the complex polar (double, double) function.])], - [])dnl -AS_VAR_POPDEF([ac_var])dnl -]) - -dnl equivalent of AC_CHECK_FUNC -AC_DEFUN([AC_CHECK_CXX_COMPLEX_POLAR_COMPLEX], -[AC_REQUIRE([AC_CXX_HAVE_COMPLEX]) - AS_VAR_PUSHDEF([ac_var], [ac_cv_cpp_complex_func_polar_complex])dnl - AC_CACHE_CHECK([for complex polar (complex, complex)], [ac_var], - [AC_LANG_PUSH(C++) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - # include - using namespace std; - ]], - [[ - /* In order to get an error with g++ need to take real */ - complex x,y; - double d; - d=real(polar(x,y)); - d=real(polar(x,2.0)); - d=real(polar(2.0,y)); - return 0; ]])], - [AS_VAR_SET([ac_var], [yes])], - [AS_VAR_SET([ac_var], [no])])]) -AS_VAR_IF([ac_var], [yes], - [AC_DEFINE(HAVE_CXX_COMPLEX_POLAR_COMPLEX, 1, - [Define to 1 if you have the complex polar (complex, complex) function.])], - [])dnl -AS_VAR_POPDEF([ac_var])dnl -]) diff --git a/qucs-core.cbp b/qucs-core.cbp deleted file mode 100644 index c3ce2819..00000000 --- a/qucs-core.cbp +++ /dev/null @@ -1,579 +0,0 @@ - - - - - - diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index 795d7899..00000000 --- a/src/Makefile.am +++ /dev/null @@ -1,174 +0,0 @@ -## Process this file with automake to produce Makefile.in -# -# src/Makefile.am -# -# Automake input file. -# -# Copyright (C) 2003-2009 Stefan Jahn -# -# This 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 software 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 package; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, -# Boston, MA 02110-1301, USA. -# - -EXTRA_DIST = gperfapphash.cpp - -SUBDIRS = math components interface . converter - -# needed to generate parse_spice.hpp from parse_spice.ypp -AM_YFLAGS = -d -t - -AM_CPPFLAGS = -I$(top_srcdir)/src/math -I$(top_srcdir)/src/components \ - -I$(top_builddir)/src/components \ - -I$(top_srcdir)/src/interface -I$(builddir) - -lib_LTLIBRARIES = libqucsator.la - -libqucsator_la_LIBADD = math/libqucsmath.la \ - components/libcomponent.la \ - components/microstrip/libmicrostrip.la \ - components/devices/libdevices.la \ - components/digital/libdigital.la \ - components/verilog/libverilog.la \ - interface/libinterface.la -## In case we want to build windows dlls -libqucsator_la_LDFLAGS = -shared -no-undefined - -pkginclude_HEADERS = compat.h logging.h object.h vector.h consts.h node.h \ - net.h circuit.h integrator.h states.h states.cpp valuelist.h \ - constants.h netdefs.h property.h ptrlist.h characteristic.h pair.h \ - operatingpoint.h - -noinst_TEMPLATES = tridiag.cpp hash.cpp \ - tmatrix.cpp tvector.cpp eqnsys.cpp states.cpp \ - nasolver.cpp - -noinst_HEADERS = $(noinst_TEMPLATES) \ - check_dataset.h \ - check_touchstone.h spsolver.h dcsolver.h variable.h \ - parasweep.h sweep.h libqucsator.h evaluate.h matvec.h acsolver.h \ - transient.h netdefs.h hbsolver.h poly.h \ - spline.h tridiag.h fourier.h hash.h applications.h \ - range.h history.h devstates.h check_citi.h check_zvr.h \ - check_mdl.h differentiate.h \ - check_csv.h analyses.h receiver.h interpolator.h \ - logging.h net.h input.h dataset.h equation.h tvector.h tmatrix.h \ - environment.h exceptionstack.h check_netlist.h module.h nasolver.h \ - states.h analysis.h trsolver.h nasolution.h eqnsys.h compat.h \ - exception.h object.h node.h circuit.h constants.h vector.h \ - nodeset.h nodelist.h strlist.h operatingpoint.h consts.h \ - integrator.h valuelist.h gperfappgen.h - -libqucsator_la_SOURCES = dataset.cpp check_dataset.cpp \ - check_touchstone.cpp vector.cpp object.cpp \ - property.cpp \ - variable.cpp \ - strlist.cpp logging.c exception.cpp exceptionstack.cpp \ - matvec.cpp \ - check_citi.cpp \ - sweep.cpp \ - check_zvr.cpp \ - check_mdl.cpp check_csv.cpp \ - circuit.cpp check_netlist.cpp \ - net.cpp input.cpp \ - analysis.cpp spsolver.cpp dcsolver.cpp nodelist.cpp environment.cpp \ - parasweep.cpp equation.cpp evaluate.cpp acsolver.cpp \ - trsolver.cpp transient.cpp integrator.cpp nodeset.cpp hbsolver.cpp \ - spline.cpp fourier.cpp history.cpp \ - range.cpp devstates.cpp differentiate.cpp module.cpp receiver.cpp \ - interpolator.cpp \ - parse_citi.ypp scan_citi.lpp \ - parse_csv.ypp scan_csv.lpp \ - parse_dataset.ypp scan_dataset.lpp \ - parse_mdl.ypp scan_mdl.lpp \ - parse_netlist.ypp scan_netlist.lpp \ - parse_touchstone.ypp scan_touchstone.lpp \ - parse_zvr.ypp scan_zvr.lpp - -# needed for ylwrap -scan_citi.cpp: LEX_OUTPUT_ROOT = lex.citi_ -scan_csv.cpp: LEX_OUTPUT_ROOT = lex.csv_ -scan_dataset.cpp: LEX_OUTPUT_ROOT = lex.dataset_ -scan_mdl.cpp: LEX_OUTPUT_ROOT = lex.mdl_ -scan_netlist.cpp: LEX_OUTPUT_ROOT = lex.netlist_ -scan_touchstone.cpp: LEX_OUTPUT_ROOT = lex.touchstone_ -scan_zvr.cpp: LEX_OUTPUT_ROOT = lex.zvr_ - -# just make sure, everything is in place -bin_PROGRAMS = qucsator - -qucsator_LDADD = libqucsator.la - -qucsator_LDFLAGS = -Wl,-rpath,$(libdir) - -qucsator_SOURCES = ucs.cpp - -all-am: qucsdefs.h - - -## Here we create the various input parsing code files using -## lex and yacc, these files will be distributed -generated_FILES = qucsdefs.h - -qucsdefs.h: qucsator$(EXEEXT) - ./$< -l > $@ - -## The qucsator equation definitions use a hash lookup table -## generated using gperf and put in gperfapphash.cpp which -## is #included in the body of equation.cpp -equation.cpp: gperfapphash.cpp - -BUILT_SOURCES = equation.cpp \ - gperfappgen.h \ - parse_citi.hpp \ - parse_csv.hpp \ - parse_dataset.hpp \ - parse_mdl.hpp \ - parse_netlist.hpp \ - parse_touchstone.hpp \ - parse_zvr.hpp - - -## Here we generate gperfapphash.cpp for equation.cpp. -## -## To generate the hash table code we must first create a -## program to create the hash input file for gperf, called -## gperfappgen. -noinst_PROGRAMS = gperfappgen - -gperfappgen_SOURCES = gperfappgen.cpp - -if COND_WIN32 -FILTER=| dos2unix -endif - -gperfapphash.gph: gperfappgen$(EXEEXT) - ./$< $(FILTER) > $@ - -gperfapphash.cpp: gperfapphash.gph - $(GPERF) -I -m 8 $< | sed -e 's/{""},/{"",0},/g' > $@ - -gperfappgen.h: applications.h - sed -e 's/evaluate::[a-zA-Z0-9_]*/NULL/g' < $< > gperfappgen.h - -# this is redundant (trying to figure out appveyor problem) -gperfappgen.o: gperfappgen.h - -## Store the gperf names in their own variable as the are -## not distributed but must be removed in a maintainer-clean -gperf_FILES = gperfapphash.cpp gperfapphash.gph gperfappgen.h - -CLEANFILES = *~ *.orig *.rej *.output -MAINTAINERCLEANFILES = Makefile.in $(generated_FILES) $(gperf_FILES) -DISTCLEANFILES = $(generated_FILES) $(gperf_FILES) diff --git a/src/components/Makefile.am b/src/components/Makefile.am deleted file mode 100644 index b440c4e9..00000000 --- a/src/components/Makefile.am +++ /dev/null @@ -1,62 +0,0 @@ -## Process this file with automake to produce Makefile.in -# -# src/components/Makefile.am -# -# Automake input file for the component library. -# -# Copyright (C) 2003-2011 Stefan Jahn -# -# This 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 software 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 package; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, -# Boston, MA 02110-1301, USA. -# - -# the component library rules - -SUBDIRS = microstrip devices digital verilog - -noinst_LTLIBRARIES = libcomponent.la - -libcomponent_la_SOURCES = attenuator.cpp dcblock.cpp open.cpp vccs.cpp \ - biastee.cpp circulator.cpp dcfeed.cpp pac.cpp vcvs.cpp capacitor.cpp \ - ground.cpp resistor.cpp cccs.cpp cross.cpp trafo.cpp inductor.cpp \ - tee.cpp ccvs.cpp isolator.cpp itrafo.cpp strafo.cpp vdc.cpp idc.cpp \ - vac.cpp phaseshifter.cpp gyrator.cpp tline.cpp iprobe.cpp wprobe.cpp iac.cpp \ - spfile.cpp vnoise.cpp inoise.cpp vpulse.cpp ipulse.cpp vrect.cpp \ - irect.cpp amplifier.cpp opamp.cpp iinoise.cpp mutual.cpp mutual2.cpp \ - vvnoise.cpp ivnoise.cpp coupler.cpp coaxline.cpp vprobe.cpp vam.cpp \ - vpm.cpp tswitch.cpp relais.cpp short.cpp twistedpair.cpp tline4p.cpp \ - vexp.cpp iexp.cpp mutualx.cpp vfile.cpp ifile.cpp rfedd.cpp \ - rectline.cpp rlcg.cpp hybrid.cpp ctline.cpp ecvs.cpp circline.cpp \ - taperedline.cpp capq.cpp indq.cpp spembed.cpp spdeembed.cpp - -pkginclude_HEADERS = component.h components.h component_id.h - -noinst_HEADERS = attenuator.h dcblock.h open.h vccs.h biastee.h circulator.h \ - dcfeed.h pac.h vcvs.h capacitor.h ground.h resistor.h cccs.h cross.h \ - trafo.h inductor.h tee.h ccvs.h isolator.h component.h itrafo.h \ - strafo.h vdc.h idc.h vac.h component_id.h phaseshifter.h gyrator.h \ - tline.h iprobe.h wprobe.h iac.h spfile.h vnoise.h inoise.h vpulse.h ipulse.h \ - vrect.h irect.h amplifier.h opamp.h iinoise.h mutual.h mutual2.h \ - vvnoise.h ivnoise.h coupler.h coaxline.h vprobe.h vam.h vpm.h \ - tswitch.h relais.h short.h twistedpair.h tline4p.h vexp.h iexp.h \ - mutualx.h vfile.h ifile.h rfedd.h rectline.h components.h rlcg.h \ - hybrid.h ctline.h ecvs.h taperedline.h capq.h indq.h \ - component.h components.h component_id.h circline.h spembed.h spdeembed.h - -AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/math - -CLEANFILES = *~ *.orig *.rej - -MAINTAINERCLEANFILES = Makefile.in diff --git a/src/components/devices/Makefile.am b/src/components/devices/Makefile.am deleted file mode 100644 index 366dc653..00000000 --- a/src/components/devices/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -## Process this file with automake to produce Makefile.in -# -# src/components/devices/Makefile.am -# -# Automake input file for the component library. -# -# Copyright (C) 2004, 2007, 2008, 2011 Stefan Jahn -# -# This 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 software 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 package; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, -# Boston, MA 02110-1301, USA. -# - -# the non-linear devices library rules - -noinst_LTLIBRARIES = libdevices.la - -libdevices_la_SOURCES = device.cpp diode.cpp jfet.cpp bjt.cpp mosfet.cpp \ - eqndefined.cpp diac.cpp thyristor.cpp triac.cpp tunneldiode.cpp - -pkginclude_HEADERS = device.h - -noinst_HEADERS = device.h diode.h jfet.h bjt.h mosfet.h eqndefined.h diac.h \ - thyristor.h triac.h tunneldiode.h - -AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/math \ - -I$(top_srcdir)/src/components - -CLEANFILES = *~ *.orig *.rej - -MAINTAINERCLEANFILES = Makefile.in diff --git a/src/components/digital/Makefile.am b/src/components/digital/Makefile.am deleted file mode 100644 index e2bb3dc3..00000000 --- a/src/components/digital/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -## Process this file with automake to produce Makefile.in -# -# src/components/digital/Makefile.am -# -# Automake input file for the component library. -# -# Copyright (C) 2005, 2008 Stefan Jahn -# -# This 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 software 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 package; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, -# Boston, MA 02110-1301, USA. -# - -# the digital library rules - -noinst_LTLIBRARIES = libdigital.la - -libdigital_la_SOURCES = digital.cpp inverter.cpp nor.cpp or.cpp nand.cpp \ - and.cpp xnor.cpp xor.cpp digisource.cpp buffer.cpp - -noinst_HEADERS = digital.h inverter.h nor.h or.h nand.h and.h xnor.h xor.h \ - digisource.h buffer.h - -AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/math \ - -I$(top_srcdir)/src/components - -CLEANFILES = *~ *.orig *.rej - -MAINTAINERCLEANFILES = Makefile.in diff --git a/src/components/microstrip/Makefile.am b/src/components/microstrip/Makefile.am deleted file mode 100644 index a0f5fd11..00000000 --- a/src/components/microstrip/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -## Process this file with automake to produce Makefile.in -# -# src/components/microstrip/Makefile.am -# -# Automake input file for the component library. -# -# Copyright (C) 2004, 2005, 2009 Stefan Jahn -# -# This 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 software 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 package; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, -# Boston, MA 02110-1301, USA. -# - -# the microstrip library rules - -noinst_LTLIBRARIES = libmicrostrip.la - -libmicrostrip_la_SOURCES = substrate.cpp msline.cpp mscorner.cpp msmbend.cpp \ - msstep.cpp msopen.cpp msgap.cpp mscoupled.cpp mslange.cpp mstee.cpp mscross.cpp \ - msvia.cpp cpwline.cpp cpwopen.cpp cpwshort.cpp cpwgap.cpp cpwstep.cpp \ - bondwire.cpp msrstub.cpp spiralinductor.cpp circularloop.cpp - -noinst_HEADERS = substrate.h msline.h mscorner.h msmbend.h msstep.h msopen.h \ - msgap.h mscoupled.h mslange.h mstee.h mscross.h msvia.h cpwline.h cpwopen.h \ - cpwshort.h cpwgap.h cpwstep.h bondwire.h msrstub.h spiralinductor.h circularloop.h - -AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/math \ - -I$(top_srcdir)/src/components -I$(top_srcdir)/src/components/devices - -CLEANFILES = *~ *.orig *.rej - -MAINTAINERCLEANFILES = Makefile.in diff --git a/src/components/verilog/Makefile.am b/src/components/verilog/Makefile.am deleted file mode 100644 index 640ab384..00000000 --- a/src/components/verilog/Makefile.am +++ /dev/null @@ -1,133 +0,0 @@ -## Process this file with automake to produce Makefile.in -# -# src/components/verilog/Makefile.am -# -# Automake input file for the verilog device library. -# -# Copyright (C) 2006-2011 Stefan Jahn -# More models added 2013 Mike Beinson mbrin72043@yahoo.co.uk -# -# This 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 software 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 package; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, -# Boston, MA 02110-1301, USA. -# - -# the verilog devices library rules - -noinst_LTLIBRARIES = libverilog.la - -XML_BUILD = \ - $(srcdir)/analogfunction.xml \ - $(srcdir)/qucsVersion.xml \ - $(srcdir)/qucsMODULEcore.xml \ - $(srcdir)/qucsMODULEdefs.xml - -# Parallel runs of admsXml can create a race to write the header files -# See: https://github.com/Qucs/qucs/issues/545 -.NOTPARALLEL: - -.va.cpp: $(XML_BUILD) - @for i in $(XML_BUILD); do \ - echo "$$i"; \ - es="$$es -e $$i"; \ - done; \ - echo "$(ADMSXML) $< $$es -o $*"; \ - $(ADMSXML) $< $$es -o $* - -.va.cpp: - -VA_FILES = \ - EKV26MOS.va \ - log_amp.va \ - MESFET.va \ - mod_amp.va \ - nigbt.va \ - photodiode.va \ - phototransistor.va \ - potentiometer.va \ - \ - dff_SR.va \ - tff_SR.va \ - jkff_SR.va \ - gatedDlatch.va \ - logic_0.va \ - logic_1.va \ - mux2to1.va \ - mux4to1.va \ - mux8to1.va \ - DLS_nto1.va \ - DLS_1ton.va \ - andor4x2.va \ - andor4x3.va \ - andor4x4.va \ - dmux2to4.va \ - dmux3to8.va \ - dmux4to16.va \ - ha1b.va \ - fa1b.va \ - fa2b.va \ - pad2bit.va \ - pad3bit.va \ - pad4bit.va \ - binarytogrey4bit.va \ - greytobinary4bit.va \ - comp_1bit.va \ - comp_2bit.va \ - comp_4bit.va \ - hpribin4bit.va \ - vcresistor.va - -libverilog_la_SOURCES = $(VA_FILES) -VERILOGdir=$(pkgdatadir)/verilog - -VERILOG_DATA = $(VA_FILES) - -VERILOGDIGITAL_FILES = - -XML_FILES = analogfunction.xml \ - qucsVersion.xml \ - qucsMODULEcore.xml \ - qucsMODULEdefs.xml \ - qucsMODULEgui.xml \ - qucsMODULEguiJSONsymbol.xml - -MAKE_FILES = cpp2lib.makefile\ - va2cpp.makefile - -EXTRA_DIST = $(VERILOG_DATA) $(XML_FILES) $(MAKE_FILES) - -AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/math \ - -I$(top_srcdir)/src/components -I$(top_srcdir)/src/components/devices \ - -I$(builddir) - -## configure determines if we want to build and use the -## bundled version of ADMS, or the host's ADMS. Here we -## set the path to the admsXml binary depending on the choice -## the user made at configure time - -GENERATED_FILES = *.core.* *.analogfunction.* *.gui.* *.defs.* .*.adms .*.xml - -pkginclude_HEADERS = $(XML_FILES) $(MAKE_FILES) - -CLEANFILES = *~ *.orig *.rej *.analogfunction.cpp *.core.cpp .*.adms \ - *.core.h *.analogfunction.h *.cpp *.defs.h - -DISTCLEANFILES = \ - .adms.implicit.xml \ - .interface.xml \ - constants.vams \ - disciplines.vams - - -MAINTAINERCLEANFILES = Makefile.in $(GENERATED_FILES) diff --git a/src/converter/Makefile.am b/src/converter/Makefile.am deleted file mode 100644 index 994a7665..00000000 --- a/src/converter/Makefile.am +++ /dev/null @@ -1,51 +0,0 @@ -## Process this file with automake to produce Makefile.in -# -# src/converter/Makefile.am -# -# Automake input file. -# -# Copyright (C) 2004, 2005, 2006, 2007 Stefan Jahn -# -# This 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 software 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 package; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, -# Boston, MA 02110-1301, USA. -# - -bin_PROGRAMS = qucsconv - -qucsconv_LDADD = ../libqucsator.la ../math/libqucsmath.la - -qucsconv_LDFLAGS = -Wl,-rpath,$(libdir) - -AM_CPPFLAGS = -I$(top_builddir)/src \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/math - -# needed to generate parse_spice.hpp from parse_spice.ypp -AM_YFLAGS = -d -t - -# needed for ylwrap -scan_spice.cpp: LEX_OUTPUT_ROOT = lex.spice_ -scan_vcd.cpp: LEX_OUTPUT_ROOT = lex.vcd_ - -qucsconv_SOURCES = qucsconv.cpp parse_spice.ypp scan_spice.lpp \ - check_spice.cpp qucs_producer.cpp parse_vcd.ypp scan_vcd.lpp \ - check_vcd.cpp csv_producer.cpp touchstone_producer.cpp \ - matlab_producer.cpp - -noinst_HEADERS = check_spice.h qucs_producer.h check_vcd.h \ - csv_producer.h touchstone_producer.h matlab_producer.h - -CLEANFILES = *~ *.orig *.rej *.output -MAINTAINERCLEANFILES = Makefile.in diff --git a/src/interface/Makefile.am b/src/interface/Makefile.am deleted file mode 100644 index ac2c182a..00000000 --- a/src/interface/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -## Process this file with automake to produce Makefile.in -# -# src/interface/Makefile.am -# -# Automake input file for the component library. -# -# Copyright (C) 2003-2011 Stefan Jahn -# -# This 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 software 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 package; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, -# Boston, MA 02110-1301, USA. -# - -# the interface library rules - -AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/math \ - -I$(top_srcdir)/src/components -I$(top_builddir)/src/components - -pkginclude_HEADERS = qucs_interface.h - -noinst_HEADERS = e_trsolver.h - -noinst_LTLIBRARIES = libinterface.la - - -libinterface_la_SOURCES = qucs_interface.cpp e_trsolver.cpp - -CLEANFILES = *~ *.orig *.rej - -MAINTAINERCLEANFILES = Makefile.in - diff --git a/src/math/Makefile.am b/src/math/Makefile.am deleted file mode 100644 index 7aa4ef93..00000000 --- a/src/math/Makefile.am +++ /dev/null @@ -1,52 +0,0 @@ -## Process this file with automake to produce Makefile.in -# -# src/math/Makefile.am -# -# Automake input file. -# -# Copyright (C) 2008 Stefan Jahn -# -# This 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 software 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 package; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, -# Boston, MA 02110-1301, USA. -# - -AM_CPPFLAGS = -I$(top_srcdir)/src - -EXTRA_DIST = cbesselj.cpp - -pkginclude_HEADERS = \ - precision.h \ - matrix.h \ - complex.h \ - real.h - -noinst_HEADERS = \ - fspecial.h \ - matrix.h \ - precision.h \ - complex.h \ - real.h - -noinst_LTLIBRARIES = libqucsmath.la - -libqucsmath_la_SOURCES = \ - complex.cpp \ - fspecial.cpp \ - matrix.cpp \ - real.cpp - - -CLEANFILES = *~ *.orig *.rej *.output -MAINTAINERCLEANFILES = Makefile.in diff --git a/tests/Makefile.am b/tests/Makefile.am deleted file mode 100644 index 85e6ad7c..00000000 --- a/tests/Makefile.am +++ /dev/null @@ -1,61 +0,0 @@ -## Process this file with automake to produce Makefile.in -# -# Makefile.am -# -# Automake input file. -# -# Copyright (C) 2014 Guilherme Brondani Torri -# -# This 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 software 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 package; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, -# Boston, MA 02110-1301, USA. -# - -# FIXME: different paths used in configure.ac -AM_CPPFLAGS = \ - -I$(top_srcdir)/libs/gtest/include \ - -I$(top_srcdir)/libs/gtest/ \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/math \ - -I$(top_builddir)/src/components \ - -I$(top_srcdir)/src/components - -AM_CXXFLAGS = - -GTEST_TESTS = libqucsUnitTest - -if USE_GTEST -GTEST_LIBQUCS = libqucsUnitTest -check_PROGRAMS = $(GTEST_LIBQUCS) -libqucsUnitTest_LDADD = $(top_builddir)/src/libqucsator.la -libqucsUnitTest_CPPFLAGS = $(AM_CPPFLAGS) @GTEST_CPPFLAGS@ \ - -DGTEST_HAS_PTHREAD=0 -libqucsUnitTest_SOURCES = testMain.cpp \ - test_libqucs.cpp \ - Fourier.cpp \ - Math.cpp \ - Matrix.cpp \ - Spline.cpp \ - Vector.cpp -else -libqucsUnitTest: - echo "!#/bin/sh" > $@ - echo exit 77 >> $@ - chmod +x $@ -endif - -# TESTS -- Programs run automatically by "make check" -TESTS = $(GTEST_TESTS) -EXTRA_DIST = runqucsator.sh testDefine.h -CLEANFILES = $(GTEST_TESTS)